poldek: poldek/tests/sh/lib/shunit2, poldek/tests/sh/lib/setup - -...

mis mis at pld-linux.org
Mon Jan 21 15:50:45 CET 2008


Author: mis                          Date: Mon Jan 21 14:50:45 2008 GMT
Module: poldek                        Tag: HEAD
---- Log message:
- --runtest testname runs testname only

---- Files affected:
poldek/poldek/tests/sh/lib:
   shunit2 (1.4 -> 1.5) , setup (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: poldek/poldek/tests/sh/lib/shunit2
diff -u poldek/poldek/tests/sh/lib/shunit2:1.4 poldek/poldek/tests/sh/lib/shunit2:1.5
--- poldek/poldek/tests/sh/lib/shunit2:1.4	Sun Jul  1 22:46:56 2007
+++ poldek/poldek/tests/sh/lib/shunit2	Mon Jan 21 15:50:40 2008
@@ -702,8 +702,12 @@
   for _su_func in ${__shunit_suite}; do
     # disable skipping
     endSkipping
-
+    if [ -n "$RUNTEST_ONLY" ]; then
+       [ "$RUNTEST_ONLY" != "${_su_func}" ] && continue;
+    fi    
     # execute the per-test setup function
+    SU_FUNC="${_su_func}"    
+    export SU_FUNC    
     setUp
 
     # execute the test

================================================================
Index: poldek/poldek/tests/sh/lib/setup
diff -u poldek/poldek/tests/sh/lib/setup:1.4 poldek/poldek/tests/sh/lib/setup:1.5
--- poldek/poldek/tests/sh/lib/setup:1.4	Mon Jun 25 17:43:42 2007
+++ poldek/poldek/tests/sh/lib/setup	Mon Jan 21 15:50:40 2008
@@ -23,6 +23,7 @@
 
 MAXLOOP=60
 VERBOSE=""
+RUNTEST_ONLY=
 
 while test $# -gt 0 ; do
     case "${1}" in
@@ -34,13 +35,15 @@
             
         -n) shift; MAXLOOP="${1}"; shift ;;
 
+        --runtest)
+            shift; RUNTEST_ONLY="${1}"; shift ;;
         -h)
             echo "Usage: $(basename $0) [--source-repo REPO] [-v] [-n NUM]"
             echo '    --source-repo  - source (read-only) repository for *-repo tests'
             echo "    -v             - be verbose"
             echo '    -n NUM         - do NUM iteration in *-loop tests'
+            echo '    --runtest NAME - run NAME test only'
             exit 0; shift ;;
-
         *)
             echo "unknown option ${1}; try -h"; exit 1;
     esac
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/tests/sh/lib/shunit2?r1=1.4&r2=1.5&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/tests/sh/lib/setup?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list