Skip to content

Instantly share code, notes, and snippets.

@tdeebswihart
Created October 23, 2016 22:02
Show Gist options
  • Save tdeebswihart/a69ec63d9354c0bdcf934c8889350852 to your computer and use it in GitHub Desktop.
Save tdeebswihart/a69ec63d9354c0bdcf934c8889350852 to your computer and use it in GitHub Desktop.
#!/bin/bash
if (( $# < 2 )); then
echo "usage: $0 modref|escape TESTCASE"
exit 1
fi
test ! -d "examples/$2" && echo "unknown example $2">&2 && exit 1
case "$1" in
modref)
ant -Dchord.work.dir=examples/$2/ modref
echo "[+] Note: < is from reference but not yours, > is in yours but not reference"
echo "[+] modInstField"
diff sample_output/$2/modInstField.txt examples/$2/chord_output/modInstField.txt
echo "[+] refInstField"
diff sample_output/$2/refInstField.txt examples/$2/chord_output/refInstField.txt
echo "[+] refStatField"
diff sample_output/$2/refStatField.txt examples/$2/chord_output/refStatField.txt
echo "[+] modStatField"
diff sample_output/$2/modStatField.txt examples/$2/chord_output/modStatField.txt
;;
escape)
ant -Dchord.work.dir=examples/$2/ escape
echo "[+] Note: < is from reference but not yours, > is in yours but not reference"
echo "[+] localMH"
diff sample_output/$2/localMH.txt examples/$2/chord_output/localMH.txt
;;
*) echo "unknown analysis $1" >&2
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment