Improve test runscript to avoid false positives when an output is not generated

This commit is contained in:
Maxime Coste 2016-05-10 13:43:19 +01:00
parent 39762f0cf0
commit 1160c51dc4

View File

@ -8,11 +8,14 @@ main() {
dirs="${@:-.}"
test=$(pwd)
work=$(mktemp -d /tmp/kak-tests.XXXXXXXX)
cp -R . $work
trap "rm -R $work" EXIT
for dir in $(find $dirs -type d | sort); do
cd $test/$dir;
test_files=$(ls out selections state display 2>/dev/null)
mkdir -p $work/$dir
for file in $(ls in cmd rc 2>/dev/null); do
cp $file $work/$dir/
done
cd $work/$dir;
indent="$(echo "${dir}/" | sed -e 's|[^/]*/\+| |g')"
name=$(basename $PWD)