diff options
-rwxr-xr-x | run_project_tests.py | 18 | ||||
-rw-r--r-- | test cases/common/105 testframework options/test.json | 10 | ||||
-rw-r--r-- | test cases/common/105 testframework options/test_args.txt | 4 | ||||
-rw-r--r-- | test cases/common/176 initial c_args/test.json | 8 | ||||
-rw-r--r-- | test cases/common/176 initial c_args/test_args.txt | 4 |
5 files changed, 19 insertions, 25 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index 8550bbf..0ebc557 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -24,7 +24,6 @@ import sys import signal import shlex from io import StringIO -from ast import literal_eval from enum import Enum import tempfile from pathlib import Path, PurePath @@ -34,7 +33,7 @@ from mesonbuild import compilers from mesonbuild import mesonlib from mesonbuild import mlog from mesonbuild import mtest -from mesonbuild.mesonlib import MachineChoice, stringlistify, Popen_safe +from mesonbuild.mesonlib import MachineChoice, Popen_safe from mesonbuild.coredata import backendlist import argparse import json @@ -365,20 +364,6 @@ def run_test_inprocess(testdir): os.chdir(old_cwd) return max(returncode_test, returncode_benchmark), mystdout.getvalue(), mystderr.getvalue(), test_log -def parse_test_args(testdir): - args = [] - try: - with open(os.path.join(testdir, 'test_args.txt'), 'r') as f: - content = f.read() - try: - args = literal_eval(content) - except Exception: - raise Exception('Malformed test_args file.') - args = stringlistify(args) - except FileNotFoundError: - pass - return args - # Build directory name must be the same so Ccache works over # consecutive invocations. def create_deterministic_builddir(test: TestDef) -> str: @@ -417,7 +402,6 @@ def pass_libdir_to_test(dirname: Path): def _run_test(test: TestDef, test_build_dir: str, install_dir: str, extra_args, compiler, backend, flags, commands, should_fail): compile_commands, clean_commands, install_commands, uninstall_commands = commands - test_args = parse_test_args(testdir) gen_start = time.time() # Configure in-process if pass_prefix_to_test(test.path): diff --git a/test cases/common/105 testframework options/test.json b/test cases/common/105 testframework options/test.json new file mode 100644 index 0000000..65bf3c0 --- /dev/null +++ b/test cases/common/105 testframework options/test.json @@ -0,0 +1,10 @@ +{ + "matrix": { + "options": { + "testoption": [{ "val": "A string with spaces" }], + "other_one": [{ "val": "true" }], + "combo_opt": [{ "val": "one" }], + "werror": [{ "val": "true" }] + } + } +} diff --git a/test cases/common/105 testframework options/test_args.txt b/test cases/common/105 testframework options/test_args.txt deleted file mode 100644 index a667e3a..0000000 --- a/test cases/common/105 testframework options/test_args.txt +++ /dev/null @@ -1,4 +0,0 @@ -# This file is not read by meson itself, but by the test framework. -# It is not possible to pass arguments to meson from a file. -['--werror', '-D', 'testoption=A string with spaces', '-D', 'other_one=true', \ - '-D', 'combo_opt=one'] diff --git a/test cases/common/176 initial c_args/test.json b/test cases/common/176 initial c_args/test.json new file mode 100644 index 0000000..f9b73a4 --- /dev/null +++ b/test cases/common/176 initial c_args/test.json @@ -0,0 +1,8 @@ +{ + "matrix": { + "options": { + "c_args": [{ "val": "-funroll-loops" }], + "c_link_args": [{ "val": "-Dtest_harmless_but_useless_link_arg" }] + } + } +} diff --git a/test cases/common/176 initial c_args/test_args.txt b/test cases/common/176 initial c_args/test_args.txt deleted file mode 100644 index 166e481..0000000 --- a/test cases/common/176 initial c_args/test_args.txt +++ /dev/null @@ -1,4 +0,0 @@ -# This file is not read by meson itself, but by the test framework. -# It is not possible to pass arguments to meson from a file. -['-Dc_args=-march=native', '-Dc_args=-funroll-loops', - '-Dc_link_args=-Dtest_harmless_but_useless_link_arg'] |