2019-03-05 03:43:53 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-01-24 08:34:21 +03:00
|
|
|
stack test urbit-king --fast
|
2019-12-11 10:39:52 +03:00
|
|
|
|
2019-05-02 23:13:48 +03:00
|
|
|
pkg=$(nix-build nix/ops -A test --no-out-link "$@")
|
2019-03-05 03:43:53 +03:00
|
|
|
|
|
|
|
hdr () {
|
|
|
|
echo =====$(sed 's/./=/g' <<< "$1")=====
|
|
|
|
echo ==== $1 ====
|
|
|
|
echo =====$(sed 's/./=/g' <<< "$1")=====
|
|
|
|
}
|
|
|
|
|
|
|
|
for f in $(find $pkg/ -type f)
|
|
|
|
do
|
|
|
|
hdr $(basename $f)
|
|
|
|
cat $f
|
|
|
|
done
|
|
|
|
|
|
|
|
fail=0
|
|
|
|
|
|
|
|
for f in $(find "$pkg/" -type f)
|
|
|
|
do
|
2019-08-09 09:31:15 +03:00
|
|
|
if egrep "((FAILED|CRASHED)|(ford|warn):) " $f >/dev/null
|
2019-03-05 03:43:53 +03:00
|
|
|
then
|
|
|
|
if [[ $fail -eq 0 ]]
|
|
|
|
then
|
|
|
|
hdr "Test Failures"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "ERROR Test failure in $(basename $f)"
|
|
|
|
((fail++))
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [[ $fail -eq 0 ]]
|
|
|
|
then
|
|
|
|
hdr "Success"
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit "$fail"
|