diff options
| author | J08nY | 2024-08-18 20:48:21 +0200 |
|---|---|---|
| committer | J08nY | 2024-08-18 20:48:21 +0200 |
| commit | b02684910c22df9c7514be0ed9b4509236493d74 (patch) | |
| tree | 60532a784637a6f9091fedcfe6a4960cd3a792b6 | |
| parent | 8c0a788a3ef4444cd18333dda3c6566c40326e82 (diff) | |
| download | ECTester-b02684910c22df9c7514be0ed9b4509236493d74.tar.gz ECTester-b02684910c22df9c7514be0ed9b4509236493d74.tar.zst ECTester-b02684910c22df9c7514be0ed9b4509236493d74.zip | |
| -rw-r--r-- | nix/test_all.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/nix/test_all.py b/nix/test_all.py index 33f4571..7b884a5 100644 --- a/nix/test_all.py +++ b/nix/test_all.py @@ -3,6 +3,7 @@ import argparse import json import time +import os from pathlib import Path @@ -65,18 +66,22 @@ def wrong_options(library): def build_library(library, version): command = ["nix", "build", f"?submodules=1#{library}.{version}"] result = sp.run(command, check=False) + print(f"build {library} {version} = {result.returncode}") return result.returncode == 0 def test_library(library, test_suite, version): opts = base_options(library) opts.extend(globals()[f"{test_suite.replace('-', '_')}_options"](library)) - command = ["./result/bin/ECTesterStandalone", "test", f"-oyml:results/{library}_{test_suite}_{version}.yml", "-q", *opts, test_suite, library] - print(" ".join(command)) + command = ["./result/bin/ECTesterStandalone", "test", + f"-oyml:results/yml/{library}_{test_suite}_{version}.yml", + f"-otxt:results/txt/{library}_{test_suite}_{version}.txt", + f"-oxml:results/xml/{library}_{test_suite}_{version}.xml", + "-q", *opts, test_suite, library] try: result = sp.run(command, timeout=60, check=False) - print(f"{library} {test_suite} {version} = {result.returncode}") + print(f"run {library} {test_suite} {version} = {result.returncode}") except sp.TimeoutExpired: - print(f"{library} {test_suite} {version} timed-out!") + print(f"run {library} {test_suite} {version} timed-out!") def main(): @@ -125,6 +130,10 @@ def main(): else: suites2test = [suite] + os.makedirs("results/yml/", exist_of=True) + os.makedirs("results/txt/", exist_of=True) + os.makedirs("results/xml/", exist_of=True) + for library in libraries2test: with open(f"./nix/{library}_pkg_versions.json", "r") as f: versions = list(json.load(f).keys()) |
