|
3 | 3 | import argparse
|
4 | 4 | import json
|
5 | 5 | import time
|
| 6 | +import os |
6 | 7 |
|
7 | 8 | from pathlib import Path
|
8 | 9 |
|
@@ -65,18 +66,22 @@ def wrong_options(library):
|
65 | 66 | def build_library(library, version):
|
66 | 67 | command = ["nix", "build", f"?submodules=1#{library}.{version}"]
|
67 | 68 | result = sp.run(command, check=False)
|
| 69 | + print(f"build {library} {version} = {result.returncode}") |
68 | 70 | return result.returncode == 0
|
69 | 71 |
|
70 | 72 | def test_library(library, test_suite, version):
|
71 | 73 | opts = base_options(library)
|
72 | 74 | opts.extend(globals()[f"{test_suite.replace('-', '_')}_options"](library))
|
73 |
| - command = ["./result/bin/ECTesterStandalone", "test", f"-oyml:results/{library}_{test_suite}_{version}.yml", "-q", *opts, test_suite, library] |
74 |
| - print(" ".join(command)) |
| 75 | + command = ["./result/bin/ECTesterStandalone", "test", |
| 76 | + f"-oyml:results/yml/{library}_{test_suite}_{version}.yml", |
| 77 | + f"-otxt:results/txt/{library}_{test_suite}_{version}.txt", |
| 78 | + f"-oxml:results/xml/{library}_{test_suite}_{version}.xml", |
| 79 | + "-q", *opts, test_suite, library] |
75 | 80 | try:
|
76 | 81 | result = sp.run(command, timeout=60, check=False)
|
77 |
| - print(f"{library} {test_suite} {version} = {result.returncode}") |
| 82 | + print(f"run {library} {test_suite} {version} = {result.returncode}") |
78 | 83 | except sp.TimeoutExpired:
|
79 |
| - print(f"{library} {test_suite} {version} timed-out!") |
| 84 | + print(f"run {library} {test_suite} {version} timed-out!") |
80 | 85 |
|
81 | 86 |
|
82 | 87 | def main():
|
@@ -125,6 +130,10 @@ def main():
|
125 | 130 | else:
|
126 | 131 | suites2test = [suite]
|
127 | 132 |
|
| 133 | + os.makedirs("results/yml/", exist_of=True) |
| 134 | + os.makedirs("results/txt/", exist_of=True) |
| 135 | + os.makedirs("results/xml/", exist_of=True) |
| 136 | + |
128 | 137 | for library in libraries2test:
|
129 | 138 | with open(f"./nix/{library}_pkg_versions.json", "r") as f:
|
130 | 139 | versions = list(json.load(f).keys())
|
|
0 commit comments