From: Martin Mares Date: Sun, 10 Jun 2007 16:14:36 +0000 (+0200) Subject: Check: return proper exit code. X-Git-Tag: python-dummy-working~364 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=40ce544840cdbdccc1fbfb4af95cfa97f6e30db4;p=eval.git Check: return proper exit code. --- diff --git a/public/check b/public/check index be2f99f..d5fecff 100755 --- a/public/check +++ b/public/check @@ -1,3 +1,4 @@ +#!/bin/bash # The Evaluator -- Public Checking Script # (c) 2001--2004 Martin Mares @@ -14,7 +15,11 @@ public-setup function test-verdict { pend "$2" - exit 0 + if [ $1 == 0 ] ; then + exit 1 + else + exit 0 + fi } if [ $TASK_TYPE == open-data ] ; then @@ -29,12 +34,14 @@ else [ -z "$2" ] || die "Test number should be given only for open data problems." locate-source compile + RC=0 for TEST in $SAMPLE_TESTS ; do ( pstart "Checking on sample input $TEST: " test-run syntax-check output-check - ) + ) || RC=1 done + exit $RC fi