Skip to content

Commit

Permalink
Running on all test files
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosta Buda committed Nov 4, 2015
1 parent e110fbe commit 97435f9
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions CStests/test-results.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
#!/bin/bash

#===================
# Dowload school tests files
# 1. unzip
# 1. create sol (folder)
# 1. copy all executables here
# 2. create tests (folder)
# 1. copy all test files here
#
# 3. run this script without cc
# ./test-results.sh <exercise name>
#=====================

for i in $(seq 1 3);
do
g++ -Wall $1.cc -o $1

./sol/$1 < ./tests/$1_test$i.in > $1.out
./$1 < ./tests/$1_test$i.in > $1_hw
./sol/$1 < ./tests/$1_test$i.in > $1_$i.out
./$1 < ./tests/$1_test$i.in > $1_$i.hw.out
diff $1_$i.out $1_$i.hw.out
done;

diff $1.out $1_hw

0 comments on commit 97435f9

Please sign in to comment.