Unverified Commit fd263401 authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2523 from jaimergp/testInstallation-error-code

testInstallation: raise exception if large differences are observed
parents 1796f668 33c6131e
...@@ -91,6 +91,8 @@ def run_tests(): ...@@ -91,6 +91,8 @@ def run_tests():
if errorsOk: if errorsOk:
print() print()
print('All differences are within tolerance.') print('All differences are within tolerance.')
else:
raise Exception("Large differences observed. See messages above.")
def main(): def main():
...@@ -105,7 +107,7 @@ def main(): ...@@ -105,7 +107,7 @@ def main():
run_tests() run_tests()
except Exception as err: except Exception as err:
print('Problem with OpenMM installation ' print('Problem with OpenMM installation '
'encountered. OpenMM will not work until the problem ' 'encountered. OpenMM will not work correctly until the problem '
'has been fixed.\n\n', 'has been fixed.\n\n',
file=sys.stderr) file=sys.stderr)
print('Error message: %s' % str(err), file=sys.stderr) print('Error message: %s' % str(err), file=sys.stderr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment