summaryrefslogtreecommitdiff
path: root/tests/runtest.bat
diff options
context:
space:
mode:
authorrpj <rpj>1999-10-16 16:24:42 +0000
committerrpj <rpj>1999-10-16 16:24:42 +0000
commit8c238590dc9ad996710abc28a1868e9f1a41ab0a (patch)
tree972e0edb16402e27c7cc3248c6273fe65bac59e7 /tests/runtest.bat
parentcd324bb05bc5c76589c2ef7a2fcce61345100682 (diff)
1999-10-17 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* rwlock.c (pthread_rwlock_destroy): Add cast to remove compile warning. * condvar.c (pthread_cond_broadcast): Only release semaphores if there are waiting threads. 1999-10-15 Ross Johnson <rpj@ixobrychus.canberra.edu.au> * condvar.c (cond_wait_cleanup): New static cleanup handler for cond_timedwait; (cond_timedwait): pthread_cleanup_push args changed; canceling a thread while it's in pthread_cond_wait will now decrement the waiters count and cleanup if it's the last waiter. - Lorin Hochstein <lmh@xiphos.ca> and Peter Slacik <Peter.Slacik@tatramed.sk>; the last waiter will now reset the CV's wasBroadcast flag - Graham Dumpleton <Graham.Dumpleton@ra.pad.otc.telstra.com.au>.
Diffstat (limited to 'tests/runtest.bat')
-rw-r--r--tests/runtest.bat25
1 files changed, 21 insertions, 4 deletions
diff --git a/tests/runtest.bat b/tests/runtest.bat
index 4a06505..73fae97 100644
--- a/tests/runtest.bat
+++ b/tests/runtest.bat
@@ -1,7 +1,11 @@
@echo off
-REM Usage: runtest cl|gcc testname testarg ...
+REM Usage: runtest cl|gcc testname prerequisit testarg ...
+if %3==_ goto noprereq
+if NOT EXIST %3.pass goto needprereq
+
+:noprereq
if EXIST %2.pass goto bypass
REM Make sure we start with only those files we expect to need
@@ -30,11 +34,15 @@ REM erase ..\%2.%1log
echo TEST: %2 [%1]
REM Run the test case
-aout.exe %3 %4 %5 %6 %7 %8 %9
+if EXIST %2.pass erase %2.pass
+if EXIST %2.fail erase %2.fail
+if EXIST %2.notrun erase %2.notrun
+aout.exe %4 %5 %6 %7 %8 %9
set RESULT=%ERRORLEVEL%
-if %RESULT% EQU 0 echo Passed [%RESULT%] > ..\%2.pass
+if %RESULT% NEQ 0 echo Failed [%RESULT%] > ..\%2.fail
+if %RESULT% EQU 0 echo Passed > ..\%2.pass
:cleanup
@@ -43,6 +51,15 @@ cd ..
REM Clean up
if exist tmp\*.* echo y | erase tmp\*.* > nul:
+if EXIST %2.fail echo Failed [%RESULT%]
if EXIST %2.pass echo Passed [%RESULT%]
-:bypass \ No newline at end of file
+:bypass
+goto end
+
+:needprereq
+echo Test %2 requires %3 to pass before it can run.
+echo No Prereq > ..\%2.notrun
+goto end
+
+:end