| 1 |
''' |
| 2 |
Run all the standalone tests using pytest. Exits with error code 1 if a test failed. |
| 3 |
''' |
| 4 |
import sys |
| 5 |
|
| 6 |
import brian2 |
| 7 |
|
| 8 |
if __name__ == '__main__': |
| 9 |
if len(sys.argv) > 1 and sys.argv[1] == 'no-parallel': |
| 10 |
if not brian2.test([], test_codegen_independent=False, |
| 11 |
test_standalone='cpp_standalone', |
| 12 |
test_in_parallel=[], |
| 13 |
test_openmp=True): # If the test fails, exit with a non-zero error code |
| 14 |
sys.exit(1) |
| 15 |
else: |
| 16 |
if not brian2.test([], test_codegen_independent=False, |
| 17 |
test_standalone='cpp_standalone', |
| 18 |
test_openmp=True): # If the test fails, exit with a non-zero error code |
| 19 |
sys.exit(1) |