-
-
Save Somsubhra/91ffc8890fa146bcb43e to your computer and use it in GitHub Desktop.
tsh Evaluation Script
This file contains hidden or 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/sh | |
| # Script for evaluation of tsh lab | |
| # @author: Somsubhra (@s7a) | |
| # | |
| # Instructions for using this script: | |
| # 1. Place the submission files in a directory called 'submissions' | |
| # at the root of the tsh folder. | |
| # 2. Place this script file at the root of the tsh folder. | |
| # 3. chmod a+x <this_script_file_name> | |
| # 4. ./<this_script_file_name> | |
| # 5. Results are written to 'result' directory. | |
| make clean | |
| mkdir "result" | |
| mkdir "result/submissions" | |
| mkdir "result/result" | |
| mkdir "result/result/submissions" | |
| for entry in "submissions"/* | |
| do | |
| make clean | |
| mv "$entry" tsh.c | |
| make | |
| for iter in $(seq -f "%02g" 1 16) | |
| do | |
| make "test$iter" >> "result/$entry.out" | |
| done | |
| done | |
| for entry in "result/submissions"/* | |
| do | |
| diff "$entry" tshref.out > "result/$entry.diff" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment