aboutsummaryrefslogblamecommitdiff
path: root/examples/tutch/test_checks.sh
blob: 975ea4cadb3c5671673119c6326f8e1b01817210 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                    
#!/bin/sh

make -s autograde

for f in test_handins/*.tar; do
    base=`basename -s .tar ${f}`
    tmp=`mktemp -d`
    cp ../autograde.tar ${tmp}
    cp test_handins/${base}.tar ${tmp}/handin.tar
    cp ../autograde-Makefile ${tmp}
    echo "\e[41m!!!!!!! Last 10 output lines for test ${base}:\e[0m"
    (cd ${tmp}; make -s -f autograde-Makefile | tail -n 10)
    echo "\e[42m!!!!!!! Expected result:\e[0m"
    cat test_handins/${base}.exp
    rm -fr ${tmp}
done