forked from freebsd/freebsd-ports-libreoffice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
porttest.sh
executable file
·53 lines (40 loc) · 1.08 KB
/
porttest.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
#!/bin/sh
PORT=editors/libreoffice
PORTSDIR=/usr/ports
set -ex
pwd
cd /usr
mv ports ports.old
git clone --depth=1 --single-branch -b main https://github.com/freebsd/freebsd-ports.git ports
cd ${CIRRUS_WORKING_DIR}
for p in `cat list.txt`
do
if [ -d ${PORTSDIR}/${p}/ ]; then
rm -fr ${PORTSDIR}/${p}/*
else
mkdir -p ${PORTSDIR}/${p}
fi
cp -R ./${p}/* ${PORTSDIR}/${p}/
done
mkdir /usr/ports/distfiles
df -h
echo "NO_ZFS=yes" >> /usr/local/etc/poudriere.conf
echo "ALLOW_MAKE_JOBS=yes" >> /usr/local/etc/poudriere.conf
sed -i.bak -e 's,FREEBSD_HOST=_PROTO_://_CHANGE_THIS_,FREEBSD_HOST=https://download.FreeBSD.org,' /usr/local/etc/poudriere.conf
mkdir -p /usr/local/poudriere
poudriere jail -c -j jail -v `uname -r`
poudriere ports -c -f none -m null -M /usr/ports
set +e
poudriere testport -b latest -j jail ${PORT}
RESULT=$?
if [ ${RESULT} -eq 0 ]; then
exit 0
fi
set -e
ls -l /usr/local/poudriere/data/logs/bulk/jail-default/latest/logs/errors
for i in /usr/local/poudriere/data/logs/bulk/jail-default/latest/logs/errors/*.log
do
echo ==== $i ====
cat $i
done
exit ${RESULT}