Skip to content

Commit b026849

Browse files
committed
Split off results in test_all script.
1 parent 8c0a788 commit b026849

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

nix/test_all.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import argparse
44
import json
55
import time
6+
import os
67

78
from pathlib import Path
89

@@ -65,18 +66,22 @@ def wrong_options(library):
6566
def build_library(library, version):
6667
command = ["nix", "build", f"?submodules=1#{library}.{version}"]
6768
result = sp.run(command, check=False)
69+
print(f"build {library} {version} = {result.returncode}")
6870
return result.returncode == 0
6971

7072
def test_library(library, test_suite, version):
7173
opts = base_options(library)
7274
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]
7580
try:
7681
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}")
7883
except sp.TimeoutExpired:
79-
print(f"{library} {test_suite} {version} timed-out!")
84+
print(f"run {library} {test_suite} {version} timed-out!")
8085

8186

8287
def main():
@@ -125,6 +130,10 @@ def main():
125130
else:
126131
suites2test = [suite]
127132

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+
128137
for library in libraries2test:
129138
with open(f"./nix/{library}_pkg_versions.json", "r") as f:
130139
versions = list(json.load(f).keys())

0 commit comments

Comments
 (0)