mariadb/scripts/tokucilkscreen
Rich Prohaska 2c48825160 #3822 append cilkscreen errors to stderr closes[t:3822]
git-svn-id: file:///svn/toku/tokudb@33433 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:59:46 -04:00

19 lines
No EOL
416 B
Bash
Executable file

#!/usr/bin/env bash
# exit 1 if cilkscreen finds errors
function cleanup() {
if [ "$logfile" != "" ] ; then rm $logfile; logfile=; fi
}
trap cleanup SIGINT
logfile=$(mktemp /tmp/toku_cilkscreen.XXXXXXXX)
cilkscreen $* 2>$logfile
exitcode=$?
if [ $exitcode = 0 ] ; then
cat $logfile >>/dev/fd/2
grep "No errors found by Cilkscreen" $logfile >/dev/null 2>&1
exitcode=$?
fi
rm $logfile
exit $exitcode