Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ def run_all_tests():
run_result = run_test(test_runner_vi, os.path.join(test_directory, test))
# run_result will be None for PASSED tests
if(run_result != None):
failed_test_results += run_result
failed_test_results += run_result
if (failed_test_results != ""):
_logger.exception(failed_test_results)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that makes sense. _logger.exception takes a str but it expects to be called from an except block.
https://docs.python.org/3/library/logging.html#logging.Logger.exception

_logger.error(failed_test_results)
sys.exit(1)

def run_test(WrapperVI, testVI):
if os.path.exists(testVI):
Expand All @@ -39,7 +40,7 @@ def run_test(WrapperVI, testVI):
stderr=subprocess.PIPE,
shell=False)


try:
out, err = testResult.communicate(timeout=60) # TODO: find if this timeout can be eliminated
except subprocess.TimeoutExpired:
Expand Down
Loading