From 2d80e49581e6d3fc06c8aca181f35336662c6ac7 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Sun, 24 Nov 2024 23:36:46 +0100 Subject: [PATCH] pass version to get_tests --- tools/openms/get_tests.py | 6 ++++-- tools/openms/test-data.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/openms/get_tests.py b/tools/openms/get_tests.py index ae928e5a3..219f0709a 100755 --- a/tools/openms/get_tests.py +++ b/tools/openms/get_tests.py @@ -161,6 +161,7 @@ def process_test_line( failing_tests: List[str], skip_list: List[str], diff_pairs: Dict[str, str], + version: str ) -> Optional[str]: re_test_id = re.compile(r"add_test\(\"([^\"]+)\" ([^ ]+) (.*)") @@ -257,7 +258,7 @@ class CTDConverterArgs: formats_file="aux/filetypes.txt", # tool_conf_destination = "tool.conf", hardcoded_parameters="aux/hardcoded_params.json", - tool_version="3.1", + tool_version=version, test_only=True, test_unsniffable=[ "csv", @@ -285,6 +286,7 @@ class CTDConverterArgs: parser = argparse.ArgumentParser(description="Create Galaxy tests for a OpenMS tools") parser.add_argument("--id", dest="id", help="tool id") parser.add_argument("--cmake", nargs="+", help="OpenMS test CMake files") +parser.add_argument("--version", dest="version", help="OpenMS Version") args = parser.parse_args() sys.stderr.write(f"generate tests for {args.id}\n") @@ -330,7 +332,7 @@ class CTDConverterArgs: test_lines.append(line) for line in test_lines: - test = process_test_line(args.id, line, failing_tests, SKIP_LIST, diff_pairs) + test = process_test_line(args.id, line, failing_tests, SKIP_LIST, diff_pairs, args.version) if test: tests.append(test) diff --git a/tools/openms/test-data.sh b/tools/openms/test-data.sh index 670525d82..6bdbe8da3 100755 --- a/tools/openms/test-data.sh +++ b/tools/openms/test-data.sh @@ -273,7 +273,7 @@ head -n 10 macros.xml for i in $(ls ctd/*ctd) do b=$(basename "$i" .ctd) - ./get_tests.py --id "$b" --cmake "$OPENMSGIT"/src/tests/topp/CMakeLists.txt "$OPENMSGIT"/src/tests/topp/THIRDPARTY/third_party_tests.cmake >> "$autotests" + ./get_tests.py --id "$b" --version "$VERSION" --cmake "$OPENMSGIT"/src/tests/topp/CMakeLists.txt "$OPENMSGIT"/src/tests/topp/THIRDPARTY/third_party_tests.cmake >> "$autotests" wc -l "$autotests" done echo "" >> "$autotests"