File: run_tests_standalone_with_openmp.py

package info (click to toggle)
brian 2.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,872 kB
  • sloc: python: 51,820; cpp: 2,033; makefile: 108; sh: 72
file content (19 lines) | stat: -rw-r--r-- 760 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'''
Run all the standalone tests using pytest. Exits with error code 1 if a test failed.
'''
import sys

import brian2

if __name__ == '__main__':
    if len(sys.argv) > 1 and sys.argv[1] == 'no-parallel':
        if not brian2.test([], test_codegen_independent=False,
                           test_standalone='cpp_standalone',
                           test_in_parallel=[],
                           test_openmp=True):  # If the test fails, exit with a non-zero error code
            sys.exit(1)
    else:
        if not brian2.test([], test_codegen_independent=False,
                           test_standalone='cpp_standalone',
                           test_openmp=True):  # If the test fails, exit with a non-zero error code
            sys.exit(1)