Skip to content

Commit

Permalink
pass version to get_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Nov 24, 2024
1 parent 341e6b9 commit 2d80e49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tools/openms/get_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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\(\"([^\"]+)\" ([^ ]+) (.*)")
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tools/openms/test-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "</macros>" >> "$autotests"
Expand Down

0 comments on commit 2d80e49

Please sign in to comment.