]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: modify arun to run a test with all possible XPARAM values
authorAlain Spineux <alain@baculasystems.com>
Thu, 4 Aug 2022 12:55:14 +0000 (14:55 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:59 +0000 (13:56 +0200)
Using the option --xparam will run tests/copy-job-test 27 times
with every SPOOLDATA_JOB, SPOOLDATA_RUN, NEXT_NODEDUP possible values:

$ grep XPARAM tests/copy-job-test
tests/copy-job-test:# XPARAM SPOOLDATA_JOB=(default|yes|no)
tests/copy-job-test:# XPARAM SPOOLDATA_RUN=(default|yes|no)
tests/copy-job-test:# XPARAM NEXT_NODEDUP=(default|yes|no)

regress/scripts/functions

index b406dc126597cb6c23f6cc447dbb7b698195643a..4a961d42d50523a1b5cc85dac3a5619d2a8f7bef 100755 (executable)
@@ -324,8 +324,8 @@ reset_test()
    ./test_starttime
    echo " "
    echo " "
-   echo " === Start $TestName ${variant_name} at `date +%R:%S` ==="
-   echo " === Start $TestName ${variant_name} at `date +%R:%S` ===" >> ${working}/log
+   echo " === Start $TestName ${variant_name} ${XPARAM_LABEL} at `date +%R:%S` ==="
+   echo " === Start $TestName ${variant_name} ${XPRAM_LABEL} at `date +%R:%S` ===" >> ${working}/log
    echo " "
    export TestName
    export zstat
@@ -675,11 +675,11 @@ EOF
          $bperl -e "check_openfile('/proc/$pid/fd')"
          if [ $? -ne 0 ]; then
             echo " "
-            echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! "
+            echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! "
             echo "     Files still open!!"
             echo " " >>test.out
             echo " " >>test.out
-            echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out
+            echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! " >>test.out
             echo "     Files still open!!" >>test.out
             echo " "
             estat=1
@@ -690,11 +690,11 @@ EOF
       $bperl -e 'check_jobmedia()'
       if [ $? -ne 0 ]; then
          echo " "
-         echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! "
+         echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! "
          echo "     JobMedia is corrupted"
          echo " " >>test.out
          echo " " >>test.out
-         echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out
+         echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! " >>test.out
          echo "     JobMedia is corrupted" >>test.out
          echo " "
          estat=1
@@ -704,11 +704,11 @@ EOF
       $bperl -e 'check_encryption("$tmp/log1.out")'
       if [ $? -ne 0 ]; then
          echo " "
-         echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! "
+         echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! "
          echo "     Encryption problem"
          echo " " >>test.out
          echo " " >>test.out
-         echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out
+         echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! " >>test.out
          echo "     Encryption problem" >>test.out
          echo " "
          estat=1
@@ -718,11 +718,11 @@ EOF
       $bperl -e 'check_json_tools()'
       if [ $? -ne 0 ]; then
          echo " "
-         echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! "
+         echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! "
          echo "     JSON Data is incorrect"
          echo " " >>test.out
          echo " " >>test.out
-         echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out
+         echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! " >>test.out
          echo "     JSON Data is incorrect" >>test.out
          echo " "
          estat=1
@@ -757,11 +757,11 @@ EOF
    ls ${working}/@* 2>/dev/null 1>/dev/null
    if test $? -eq 0 ; then
       echo " "
-      echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! "
+      echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! "
       echo "     SCSI lock still set"
       echo " " >>test.out
       echo " " >>test.out
-      echo "  !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out
+      echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! `date +%R:%S` !!!!! " >>test.out
       echo "     SCSI lock still set" >>test.out
       echo " "
       estat=1
@@ -1102,37 +1102,37 @@ end_test()
    t=`date +%R:%S`
    if [ "$ddestat" != 0 ] ; then
       echo " " | tee -a test.out
-      echo "  !!!!! $TestName ${variant_name} failed!!! $t $d !!!!! " | tee -a test.out
+      echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! $t $d !!!!! " | tee -a test.out
       echo "     Status: estat=$estat zombie=$zstat backup=$bstat restore=$rstat diff=$dstat verify=$vstat dde=$ddestat" | tee -a test.out
       echo " "
       exit 1
    fi
    if [ $estat != 0 ] ; then
       echo " "
-      echo "  !!!!! $TestName ${variant_name} failed!!! $t $d !!!!! "
+      echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! $t $d !!!!! "
       echo "     Status: estat=$estat zombie=$zstat backup=$bstat restore=$rstat diff=$dstat verify=$vstat"
       echo " " >>test.out
-      echo "  !!!!! $TestName ${variant_name} failed!!! $t $d !!!!! " >>test.out
+      echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! $t $d !!!!! " >>test.out
       echo "     Status: estat=$estat zombie=$zstat backup=$bstat restore=$rstat diff=$dstat verify=$vstat" >>test.out
       echo " "
       exit 1
    fi
    if [ $zstat != 0 ] ; then
       echo " "
-      echo "  !!!!! $TestName ${variant_name} failed!!! $t $d !!!!! "
+      echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! $t $d !!!!! "
       echo "     Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat verify=$vstat"
       echo " " >>test.out
-      echo "  !!!!! $TestName ${variant_name} failed!!! $t $d !!!!! " >>test.out
+      echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! $t $d !!!!! " >>test.out
       echo "     Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat verify=$vstat" >>test.out
       echo " "
       exit 1
    fi
    if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 -o $vstat != 0 ] ; then
       echo " "
-      echo "  !!!!! $TestName ${variant_name} failed!!! $t $d !!!!! "
+      echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! $t $d !!!!! "
       echo "     Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat verify=$vstat"
       echo " " >>test.out
-      echo "  !!!!! $TestName ${variant_name} failed!!! $t $d !!!!! " >>test.out
+      echo "  !!!!! $TestName ${variant_name} ${XPARAM_LABEL} failed!!! $t $d !!!!! " >>test.out
       echo "     Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat verify=$vstat" >>test.out
       if [ $bstat != 0 -o $rstat != 0 -o $vstat != 0 ] ; then
          echo "     !!! Bad termination status       !!! "