test: improve semi-manual testing

This commit is contained in:
2022-01-21 16:38:47 +01:00
parent c7062e0494
commit 57728e58e8
8 changed files with 88 additions and 21 deletions

24
tests/integration/test_all.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
if [ -z $1 ]; then
echo "usage: ./test_all.sh logdir"
exit
fi
res_dir=$1/
if [[ ! -d "$res_dir" ]]; then
mkdir "$res_dir"
fi
# Usage: run_test [number] [name] [command]
run_test () {
logfile="$res_dir/$1-$2.log"
echo $logfile
}
testScripts=("app.sh" "recipe.sh" "install.sh")
for i in "${testScripts[@]}"; do
cmd="./$i $res_dir${i/sh/log}"
eval $cmd
done