From: Alain Spineux Date: Mon, 19 Oct 2020 16:28:56 +0000 (+0200) Subject: regress: virtual-backup-test add XPARAM USE_SCHEDULER X-Git-Tag: Release-11.3.2~854 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbbe7b6f8a349a73f34143ce490fc3a81fc6f1f2;p=thirdparty%2Fbacula.git regress: virtual-backup-test add XPARAM USE_SCHEDULER - use : USE_SCHEDULER=yes tests/virtual-backup-test to run the program via the scheduler instead of the "run" command the scheduler fire the job maximum 2min after the start of the program --- diff --git a/regress/tests/virtual-backup-test b/regress/tests/virtual-backup-test index 450bac05a..2e8413a74 100755 --- a/regress/tests/virtual-backup-test +++ b/regress/tests/virtual-backup-test @@ -10,17 +10,37 @@ # # This script uses the disk autochanger # +# XPARAM USE_SCHEDULER=(no|yes) +# if yes then schedule the job for 2min in the future instead of using a "run" +# TestName="virtual-backup-test" JobName=Vbackup . scripts/functions - scripts/cleanup scripts/copy-migration-confs scripts/prepare-disk-changer echo "${cwd}/build" >${cwd}/tmp/file-list change_jobname NightlySave $JobName + +USE_SCHEDULER=${USE_SCHEDULER:-no} +if [ "$USE_SCHEDULER" = "yes" ] ; then + $bperl -e "add_attribute('$conf/bacula-dir.conf', 'Schedule', 'Vbackup', 'Job', 'Vbackup')" + now_plus_2min=`python -c "import time; print(time.strftime('%H:%M', time.localtime(time.time()+119)))"` + echo $conf/bacula-dir.conf + cat >> $conf/bacula-dir.conf <