aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-03-15 12:15:11 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2021-03-15 12:15:11 +0200
commit95a2cbb421abc8b559f38043bd535e2180310ed4 (patch)
tree7fb42d0c106b13bffe63433469a19768a747041e /run_project_tests.py
parent2be074b1d445fcd30535bcf7518f8ce0738bcbf3 (diff)
downloadmeson-filecleanup.zip
meson-filecleanup.tar.gz
meson-filecleanup.tar.bz2
Delete leftover files from some tests.filecleanup
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index 977c0c4..97137ae 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -1306,6 +1306,15 @@ def print_tool_versions():
print('{0:<{2}}: {1}'.format(tool['tool'], get_version(tool), max_width))
print()
+def clear_transitive_files():
+ a = Path('test cases/common')
+ for d in a.glob('*subproject subdir/subprojects/subsubsub*'):
+ if d.is_dir():
+ shutil.rmtree(d)
+ else:
+ d.unlink()
+
+
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Run the test suite of Meson.")
parser.add_argument('extra_args', nargs='*',
@@ -1326,6 +1335,8 @@ if __name__ == '__main__':
if options.native_file:
options.extra_args += ['--native-file', options.native_file]
+ clear_transitive_files()
+
print('Meson build system', meson_version, 'Project Tests')
print('Using python', sys.version.split('\n')[0])
setup_commands(options.backend)
@@ -1357,4 +1368,5 @@ if __name__ == '__main__':
tests = list(g)
if len(tests) != 1:
print('WARNING: The {} suite contains duplicate "{}" tests: "{}"'.format(name, k, '", "'.join(tests)))
+ clear_transitive_files()
raise SystemExit(failing_tests)