bsdcontrol.rb/bin/run-superuser-tests

24 lines
436 B
Bash
Executable file

#!/bin/sh
set -e
##
# main
if [ "$(id -u)" != "0" ]; then
echo "This script must be run by root"
exit 1
fi
bundle exec rake clean clobber compile
rm -rf tmp/
for test in test/superuser/*_test.rb; do
log=".$(basename "${test}")_log.txt"
if ruby -Ilib "${test}" --no-use-color > "${log}" 2>&1; then
printf "."
rm "${log}"
else
cat "${log}"
rm "${log}"
exit 1
fi
done
echo