From 40ce544840cdbdccc1fbfb4af95cfa97f6e30db4 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 10 Jun 2007 18:14:36 +0200 Subject: [PATCH] Check: return proper exit code. --- public/check | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 -- 2.39.2