/
testrunner.in
executable file
·60 lines (44 loc) · 1.1 KB
/
testrunner.in
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
#!/bin/sh
#
# Run a simple backup
# then restore it.
#
TestName="$(basename "$(pwd)")"
export TestName
JobName=backup-bareos-fd
. ./environment
. ${scripts}/functions
${scripts}/cleanup
${scripts}/setup
# Directory to backup.
# This directory will be created by setup_data().
BackupDirectory="${tmp}/data"
# Use a tgz to setup data to be backed up.
# Data will be placed at "${tmp}/data/".
setup_data
start_test
cat <<END_OF_DATA >$tmp/bconcmds
@$out /dev/null
messages
@$out $tmp/log1.out
run job=$JobName yes
wait
messages
quit
END_OF_DATA
run_bareos
@PHP@ -S 127.0.0.1:@php_port@ -t @PROJECT_SOURCE_DIR@/../webui/public/ >"$tmp/php.out" 2>&1 &
PHP_PID=$(echo $!)
# run tests but stop the test run on the first error or failure
#
# test with admin profile resource
#
export BAREOS_WEBUI_PROFILE=admin
export BAREOS_WEBUI_TESTNAME=test_client_disabling
echo "test with admin profile:" >"$tmp/selenium.out" 2>&1
@PYTHON@ @CMAKE_SOURCE_DIR@/webui/tests/selenium/webui-selenium-test.py -v SeleniumTest.test_client_disabling >>"$tmp/selenium.out" 2>&1
estat=$?
export estat
kill "${PHP_PID}"
stop_bareos
end_test