Skip to content

Commit 0910c20

Browse files
committed
only add documentation (repo) URL to errors in test specification
1 parent 2f99f80 commit 0910c20

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

autotest.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
if __name__ == "__main__":
2222
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
2323

24-
from util import AutotestException
24+
from util import AutotestException, TestSpecificationError
2525
from command_line_arguments import process_arguments
2626
from copy_files_to_temp_directory import copy_files_to_temp_directory
2727
from run_tests import run_tests, generate_expected_output
@@ -37,19 +37,25 @@ def main():
3737
signal.signal(signal.SIGINT, lambda signum, frame: os._exit(2))
3838
try:
3939
sys.exit(run_autotest())
40+
except TestSpecificationError as e:
41+
print(f"{my_name}: {e}", file=sys.stderr)
42+
if debug:
43+
traceback.print_exc(file=sys.stderr)
44+
print("\n" + REPO_INFORMATION)
45+
sys.exit(2)
4046
except AutotestException as e:
4147
print(f"{my_name}: {e}", file=sys.stderr)
4248
if debug:
4349
traceback.print_exc(file=sys.stderr)
44-
print(REPO_INFORMATION)
50+
# print('\n' + REPO_INFORMATION)
4551
sys.exit(2)
4652
except Exception:
4753
etype, evalue, _etraceback = sys.exc_info()
4854
eformatted = "\n".join(traceback.format_exception_only(etype, evalue))
4955
print(f"{my_name}: internal error: {eformatted}", file=sys.stderr)
5056
if debug:
5157
traceback.print_exc(file=sys.stderr)
52-
print(REPO_INFORMATION)
58+
print("\n" + REPO_INFORMATION)
5359
sys.exit(2)
5460

5561

0 commit comments

Comments
 (0)