b3edb1fb72
Instead of executing in the current (build) directory, create a temporary directory and change into it before running any tests. This ensures that tests aren't relying on left-overs from previous test runs. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
18 lines
331 B
Bash
18 lines
331 B
Bash
|
|
basedir=$(cd $srcdir && pwd)
|
|
datadir=$(pwd)
|
|
bindir="$datadir/.."
|
|
|
|
sbsign=$bindir/sbsign
|
|
sbverify=$bindir/sbverify
|
|
sbattach=$bindir/sbattach
|
|
|
|
key="$datadir/private-key.rsa"
|
|
cert="$datadir/public-cert.pem"
|
|
image="$datadir/test.pecoff"
|
|
|
|
tempdir=$(mktemp --directory)
|
|
exit_trap='rm -rf $tempdir'
|
|
trap "$exit_trap" EXIT
|
|
|
|
cd "$tempdir"
|