From 22971778638267a34a64526db1c976c56b069a9b Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 15 Mar 2021 12:15:11 +0200 Subject: Delete leftover files from some tests. --- run_project_tests.py | 11 +++++++++++ run_unittests.py | 8 ++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/run_project_tests.py b/run_project_tests.py index 977c0c4b0..149caa26a 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -1306,6 +1306,14 @@ 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(): + mesonlib.windows_proof_rmtree(d) + else: + mesonlib.windows_proof_rm(str(d)) + if __name__ == '__main__': parser = argparse.ArgumentParser(description="Run the test suite of Meson.") parser.add_argument('extra_args', nargs='*', @@ -1326,6 +1334,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 +1367,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) diff --git a/run_unittests.py b/run_unittests.py index 7e7ec9329..6f3562614 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -56,8 +56,8 @@ from mesonbuild.ast import AstInterpreter from mesonbuild.mesonlib import ( BuildDirLock, LibType, MachineChoice, PerMachine, Version, is_windows, is_osx, is_cygwin, is_dragonflybsd, is_openbsd, is_haiku, is_sunos, - windows_proof_rmtree, python_command, version_compare, split_args, - quote_arg, relpath, is_linux, git + windows_proof_rmtree, windows_proof_rm, python_command, + version_compare, split_args, quote_arg, relpath, is_linux, git ) from mesonbuild.environment import detect_ninja from mesonbuild.mesonlib import MesonException, EnvironmentException, OptionKey @@ -5793,12 +5793,16 @@ class FailureTests(BasePlatformTests): contain required keys. ''' tdir = os.path.join(self.unit_test_dir, '20 subproj dep variables') + stray_file = os.path.join(tdir, 'subprojects/subsubproject.wrap') + if os.path.exists(stray_file): + windows_proof_rm(stray_file) out = self.init(tdir, inprocess=True) self.assertRegex(out, r"Neither a subproject directory nor a .*nosubproj.wrap.* file was found") self.assertRegex(out, r'Function does not take positional arguments.') self.assertRegex(out, r'Dependency .*somenotfounddep.* from subproject .*subprojects/somesubproj.* found: .*NO.*') self.assertRegex(out, r'Dependency .*zlibproxy.* from subproject .*subprojects.*somesubproj.* found: .*YES.*') self.assertRegex(out, r'Missing key .*source_filename.* in subsubproject.wrap') + windows_proof_rm(stray_file) def test_exception_exit_status(self): ''' -- cgit v1.2.1