From 2d950075a26591a24ddefa6e1bc8d0edc85515ef Mon Sep 17 00:00:00 2001 From: Laura Casswell Date: Fri, 3 Sep 2004 14:53:47 +0000 Subject: [PATCH] make more general This commit was SVN r2480. --- test/threads/run_tests | 43 +++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/test/threads/run_tests b/test/threads/run_tests index 809239b869..25e5f4d977 100755 --- a/test/threads/run_tests +++ b/test/threads/run_tests @@ -8,8 +8,8 @@ # # test_list = no args runs all tests # or -# condition runs ompi_condition tests -# thread runs ompi_thread tests +# ompi_condition runs ompi_condition tests +# ompi_thread runs ompi_thread tests # Usage # @@ -24,15 +24,36 @@ umask 007 if ("x$1" == "x") then ./ompi_thread ./ompi_condition -else if ("$1" == "condition") then - ./ompi_condition -else if ("$1" == "thread") then - ./ompi_thread -else - echo "correct use: " - echo " run_tests (to run all thread tests)" - echo "or run_tests " - exit -1 +else + foreach target ($argv) + switch ($target) + case "all": + ./ompi_condition + ./ompi_thread + breaksw + case "ompi_condition": + ./ompi_condition + breaksw + case "ompi_thread": + ./ompi_thread + breaksw + case "help" + echo "correct use: " + echo " run_tests help (this message)" + echo " run_tests all (to run all thread tests)" + echo "or run_tests and any of the following:" + echo " " + break + breaksw + default: + echo "There is no program <$target> to run" + echo "correct use: " + echo " run_tests all (to run all thread tests)" + echo "or run_tests and any of the following:" + echo " " + break + endsw + end endif