Advertisement
Guest User

interact.sh

a guest
May 29th, 2021
836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. cp ~/vimcp/Library/runner.py runner.py #Replace the first string with the path to runner.py!
  4.  
  5. for ((testNum=0;testNum<$3;testNum++))
  6. do
  7. python3 runner.py --command1-stdout-prefix "Pro: " --command2-stdout-prefix "Int: " ./$1 ./$2 > out
  8.  
  9. if [ "$(awk 'NF{p=$0}END{print p}' out)" != "Int: OK" ]
  10. then
  11. echo "Error found!"
  12. echo "Interaction:"
  13. cat out
  14. exit
  15. fi
  16. done
  17. echo Passed $3 tests
  18.  
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement