diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2016-06-30 16:05:57 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2016-08-05 10:45:02 -0700 |
commit | 231d8e0128eaae4b5bf561cd939ef8432f64d22f (patch) | |
tree | b48cc82bd22eb3a7c204c8632c2956de4664a5a4 | |
parent | 9c53a8d96313ccd0836e94e401748b9a105ca8d1 (diff) |
Generators/cl_store: Move makedirs into main
Executing code in the global scope that isn't in main isn't a
particularly good idea, but for our testing we call the main() function,
so moving this into main fixes the test, and it also improves the code
quality a bit.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
-rw-r--r-- | generated_tests/gen_cl_store_tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generated_tests/gen_cl_store_tests.py b/generated_tests/gen_cl_store_tests.py index 1153e6247..52a722ed3 100644 --- a/generated_tests/gen_cl_store_tests.py +++ b/generated_tests/gen_cl_store_tests.py @@ -35,7 +35,6 @@ TYPES = ['char', 'uchar', 'short', 'ushort', 'int', 'uint', 'long', 'ulong', 'fl VEC_SIZES = ['', '2', '4', '8', '16'] dirName = os.path.join("cl", "store") -utils.safe_makedirs(dirName) def gen_array(size): @@ -68,6 +67,8 @@ def begin_test(type_name, addr_space): def main(): + utils.safe_makedirs(dirName) + for t in TYPES: for s in VEC_SIZES: if s == '': |