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
|
#!/usr/bin/env bash
# For the license, see the LICENSE file in the root directory.
ROOT=${abs_top_builddir:-$(pwd)/..}
TESTDIR=${abs_top_testdir:-$(dirname "$0")}
DIR=${PWD}
WORKDIR=$(mktemp -d)
. "${TESTDIR}/common"
function cleanup()
{
rm -rf "${WORKDIR}"
}
trap "cleanup" QUIT EXIT
pushd "$WORKDIR" &>/dev/null || exit 1
"${DIR}/${1}"
rc=$?
if ! fs=$(get_filesize NVChip); then
exit 1
fi
exp=176832
if [ "$fs" -ne "$exp" ]; then
echo "Error: Unexpected size of NVChip file."
echo "Expected: $exp"
echo "Got : $fs"
rc=1
fi
popd &>/dev/null || exit 1
exit $rc
|