-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make sure config space, nfsroot and mirror exists before creating the…
… ISO
- Loading branch information
Showing
1 changed file
with
22 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,37 @@ | ||
#! /bin/bash | ||
|
||
# test fai-cd | ||
|
||
set -e | ||
# create fai-cd | ||
|
||
. ./debian/tests/common.sh | ||
trap "cp -vp fai-cd.log $AUTOPKGTEST_ARTIFACTS" INT QUIT EXIT | ||
cd "$AUTOPKGTEST_TMP" | ||
|
||
mdir=/tmp/mirror | ||
|
||
if [ ! -d /srv/fai/config ]; then | ||
fai-mk-configspace | ||
fi | ||
if [ ! -d /srv/fai/nfsroot ]; then | ||
fai-make-nfsroot -zg | ||
fi | ||
chk-size /srv/fai/nfsroot 950 | ||
chk-file /srv/fai/nfsroot/var/tmp/packages.nfsroot | ||
chk-file /srv/fai/nfsroot/var/tmp/base-pkgs.lis | ||
|
||
if [ ! -d $mdir ]; then | ||
echo "Creating package mirror $mdir" | ||
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" | ||
fi | ||
chk-size $mdir 550 | ||
|
||
# - - - - - - - - - - - - - - - - - | ||
fai-cd -Jm /tmp/mirror faicd64-small.iso >& fai-cd.log | ||
echo "Call fai-cd" | ||
fai-cd -m $mdir faicd64-small.iso >& fai-cd.log | ||
echo fai-cd exit code: $? | ||
|
||
|
||
# test the results of the commands called | ||
chk-size faicd64-small.iso 730 | ||
chk-size faicd64-small.iso 830 | ||
|
||
if [ X$NO_CLEANUP != X1 ]; then | ||
rm -rf /tmp/mirror | ||
rm -rf $mdir | ||
fi |