[Regressions] Support for running w/ default args (#3436)
authorAndres Noetzli <andres.noetzli@gmail.com>
Tue, 5 Nov 2019 01:04:04 +0000 (17:04 -0800)
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 5 Nov 2019 01:04:04 +0000 (19:04 -0600)
test/regress/run_regression.py

index c7eef8a1df2740bfa4f270ded220b986bd18e5f0..d445264fb3875bace1cdf650001758d15a175a63 100755 (executable)
@@ -18,13 +18,13 @@ import subprocess
 import sys
 import threading
 
-SCRUBBER = 'SCRUBBER: '
-ERROR_SCRUBBER = 'ERROR-SCRUBBER: '
-EXPECT = 'EXPECT: '
-EXPECT_ERROR = 'EXPECT-ERROR: '
-EXIT = 'EXIT: '
-COMMAND_LINE = 'COMMAND-LINE: '
-REQUIRES = 'REQUIRES: '
+SCRUBBER = 'SCRUBBER:'
+ERROR_SCRUBBER = 'ERROR-SCRUBBER:'
+EXPECT = 'EXPECT:'
+EXPECT_ERROR = 'EXPECT-ERROR:'
+EXIT = 'EXIT:'
+COMMAND_LINE = 'COMMAND-LINE:'
+REQUIRES = 'REQUIRES:'
 
 EXIT_OK = 0
 EXIT_FAILURE = 1
@@ -219,17 +219,17 @@ def run_regression(unsat_cores, proofs, dump, use_skip_return_code, wrapper,
         line = line[1:].lstrip()
 
         if line.startswith(SCRUBBER):
-            scrubber = line[len(SCRUBBER):]
+            scrubber = line[len(SCRUBBER):].strip()
         elif line.startswith(ERROR_SCRUBBER):
-            error_scrubber = line[len(ERROR_SCRUBBER):]
+            error_scrubber = line[len(ERROR_SCRUBBER):].strip()
         elif line.startswith(EXPECT):
-            expected_output += line[len(EXPECT):]
+            expected_output += line[len(EXPECT):].strip() + '\n'
         elif line.startswith(EXPECT_ERROR):
-            expected_error += line[len(EXPECT_ERROR):]
+            expected_error += line[len(EXPECT_ERROR):].strip() + '\n'
         elif line.startswith(EXIT):
-            expected_exit_status = int(line[len(EXIT):])
+            expected_exit_status = int(line[len(EXIT):].strip())
         elif line.startswith(COMMAND_LINE):
-            command_lines.append(line[len(COMMAND_LINE):])
+            command_lines.append(line[len(COMMAND_LINE):].strip())
         elif line.startswith(REQUIRES):
             requires.append(line[len(REQUIRES):].strip())
     expected_output = expected_output.strip()