|
66 | 66 |
|
67 | 67 | for benchmark in spec_benchmarks:
|
68 | 68 | print(f'#--- {benchmark}.sh.test')
|
69 |
| - print(f'RUN: rm -rf %{temp}') # clean up any previous (potentially incomplete) run |
70 |
| - print(f'RUN: mkdir %{temp}') |
71 |
| - print(f'RUN: cp {spec_config} %{temp}/spec-config.cfg') |
72 |
| - print(f'RUN: %{{spec_dir}}/bin/runcpu --config %{temp}/spec-config.cfg --size train --output-root %{temp} --rebuild {benchmark}') |
73 |
| - print(f'RUN: rm -rf %{temp}/benchspec') # remove the temporary directory, which can become quite large |
| 69 | + print(f'RUN: rm -rf %{{temp}}') # clean up any previous (potentially incomplete) run |
| 70 | + print(f'RUN: mkdir %{{temp}}') |
| 71 | + print(f'RUN: cp {spec_config} %{{temp}}/spec-config.cfg') |
| 72 | + print(f'RUN: %{{spec_dir}}/bin/runcpu --config %{{temp}}/spec-config.cfg --size train --output-root %{{temp}} --rebuild {benchmark}') |
| 73 | + print(f'RUN: rm -rf %{{temp}}/benchspec') # remove the temporary directory, which can become quite large |
74 | 74 |
|
75 | 75 | # The `runcpu` command above doesn't fail even if the benchmark fails to run. To determine failure, parse the CSV
|
76 | 76 | # results and ensure there are no compilation errors or runtime errors in the status row. Also print the logs and
|
77 | 77 | # fail if there are no CSV files at all, which implies a SPEC error.
|
78 |
| - print(f'RUN: %{{libcxx-dir}}/utils/parse-spec-results --extract "Base Status" --keep-failed %{temp}/result/*.train.csv > %{temp}/status || ! cat %{temp}/result/*.log') |
79 |
| - print(f'RUN: ! grep -E "CE|RE" %{temp}/status || ! cat %{temp}/result/*.log') |
| 78 | + print(f'RUN: %{{libcxx-dir}}/utils/parse-spec-results --extract "Base Status" --keep-failed %{{temp}}/result/*.train.csv > %{{temp}}/status || ! cat %{{temp}}/result/*.log') |
| 79 | + print(f'RUN: ! grep -E "CE|RE" %{{temp}}/status || ! cat %{{temp}}/result/*.log') |
80 | 80 |
|
81 | 81 | # If there were no errors, parse the results into LNT-compatible format and print them.
|
82 |
| - print(f'RUN: %{{libcxx-dir}}/utils/parse-spec-results %{temp}/result/*.train.csv --output-format=lnt > %{temp}/results.lnt') |
83 |
| - print(f'RUN: cat %{temp}/results.lnt') |
| 82 | + print(f'RUN: %{{libcxx-dir}}/utils/parse-spec-results %{{temp}}/result/*.train.csv --output-format=lnt > %{{temp}}/results.lnt') |
| 83 | + print(f'RUN: cat %{{temp}}/results.lnt') |
0 commit comments