-
Notifications
You must be signed in to change notification settings - Fork 49
/
run_tests
executable file
·35 lines (25 loc) · 1.15 KB
/
run_tests
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 mhd.test_spec
#python -m unittest -v mhd.test_spec -k test_integrated_stellopt_scenarios_2dof
# Example of running a specific test that matches a pattern:
#python -m unittest -v -k test_change_resolution
# Run all tests:
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 -v core.test_mpi
#done