forked from dosemu2/dosemu2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci_test.sh
executable file
·69 lines (58 loc) · 1.75 KB
/
ci_test.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
#!/bin/sh
set -e
# Get any test binaries we need
TBINS="test-binaries"
THOST="http://www.spheresystems.co.uk/test-binaries"
if [ "${TRAVIS}" = "true" ] ; then
export CI="true"
if [ "${TRAVIS_EVENT_TYPE}" = "cron" ] ; then
export CI_EVENT="cron"
fi
export CI_BRANCH="${TRAVIS_BRANCH}"
elif [ "${GITHUB_ACTIONS}" = "true" ] ; then
# CI is already set
if [ "${GITHUB_EVENT_NAME}" = "scheduled" ] ; then
export CI_EVENT="cron"
fi
export CI_BRANCH="$(echo ${GITHUB_REF} | cut -d/ -f3)"
fi
if [ "${CI}" = "true" ] ; then
[ -d "${HOME}"/cache ] || mkdir "${HOME}"/cache
[ -h "${TBINS}" ] || ln -s "${HOME}"/cache "${TBINS}"
else
[ -d "${TBINS}"] || mkdir "${TBINS}"
fi
(
cd "${TBINS}" || exit 1
[ -f DR-DOS-7.01.tar ] || wget ${THOST}/DR-DOS-7.01.tar
[ -f FR-DOS-1.20.tar ] || wget ${THOST}/FR-DOS-1.20.tar
[ -f MS-DOS-6.22.tar ] || wget ${THOST}/MS-DOS-6.22.tar
[ -f VARIOUS.tar ] || wget ${THOST}/VARIOUS.tar
)
echo
echo "====================================================="
echo "= Tests run on various flavours of DOS ="
echo "====================================================="
# all DOS flavours, all tests
# python3 test/test_dos.py
# single DOS example
# python3 test/test_dos.py FRDOS120TestCase
# single test example
# python3 test/test_dos.py FRDOS120TestCase.test_mfs_fcb_rename_wild_1
if [ "${CI_EVENT}" = "cron" ] ; then
if [ "${TRAVIS}" = "true" ] ; then
python3 test/test_dos.py PPDOSGITTestCase MSDOS622TestCase FRDOS120TestCase
else
python3 test/test_dos.py
fi
else
if [ "${CI_BRANCH}" = "devel" ] ; then
python3 test/test_dos.py PPDOSGITTestCase MSDOS622TestCase
else
python3 test/test_dos.py PPDOSGITTestCase
fi
fi
for i in test_*.*.*.log ; do
test -f $i || exit 0
done
exit 1