forked from libAtoms/ExPyRe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
complete_pytest.tin
executable file
·40 lines (34 loc) · 1.12 KB
/
complete_pytest.tin
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
#!/bin/bash
# export EXPYRE_PYTEST_SYSTEMS='(tin|mustang)'
export EXPYRE_PYTEST_SYSTEMS='tin|tin_ssh'
echo "GIT VERSION " $( git describe --always --tags --dirty ) > complete_pytest.tin.out
echo "" >> complete_pytest.tin.out
cat<<EOF > definitely_queued_job.json
{"tin":
[ {"max_time": "1h", "num_nodes": 1, "partitions": "n2019"},
{"max_time": "1h", "num_nodes": 38, "partitions": "n2019"} ]
}
EOF
export EXPYRE_PYTEST_QUEUED_JOB_RESOURCES=$PWD/definitely_queued_job.json
export EXPYRE_LOCAL_HOST=tin
rm -rf $HOME/pytest_expyre*
if [[ $EXPYRE_PYTEST_SYSTEMS =~ mustang ]]; then
ssh $KMUSTANG rm -rf pytest_expyre_rundir_mustang
fi
pytest --clean --basetemp $HOME/pytest_expyre "$@" >> complete_pytest.tin.out 2>&1
l=`egrep '^\s*=+.* passed' complete_pytest.tin.out`
echo $l | grep -q -v 'skipped'
if [ $? != 0 ]; then
echo "Unexpected number skipped not 0 '$l'" 1>&2
exit 1
fi
echo $l | grep -q ' 29 passed'
if [ $? != 0 ]; then
echo "Unexpected number passed not 30 '$l'" 1>&2
exit 1
fi
echo $l | grep -q -v 'xfailed'
if [ $? != 0 ]; then
echo "Unexpected number xfailed not 0 '$l'" 1>&2
exit 1
fi