| 1 |
#! /bin/bash |
| 2 |
|
| 3 |
# create fai-cd |
| 4 |
|
| 5 |
. ./debian/tests/common.sh |
| 6 |
trap "cp -vp fai-cd.log $AUTOPKGTEST_ARTIFACTS" INT QUIT EXIT |
| 7 |
|
| 8 |
mdir=/tmp/mirror |
| 9 |
|
| 10 |
if [ ! -d /srv/fai/config ]; then |
| 11 |
fai-mk-configspace |
| 12 |
fi |
| 13 |
if [ ! -d /srv/fai/nfsroot ]; then |
| 14 |
fai-make-nfsroot -zg |
| 15 |
fi |
| 16 |
chk-size /srv/fai/nfsroot 750 |
| 17 |
chk-file /srv/fai/nfsroot/var/tmp/packages.nfsroot |
| 18 |
chk-file /srv/fai/nfsroot/var/tmp/base-pkgs.lis |
| 19 |
|
| 20 |
if [ ! -d $mdir ]; then |
| 21 |
echo "Creating package mirror $mdir" |
| 22 |
su $AUTOPKGTEST_NORMAL_USER -s /bin/bash -c "fai-mirror -v -s$CS -m1 -xARM64,I386,ROCKY,UBUNTU,FOCAL,CLOUD,CHROOT,STANDARD,NONFREE,GNOME $mdir >& /tmp/mirror.log" |
| 23 |
fi |
| 24 |
chk-size $mdir 550 |
| 25 |
|
| 26 |
# - - - - - - - - - - - - - - - - - |
| 27 |
echo "Call fai-cd" |
| 28 |
fai-cd -m $mdir faicd64-small.iso >& fai-cd.log |
| 29 |
echo fai-cd exit code: $? |
| 30 |
|
| 31 |
|
| 32 |
# test the results of the commands called |
| 33 |
chk-size faicd64-small.iso 830 |
| 34 |
|
| 35 |
if [ X$NO_CLEANUP != X1 ]; then |
| 36 |
rm -rf $mdir |
| 37 |
fi |