-
Notifications
You must be signed in to change notification settings - Fork 257
/
testrunner
executable file
·65 lines (54 loc) · 976 Bytes
/
testrunner
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
set -e
set -o pipefail
set -u
#
# Run a simple backup, set it to archive and do a copy.
#
TestName="$(basename "$(pwd)")"
export TestName
JobName=backup-bareos-fd
#shellcheck source=../environment.in
. ./environment
#shellcheck source=../scripts/functions
. "${rscripts}"/functions
"${rscripts}"/cleanup
"${rscripts}"/setup
# Fill ${BackupDirectory} with data.
setup_data
start_test
cat <<END_OF_DATA >"$tmp/bconcmds"
@$out /dev/null
messages
@$out $tmp/log1.out
setdebug level=100 storage=File
label volume=TestVolume001 storage=File pool=Full
run job=$JobName yes
status director
status client
status storage=File
wait
messages
@#
@# do the 1st copy
@#
@$out $tmp/log2.out
wait
run job=copy-job1 yes
wait
messages
@#
@# do the 2nd copy
@#
@$out $tmp/log3.out
wait
run job=copy-job2 yes
wait
messages
quit
END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
check_sd_files_written $tmp/log2.out
check_sd_files_written $tmp/log3.out
end_test