]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Add zstd-test
authorEric Bollengier <eric@baculasystems.com>
Tue, 12 Oct 2021 15:29:32 +0000 (17:29 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:56 +0000 (13:56 +0200)
regress/tests/zstd-test [new file with mode: 0755]

diff --git a/regress/tests/zstd-test b/regress/tests/zstd-test
new file mode 100755 (executable)
index 0000000..39c0e4d
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# Copyright (C) 2000-2020 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+# Run a simple backup of the Bacula build directory using the compressed option
+#   then restore it.
+#
+TestName="zstd-test"
+JobName=zstd
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-test-confs
+echo "${cwd}/build/po/fr.po" >${cwd}/tmp/file-list
+
+start_test
+      
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@output /dev/null
+messages
+@$out ${cwd}/tmp/log1.out
+setdebug level=1 client
+status all
+messages
+label storage=File volume=TestVolume001
+setdebug level=0 client
+run job=ZSTDTest storage=File yes
+run job=LZOTest storage=File yes
+wait
+messages
+@# 
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores fileset=ZSTDSet select storage=File
+unmark *
+mark *
+done
+yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File
+stop_bacula
+
+check_two_logs
+#check_restore_diff
+grep " Software Compression" ${cwd}/tmp/log1.out | grep "%" 2>&1 1>/dev/null
+if [ $? != 0 ] ; then
+   echo "  !!!!! No compression !!!!!"
+   bstat=1
+fi
+end_test