Created
May 12, 2014 04:56
-
-
Save henryyang42/05247f4580dadb65ae38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
read -p "Which to test? [1:open 2:hidden(not yet used) 3:student]: " sel | |
if [ "$sel" = "1" ]; then | |
place="open_testcase/" | |
array=(fib_r error pipeline1 pipeline2 pipeline3) | |
fi | |
if [ "$sel" = "2" ]; then | |
place="hidden_testcase/" | |
array=(bubble_sort seq error1 multiply) | |
fi | |
if [ "$sel" = "3" ]; then | |
place="valid_testcase/" | |
array=(archi01 archi09 archi13 archi18 archi24 archi28 archi34 archi39 archi48 | |
archi02 archi10 archi15 archi21 archi25 archi29 archi35 archi40 archi49 | |
archi05 archi11 archi16 archi22 archi26 archi30 archi36 archi41 archi50 | |
archi08 archi12 archi17 archi23 archi27 archi33 archi37 archi42 | |
) | |
fi | |
ct=0 | |
for file in "${array[@]}" | |
do | |
make clean | |
ct=$(( ct + 1 )) | |
echo "Case #$ct: $place$file " | |
cp $place$file"/iimage.bin" iimage.bin | |
cp $place$file"/dimage.bin" dimage.bin | |
cp $place$file"/snapshot.rpt" snapshot_ans.rpt | |
cp $place$file"/error_dump.rpt" error_dump_ans.rpt | |
make | |
./pipeline | |
cp snapshot.rpt $place$file"/snapshot_pipeline.rpt" | |
cp error_dump.rpt $place$file"/error_dump_pipeline.rpt" | |
echo 'snapshot diff: ' | |
#diff snapshot_ans.rpt snapshot.rpt | |
if [ "$sel" = "1" ]; then | |
diff snapshot_ans.rpt snapshot.rpt | |
fi | |
echo 'error_dump diff: ' | |
diff error_dump_ans.rpt error_dump.rpt | |
rm *.rpt *.bin | |
echo "==================================" | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment