-
Notifications
You must be signed in to change notification settings - Fork 1
/
testsuite.sh
executable file
·71 lines (63 loc) · 1.62 KB
/
testsuite.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
66
67
68
69
70
71
#!/bin/bash
#
# set -euo pipefail
#TODO: make optionnal set -x
TestWD="/data/geometries"
TestsAxi="test M9_Be M9Bitters M9_HLtest Oxford1 Oxford HTS-dblpancake-test2 HTS-pancake-test2 HTS-tape-test2 MNougat"
echo_success() {
echo -en "[\033[32m OK \033[39m]"
echo
return 0
}
echo_failure() {
echo -en "[\033[31mFAILED\033[39m]"
echo
return 1
}
echo "Axi CAD generation"
for test in ${TestsAxi}; do
echo -en "${test} : "
python -m python_magnetgmsh.cli ${test}.yaml --wd ${TestWD} --thickslit > ${test}_gmsh.log 2>&1
status=$?
if [ "$status" != "0" ]; then
echo_failure
exit 1
else
echo_success
fi
done
echo "Axi CAD generation with Air"
for test in ${TestsAxi}; do
echo -en "${test} : "
python -m python_magnetgmsh.cli ${test}.yaml --wd ${TestWD} --thickslit --air 10 6 > ${test}_withAir_gmsh.log 2>&1
status=$?
if [ "$status" != "0" ]; then
echo_failure
exit 1
else
echo_success
fi
done
echo "Axi Mesh generation with Gmsh"
for test in ${TestsAxi}; do
echo -en "${test} : "
python -m python_magnetgmsh.cli ${test}.yaml --wd ${TestWD} --thickslit --mesh > ${test}_mesh_gmsh.log 2>&1
status=$?
if [ "$status" != "0" ]; then
echo_failure
exit 1
else
echo_success
fi
done
echo "Axi Mesh generation with Gmsh (with Air)"
for test in ${TestsAxi}; do
echo -en "${test} : "
python -m python_magnetgmsh.cli ${test}.yaml --wd ${TestWD} --thickslit --air 10 6 --mesh > ${test}_withAir_mesh_gmsh.log 2>&1
status=$?
if [ "$status" != "0" ]; then
echo_failure
else
echo_success
fi
done