~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/tests/upstream

  • Committer: Paul Larson
  • Date: 2012-11-06 16:22:13 UTC
  • Revision ID: paul.larson@canonical.com-20121106162213-h5b1swp11qnihrx4
Fix debian/tests/upstream: Make the test script count the number of test
failures, declare them at the end of the test run, and exit with the
number of failed tests. (LP: #1075612)

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
unset LANG
10
10
unset LANGUAGE
11
11
export LC_ALL=C
 
12
fails=0
12
13
cd tests
13
14
 
14
15
for test in \
256
257
    touch/trailing-slash \
257
258
; do
258
259
    echo "$test"
259
 
    OUT=$($test 2>&1) || { echo "FAIL:"; echo "$OUT"; }
 
260
    OUT=$($test 2>&1) || { fails=$((fails+1)); echo "FAIL:"; echo "$OUT"; }
260
261
done
 
262
 
 
263
echo $fails tests failed
 
264
exit $fails