aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorstijn2018-08-08 15:20:22 +0200
committerDamien George2018-08-10 16:33:42 +1000
commitca0d78cebb20ed67f78491a68b02272aba2ecd13 (patch)
tree0f7a0fe8bc75be883b060a0f40497999450350af /tests
parent3fccd78aca7ff63ebbfd44fcac3f816147ee0c6b (diff)
run-tests: Make .exp and .out file names unique by prefixing with dir.
Input files like basics/string_format.py and float/string_format.py have the same basename so using that name for writing the output (.exp and .out files) when both tests fail, results in the output of the first one being overwritten. Avoid this by using unique names for the output, replacing path characters with underscores.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-tests4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/run-tests b/tests/run-tests
index dc1a329ac..a3263fff8 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -394,8 +394,8 @@ def run_tests(pyb, tests, args, base_path="."):
if verdict == "exclude":
continue
- test_basename = os.path.basename(test_file)
- test_name = os.path.splitext(test_basename)[0]
+ test_basename = test_file.replace('..', '_').replace('./', '').replace('/', '_')
+ test_name = os.path.splitext(os.path.basename(test_file))[0]
is_native = test_name.startswith("native_") or test_name.startswith("viper_")
is_endian = test_name.endswith("_endian")
is_int_big = test_name.startswith("int_big") or test_name.endswith("_intbig")