Skip to content

Instantly share code, notes, and snippets.

@nikomatsakis
Created October 18, 2017 17:56
Show Gist options
  • Save nikomatsakis/a015676e24cf86da49cf1025a52f407c to your computer and use it in GitHub Desktop.
Save nikomatsakis/a015676e24cf86da49cf1025a52f407c to your computer and use it in GitHub Desktop.
if [ -z "$1" ]; then
echo "Usage: runtest.sh <file.rs> <options>"
exit 1
fi
rm -rf incr
mkdir incr
TEST=$1
shift
REVISIONS=$(re "// ?revisions: ?(.*)" '$1' $TEST)
for rev in $REVISIONS; do
echo "Revision $rev >& killme.$TEST.$rev"
OPTIONS="-Z incremental=incr -Z incremental-info -Z query-dep-graph"
echo " rustc $@ --cfg $rev $TEST $OPTIONS"
if rustc "$@" --cfg $rev $TEST $OPTIONS >& killme.$TEST.$rev; then
echo " -> compilation successful"
else
echo " -> compilation failed"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment