diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2018-08-20 20:23:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-20 20:23:09 -0700 |
commit | 29b2e5a74eb007f04a18e01d7a9c21eff577c9b1 (patch) | |
tree | b6ea5c072884fd78bd3a0dfec9b0b45ebf0d3b25 /test/regress/run_regression.py | |
parent | a82837a03cf3bd33f906901f45b2c6f36cf420de (diff) |
Remove support for *.expect files in regressions (#2341)
Currently, we can optionally specify an *.expect file with the metadata
of a regression test. This commit removes that option because it was not
widely used, adds maintenance overhead and makes the transition to a new
build system more cumbersome. Regression files can still be fed to a
solver without removing the metadata first since they are in comments of
the corresponding input format (note that this was not always the case,
it changed in efc6163629c6c5de446eccfe81777c93829995d5).
Diffstat (limited to 'test/regress/run_regression.py')
-rwxr-xr-x | test/regress/run_regression.py | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/test/regress/run_regression.py b/test/regress/run_regression.py index 1114b4a2c..6f6edf058 100755 --- a/test/regress/run_regression.py +++ b/test/regress/run_regression.py @@ -169,24 +169,10 @@ def run_regression(unsat_cores, proofs, dump, wrapper, cvc4_binary, sys.exit('"{}" must be *.cvc or *.smt or *.smt2 or *.p or *.sy'.format( benchmark_basename)) - # If there is an ".expect" file for the benchmark, read the metadata - # from there, otherwise from the benchmark file. - metadata_filename = benchmark_path + '.expect' - if os.path.isfile(metadata_filename): - comment_char = '%' - else: - metadata_filename = benchmark_path - - metadata_lines = None - with open(metadata_filename, 'r') as metadata_file: - metadata_lines = metadata_file.readlines() - - benchmark_content = None - if metadata_filename == benchmark_path: - benchmark_content = ''.join(metadata_lines) - else: - with open(benchmark_path, 'r') as benchmark_file: - benchmark_content = benchmark_file.read() + benchmark_lines = None + with open(benchmark_path, 'r') as benchmark_file: + benchmark_lines = benchmark_file.readlines() + benchmark_content = ''.join(benchmark_lines) # Extract the metadata for the benchmark. scrubber = None @@ -196,7 +182,7 @@ def run_regression(unsat_cores, proofs, dump, wrapper, cvc4_binary, expected_exit_status = None command_lines = [] requires = [] - for line in metadata_lines: + for line in benchmark_lines: # Skip lines that do not start with a comment character. if line[0] != comment_char: continue |