From 0429590e8e50824ef210a3c23126cb3000de3843 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 28 Jan 2010 08:23:08 +0000 Subject: [PATCH] Low intrusive tests can be handy, tuning output. --- org.glite.testsuites.ctb/LB/tests/lb-test-wild.sh | 59 +++++++++++------------ 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/org.glite.testsuites.ctb/LB/tests/lb-test-wild.sh b/org.glite.testsuites.ctb/LB/tests/lb-test-wild.sh index 41a033f..a0b61ed 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-test-wild.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-test-wild.sh @@ -39,8 +39,16 @@ EndHelpHeader echo " -n | --number Number of batches (default: 2)." echo " -v | --vo Virtual organization (default: 'voce')" echo " -w | --world World test (by default limited on CESNET node)" + echo " -t | --test Type of test (default: all). Possible tests:" + echo " done fail cancel done_coll fail_coll cancel_coll all" + echo " -f | --format output format (default: color), color/html/text" echo "" echo "where HOST is the LB server host, it must be specified everytime." + echo "" + echo "Example for low intrusive test (one job only per test and sequentially):" + echo " for t in done fail cancel done_coll fail_coll cancel_coll; do" + echo " ./lb-test-wild.sh -n 1 -w -f html --test $t" + echo " done" } @@ -55,6 +63,19 @@ do "-n" | "--number") shift && N=$1 ;; "-v" | "--vo") shift && VO="$1" ;; "-w" | "--world") NOREQ='#' ;; + "-t" | "--test") + shift + TEST="$1" + if test x"$TEST" = x"all"; then unset TEST; fi + ;; + "-f" | "--format") + shift + case "$1" in + "text") setOutputASCII ;; + "color") setOutputColor ;; + "html") setOutputHTML ;; + esac + ;; -*) ;; *) LB_HOST=$1 ;; esac @@ -80,18 +101,6 @@ function fatal() { } -function load() { - [ ! -f jobs.txt ] && return 0 - jobs=(`cat jobs.txt`) -} - - -function save() { - mv -f jobs.txt jobs-backup.txt - echo ${jobs[*]} | tr ' ' '\n' > jobs.txt -} - - # $1 - description # $2 - file prefix function submit() { @@ -298,36 +307,26 @@ function check_status() { rm -f log rm -rf jobOutput +touch $$.err voms-proxy-info >/dev/null || fatal 2 "No VOMS proxy certificate!" [ ! -z "${LB_HOST}" ] || fatal 2 "No L&B server specified!" -# check_binaries check_binaries $SYS_GREP $SYS_SED || fatal 2 "not all needed system binaries available" -#load -#trap '{ save; exit 0; }' INT fail=$TEST_OK # -- launch the beast -- -touch $$.err { test_start for ((pass=0;pass $$.err exit $fail -- 1.8.2.3