From ef84e74fc1f89fa8a6358da0cf4e04c287e85b5b Mon Sep 17 00:00:00 2001 From: Alain Spineux Date: Tue, 24 Nov 2020 14:34:04 +0100 Subject: [PATCH] regress: add DEDUP_CONFIG_FMT variable to select old or new config format - define DEDUP_CONFIG_FMT in your "config" file or better on the command line like REGRESS_DEBUG - values can be 1 or 2 - 1 the dedupengine is defined in the Storage resource - 2 the dedupengine is defined in a separate resource and the dedupengine directive is added to all devices (like the Device Type = Dedup) --- regress/scripts/functions | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/regress/scripts/functions b/regress/scripts/functions index 3f364d2c4..d25b6c7b3 100755 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -173,14 +173,25 @@ start_test() make -C build/src/plugins/fd install-test-dedup >/dev/null 2>&1 make -C build/scripts install-btools >/dev/null 2>&1 DEDUP_DRIVER=${DEDUP_DRIVER:-Legacy} + if [ "$DEDUP_DRIVER" = "Legacy" ] ; then + default_dedup_config_fmt="1" + else + default_dedup_config_fmt="2" + fi + DEDUP_CONFIG_FMT=${DEDUP_CONFIG_FMT:-$default_config_dedup_fmt} DEDUP_FS_OPTION=${DEDUP_FS_OPTION:-bothsides} mkdir ${working}/dde DEDUP_MAXIMUM_CONTAINER_SIZE=${DEDUP_MAXIMUM_CONTAINER_SIZE:-10MB} touch ${working}/dde/dde.conf # When dde.conf exists, DDE create a smaller Index $bperl -e 'add_attribute("$conf/bacula-sd.conf", "Plugin Directory", "$plugins", "Storage")' $bperl -e 'add_attribute("$conf/bacula-sd.conf", "Device Type", "Dedup", "Device")' - $bperl -e 'add_attribute("$conf/bacula-sd.conf", "Dedupengine", "Dedupengine1", "Device")' - cat >> $conf/bacula-sd.conf <> $conf/bacula-sd.conf <