#! /bin/bash

# test fai-cd

set -e

. ./debian/tests/common.sh
trap "cp -vp fai-cd.log $AUTOPKGTEST_ARTIFACTS" INT QUIT EXIT
cd "$AUTOPKGTEST_TMP"


# - - - - - - - - - - - - - - - - -
fai-cd -Jm /tmp/mirror faicd64-small.iso >& fai-cd.log
echo fai-cd exit code: $?


# test the results of the commands called
chk-size faicd64-small.iso 730

if [ X$NO_CLEANUP != X1 ]; then
    rm -rf /tmp/mirror
fi
