-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_tests.sh
executable file
·65 lines (52 loc) · 2.41 KB
/
run_tests.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# source configuration
echo "Source configuration in setup_cluster_conf.sh ..."
source setup_cluster_conf.sh || exit $?
# Source virtual environment
echo -e "\nSource virtual environment..."
echo "source ${VENV_ACTIVATE}"
source $VENV_ACTIVATE || exit $?
VENV_NAME=$(basename ${VENV_PREFIX})
echo -e "\nSubmit test jobs to the clusters ${TEST_CLUSTERS}..."
for CLUSTER in $TEST_CLUSTERS; do
CLUSTER_LD_LIBRARY_PATH=/usr/nld/atlas-${ATLAS_VERSION}-${CLUSTER}${ATLAS_SUFFIX}/lib:${GCC_LD_LIBRARY_PATH}
# Test GridMap
echo -e "\nTest GridMap on cluster ${CLUSTER}..."
python -c "import gridmap; import test_gridmap; \
print(gridmap.grid_map(test_gridmap.get_environment, [None], \
name='${VENV_NAME}-test-gridmap-${CLUSTER}', queue='${CLUSTER}.q', \
${TEST_GRIDMAP_PARAMS},
add_env={'LD_LIBRARY_PATH': '${CLUSTER_LD_LIBRARY_PATH}'}))" &
# Test NumPy on cluster
echo -e "\nTest NumPy via GridMap on cluster ${CLUSTER}..."
python -c "import gridmap; import test_gridmap; \
gridmap.grid_map(test_gridmap.run_numpy_tests, [None], \
name='${VENV_NAME}-test-numpy-${CLUSTER}', queue='${CLUSTER}.q', \
${TEST_GRIDMAP_PARAMS},
add_env={'LD_LIBRARY_PATH': '${CLUSTER_LD_LIBRARY_PATH}'})" &
# Test SciPy on cluster
echo -e "\nTest SciPy via GridMap on cluster ${CLUSTER}..."
python -c "import gridmap; import test_gridmap; \
gridmap.grid_map(test_gridmap.run_scipy_tests, [None], \
name='${VENV_NAME}-test-scipy-${CLUSTER}', queue='${CLUSTER}.q', \
${TEST_GRIDMAP_PARAMS},
add_env={'LD_LIBRARY_PATH': '${CLUSTER_LD_LIBRARY_PATH}'})" &
# Test h5py on cluster
echo -e "\nTest h5py via GridMap on cluster ${CLUSTER}..."
python -c "import gridmap; import test_gridmap; \
gridmap.grid_map(test_gridmap.run_h5py_tests, [None], \
name='${VENV_NAME}-test-h5py-${CLUSTER}', queue='${CLUSTER}.q', \
${TEST_GRIDMAP_PARAMS},
add_env={'LD_LIBRARY_PATH': '${CLUSTER_LD_LIBRARY_PATH}'})" &
done
# Test NumPy on login
echo -e "\nTest NumPy on this machine..."
python -c 'import numpy; numpy.show_config()' || exit $?
python -c 'import numpy; numpy.test()' || exit $?
# Test SciPy on login
echo -e "\nTest SciPy on this machine..."
python -c 'import scipy; scipy.show_config()' || exit $?
python -c 'import scipy; scipy.test()' || exit $?
# Test h5py on login
echo -e "\nTest h5py on this machine..."
python -c 'import h5py; h5py.run_tests()' || exit $?