aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2019-10-08 17:05:00 +0100
committerSergio Martins <smartins@kde.org>2019-10-08 17:05:00 +0100
commite0cdaad92a6c4a8dca45fe22caa6a3ae00ae9453 (patch)
treecf65b7e41631ab527cd2afd78558480990b9f2f0
parent5d5448ebdfa623d115777bc489929d453b1aed03 (diff)
tests Fix fixit tests on Windows
When patching the yaml files we need to normalize slashes
-rwxr-xr-xtests/run_tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 1cbfe66a..4977dbc0 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -499,6 +499,9 @@ def patch_fixit_yaml_file(test, is_standalone):
if stripped.startswith('MainSourceFile') or stripped.startswith("FilePath") or stripped.startswith("- FilePath"):
line = line.replace(test.relativeFilename(), fixedfilename)
+ # For Windows:
+ line = line.replace(test.relativeFilename().replace('/', '\\'), fixedfilename.replace('/', '\\'))
+
# Some tests also apply fix their to their headers:
line = line.replace(possible_headerfile, fixedfilename.replace(".cpp", ".h"))
f.write(line)
@@ -635,7 +638,7 @@ def run_unit_tests(tests):
result = result and test_result
if not test_result:
- test.removeYamlFiles();
+ test.removeYamlFiles()
global _was_successful, _lock
with _lock: