-
Notifications
You must be signed in to change notification settings - Fork 49
/
run_tests_mpi
executable file
·35 lines (25 loc) · 1.12 KB
/
run_tests_mpi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# To enable python to discover tests, test files should be named
# test*.py and be located in a directory that includes an __init__.py
# file.
# For the test*.py files to be able to import the modules correctly,
# you should either run this command from the project root directory,
# or else set the PYTHONPATH environment variable to the project's
# root directory.
set -ex
# In the above line, "set -x" causes this script to exit as soon as any line fails. "set -e" causes each line of this script to be printed (with a + in front) before it is executed, so if a step fails, you can see from the travis log what command failed.
cd tests
# Example of running all tests for a specific module:
#python -m unittest -v core.test_mpi
# Example of running a specific test that matches a pattern:
#python -m unittest -v -k mpi
# Run all tests:
#/opt/local/bin/python -m unittest -v
# -v for verbose
#cd examples
#cd examples && ./stellopt_scenarios_1DOF_circularCrossSection_varyR0_targetVolume
for j in {1..3}
do
mpiexec -n $j python -m unittest -k mpi
#mpiexec -n $j python -m unittest -v core.test_mpi -k test_fd_jac
done