From 231d8e0128eaae4b5bf561cd939ef8432f64d22f Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 30 Jun 2016 16:05:57 -0700 Subject: 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 --- generated_tests/gen_cl_store_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'generated_tests') 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 == '': -- cgit v1.2.3