summaryrefslogtreecommitdiff
path: root/generated_tests
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-06-30 16:05:57 -0700
committerDylan Baker <dylan@pnwbakers.com>2016-08-05 10:45:02 -0700
commit231d8e0128eaae4b5bf561cd939ef8432f64d22f (patch)
treeb48cc82bd22eb3a7c204c8632c2956de4664a5a4 /generated_tests
parent9c53a8d96313ccd0836e94e401748b9a105ca8d1 (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>
Diffstat (limited to 'generated_tests')
-rw-r--r--generated_tests/gen_cl_store_tests.py3
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 == '':