git-lfs/script/integration

47 lines
807 B
Plaintext
Raw Normal View History

#!/bin/sh
. "test/testenv.sh"
2015-05-19 01:09:32 +00:00
set -e
SHUTDOWN_LFS=no
SHOW_LOGS=yes
atexit() {
2015-05-19 01:09:32 +00:00
res=${1:-$?}
SHUTDOWN_LFS=yes
if [ "$res" = "0" ]; then
SHOW_LOGS=no
fi
2015-05-19 00:15:24 +00:00
if [ "$SHOW_LOGS" = "yes" ]; then
if [ -s "$REMOTEDIR/gitserver.log" ]; then
echo ""
echo "gitserver.log:"
cat "$REMOTEDIR/gitserver.log"
fi
echo ""
echo "env:"
env
fi
shutdown
2015-05-19 01:09:32 +00:00
exit $res
}
trap "atexit" EXIT
if [ -s "$LFS_URL_FILE" ]; then
SHOW_LOGS=no
echo "$LFS_URL_FILE still exists!"
2015-05-19 00:12:17 +00:00
echo "Confirm other tests are done, and run:"
echo " $ curl $(cat "$LFS_URL_FILE")/shutdown"
exit 1
fi
setup
2015-05-19 01:09:32 +00:00
for file in test/test-*.sh; do
echo "0$(cat .$(basename $file).time 2>/dev/null || true) $file"
done | sort -rnk1 | awk '{ print $2 }' | xargs -I % -P 4 -n 1 /bin/sh -c % --batch