-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
ci_setup_test.sh
executable file
·86 lines (69 loc) · 2.29 KB
/
ci_setup_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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/sh
set -e
if [ -z "${DIR_TEST_DOSEMU}" ] ; then
echo env var "DIR_TEST_DOSEMU" is empty or missing
exit 1
fi
if [ -z "${DIR_INSTALLED_FDPP}" ] ; then
echo env var "DIR_INSTALLED_FDPP" is empty or missing
exit 1
fi
test -d ${DIR_TEST_DOSEMU} && (echo $DIR_TEST_DOSEMU already exists && exit 1)
DIR_ROOT="$(pwd)"
# Grab the dosemu2 source
git clone --depth 1 --no-single-branch https://github.com/dosemu2/dosemu2.git ${DIR_TEST_DOSEMU}
# Install fdpp into local directory
if false ; then
make install prefix="${DIR_ROOT}/${DIR_INSTALLED_FDPP}"
else
meson install -C ${DIR_ROOT}/build
fi
(
cd ${DIR_TEST_DOSEMU} || exit 2
[ -z "${USE_DOSEMU_BRANCH}" ] || git checkout "${USE_DOSEMU_BRANCH}"
# Remove fdpp-dev from debian build dependencies (use bash as padding)
sed -i -e 's/fdpp-dev,/bash,/' debian/control
# Use debian package build deps so we don't have to maintain a list here
sudo add-apt-repository ppa:stsp-0/dj64
sudo add-apt-repository -y ppa:dosemu2/ppa
mk-build-deps --install --root-cmd sudo
CC=clang ./default-configure -d \
--with-fdpp-lib-dir=${DIR_ROOT}/${DIR_INSTALLED_FDPP}/lib/fdpp \
--with-fdpp-include-dir=${DIR_ROOT}/${DIR_INSTALLED_FDPP}/include \
--with-fdpp-pkgconf-dir=${DIR_ROOT}/${DIR_INSTALLED_FDPP}/lib/pkgconfig
make
# Install the FAT mount helper
sudo cp test/dosemu_fat_mount.sh /bin/.
sudo chown root.root /bin/dosemu_fat_mount.sh
sudo chmod 755 /bin/dosemu_fat_mount.sh
# Install the TAP helper
sudo cp test/dosemu_tap_interface.sh /bin/.
sudo chown root.root /bin/dosemu_tap_interface.sh
sudo chmod 755 /bin/dosemu_tap_interface.sh
# Install the extra packages needed to run the test suite
sudo add-apt-repository -y ppa:dosemu2/ppa
sudo add-apt-repository -y ppa:jwt27/djgpp-toolchain
sudo add-apt-repository -y ppa:stsp-0/gcc-ia16
sudo apt update -q
sudo apt install -y \
comcom32 \
python3-cpuinfo \
python3-pexpect \
mtools \
gcc-djgpp \
djgpp-dev \
qemu-system-common \
gcc-ia16-elf \
libi86-ia16-elf \
libi86-testsuite-ia16-elf \
nasm \
gcc-multilib \
dos2unix \
bridge-utils \
libvirt-daemon \
libvirt-daemon-system
# Prepare the cputests
make -C test/cpu clean all
# Get the test binaries
test/test_dos.py --get-test-binaries
)