bsdcontrol.rb/bin/run-superuser-tests

25 lines
436 B
Text
Raw Normal View History

2024-03-08 00:27:20 +01:00
#!/bin/sh
set -e
2024-05-13 02:16:56 +02:00
##
# main
2024-10-12 18:55:37 +02:00
if [ "$(id -u)" != "0" ]; then
2024-05-13 02:16:56 +02:00
echo "This script must be run by root"
2024-03-08 00:27:20 +01:00
exit 1
fi
2024-10-12 18:55:37 +02:00
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