luet/tests/integration/run.sh

27 lines
676 B
Bash
Raw Normal View History

2019-12-31 14:22:11 +00:00
#!/bin/bash
set -e
export LUET_NO_SPINNER=true
2020-11-29 11:02:46 +00:00
export LUET_YES=true
2019-12-31 14:22:11 +00:00
export ROOT_DIR="$(git rev-parse --show-toplevel)"
pushd $ROOT_DIR
go build -o "$ROOT_DIR/tests/integration/bin/luet"
popd
[ ! -d "$ROOT_DIR/tests/integration/shunit2" ] && git clone https://github.com/kward/shunit2.git "$ROOT_DIR/tests/integration/shunit2"
export PATH=$ROOT_DIR/tests/integration/bin/:$PATH
2021-01-22 10:50:39 +00:00
if [ -z "$SINGLE_TEST" ]; then
for script in $(ls "$ROOT_DIR/tests/integration/" | grep '^[0-9]*_.*.sh'); do
echo "Executing test '$script'."
$ROOT_DIR/tests/integration/$script
done
else
echo "Executing test '$SINGLE_TEST'."
$ROOT_DIR/tests/integration/$SINGLE_TEST
fi