From: Garrett C. <ris...@li...> - 2010-06-20 12:39:08
|
The branch, pu, has been updated via cfa4725eebab047fed5abe607404eb21a1a30619 (commit) from b90b372e4a1e06c7a1e08ca0e2f291b543592faf (commit) - Log ----------------------------------------------------------------- commit cfa4725eebab047fed5abe607404eb21a1a30619 Author: Garrett Cooper <yan...@gm...> Date: Sun Jun 20 05:36:27 2010 -0700 Yank bashisms and cleanup script inconsistencies. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../open_posix_testsuite/functional/mqueues/run.sh | 35 ++++++++++--------- .../functional/semaphores/run.sh | 33 ++++++++++-------- .../open_posix_testsuite/functional/threads/run.sh | 2 +- .../open_posix_testsuite/functional/timers/run.sh | 36 +++++++++++-------- 4 files changed, 59 insertions(+), 47 deletions(-) diff --git a/testcases/open_posix_testsuite/functional/mqueues/run.sh b/testcases/open_posix_testsuite/functional/mqueues/run.sh index 2f3135c..95606df 100755 --- a/testcases/open_posix_testsuite/functional/mqueues/run.sh +++ b/testcases/open_posix_testsuite/functional/mqueues/run.sh @@ -11,39 +11,42 @@ RunTest() { echo "TEST: " $1 - TOTAL=$TOTAL+1 + : $(( TOTAL += 1 )) ./$1 - if [ $? == 0 ]; then - PASS=$PASS+1 - echo -ne "\t\t\t***TEST PASSED***\n\n" + if [ $? -eq 0 ]; then + : $(( PASS += 1 )) + echo " ***TEST PASSED***" + echo "" else - FAIL=$FAIL+1 - echo -ne "\t\t\t***TEST FAILED***\n\n" + : $(( FAIL += 1 )) + echo " ***TEST FAILED***" + echo "" fi } # Main program -declare -i TOTAL=0 -declare -i PASS=0 -declare -i FAIL=0 +TOTAL=0 +PASS=0 +FAIL=0 # Add lists of tests to these variables for execution TESTS="notify.test send_rev_1.test send_rev_2.test" echo "Run the message queue functional tests" -echo "==========================================" +echo "=====================" for test in $TESTS; do RunTest $test done -echo -echo -ne "\t\t****************\n" -echo -ne "\t\t* TOTAL: " $TOTAL "\n" -echo -ne "\t\t* PASSED: " $PASS "\n" -echo -ne "\t\t* FAILED: " $FAIL "\n" -echo -ne "\t\t****************\n" +cat <<EOF + **************** + * TOTAL: $TOTAL + * PASSED: $PASS + * FAILED: $FAIL + **************** +EOF exit 0 diff --git a/testcases/open_posix_testsuite/functional/semaphores/run.sh b/testcases/open_posix_testsuite/functional/semaphores/run.sh index a25e411..955b5b8 100755 --- a/testcases/open_posix_testsuite/functional/semaphores/run.sh +++ b/testcases/open_posix_testsuite/functional/semaphores/run.sh @@ -13,37 +13,40 @@ RunTest() echo "TEST: " $1 TOTAL=$TOTAL+1 ./$1 - if [ $? == 0 ]; then - PASS=$PASS+1 - echo -ne "\t\t\t***TEST PASSED***\n\n" + if [ $? -eq 0 ]; then + : $(( PASS += 1 )) + echo " ***TEST PASSED***" + echo "" else - FAIL=$FAIL+1 - echo -ne "\t\t\t***TEST FAILED***\n\n" + : $(( FAIL += 1 )) + echo " ***TEST FAILED***" + echo "" fi } # Main program -declare -i TOTAL=0 -declare -i PASS=0 -declare -i FAIL=0 +TOTAL=0 +PASS=0 +FAIL=0 # Add lists of tests to these variables for execution TESTS="sem_conpro.test sem_lock.test sem_philosopher.test sem_readerwriter.test sem_sleepingbarber.test" echo "Run the semaphore functional tests" -echo "==========================================" +echo "=====================" for test in $TESTS; do RunTest $test done -echo -echo -ne "\t\t****************\n" -echo -ne "\t\t* TOTAL: " $TOTAL "\n" -echo -ne "\t\t* PASSED: " $PASS "\n" -echo -ne "\t\t* FAILED: " $FAIL "\n" -echo -ne "\t\t****************\n" +cat <<EOF + **************** + * TOTAL: $TOTAL + * PASSED: $PASS + * FAILED: $FAIL + **************** +EOF exit 0 diff --git a/testcases/open_posix_testsuite/functional/threads/run.sh b/testcases/open_posix_testsuite/functional/threads/run.sh index d5f1081..eaf3313 100755 --- a/testcases/open_posix_testsuite/functional/threads/run.sh +++ b/testcases/open_posix_testsuite/functional/threads/run.sh @@ -7,7 +7,7 @@ for test_dir in $TEST_DIRS; do echo "" echo "Run $test_dir tests" -echo "==============================" +echo "===============" echo "" cd $CURRENT_DIR/$test_dir; ./run.sh diff --git a/testcases/open_posix_testsuite/functional/timers/run.sh b/testcases/open_posix_testsuite/functional/timers/run.sh index 62c1f32..8832eca 100755 --- a/testcases/open_posix_testsuite/functional/timers/run.sh +++ b/testcases/open_posix_testsuite/functional/timers/run.sh @@ -11,46 +11,52 @@ RunTest() { echo "TEST: " $1 + : $(( TOTAL += 1 )) $1 - if [ $? == 0 ]; then - PASS=$PASS+1 - echo -ne "\t\t\t***TEST PASSED***\n\n" + if [ $? -eq 0 ]; then + : $(( PASS += 1 )) + echo " ***TEST PASSED***" + echo "" else - FAIL=$FAIL+1 - echo -ne "\t\t\t***TEST FAILED***\n\n" + : $(( FAIL += 1 )) + echo " ***TEST FAILED***" + echo "" fi } # Main program -declare -i PASS=0 -declare -i FAIL=0 +TOTAL=0 +PASS=0 +FAIL=0 # Add lists of tests to these variables for execution CLOCKSTESTS="clocks/twopsetclock.test" TIMERSTESTS="timers/twoevtimers.test timers/twoptimers.test" echo "Run the clocks and timers functional tests" -echo "==========================================" +echo "=====================" echo "Run clocks tests" -echo "================" +echo "========" for test in $CLOCKSTESTS; do RunTest $test done echo "Run timers tests" -echo "================" +echo "========" for test in $TIMERSTESTS; do RunTest $test done -echo -echo -ne "\t\t\t****************\n" -echo -ne "\t\t\t* PASSED: " $PASS "\n" -echo -ne "\t\t\t* FAILED: " $FAIL "\n" -echo -ne "\t\t\t****************\n" +cat <<EOF + **************** + * TOTAL: $TOTAL + * PASSED: $PASS + * FAILED: $FAIL + **************** +EOF exit 0 hooks/post-receive -- ltp |