Skip to content

Commit

Permalink
webui tests: enable running on installed files from package
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Jan 24, 2020
1 parent 4c50d96 commit ac7e7bc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions systemtests/CMakeLists.txt
Expand Up @@ -245,6 +245,7 @@ macro(prepare_testdir_for_daemon_run)
set(piddir ${current_test_directory}/piddir)

set(backenddir ${BACKEND_DIR_TO_TEST})
set(BAREOS_WEBUI_PUBLIC_DIR ${WEBUI_PUBLIC_DIR_TO_TEST})

if(RUN_SYSTEMTESTS_ON_INSTALLED_FILES)
set(bin /bin)
Expand Down Expand Up @@ -408,6 +409,8 @@ if(RUN_SYSTEMTESTS_ON_INSTALLED_FILES)
set(SD_PLUGINS_DIR_TO_TEST ${PLUGINS_DIR_TO_TEST})
set(DIR_PLUGINS_DIR_TO_TEST ${PLUGINS_DIR_TO_TEST})
set(BACKEND_DIR_TO_TEST ${BACKEND_DIR_TO_TEST})
set(WEBUI_PUBLIC_DIR_TO_TEST /usr/share/bareos-webui/public)

else() # run systemtests on source and compiled files

foreach(BINARY ${ALL_BINARIES_BEING_USED_BY_SYSTEMTESTS})
Expand All @@ -420,13 +423,15 @@ else() # run systemtests on source and compiled files
get_target_property(BACKEND_DIR_TO_TEST bareoscats BINARY_DIR)

set(SCRIPTS_DIR_TO_TEST ${CMAKE_BINARY_DIR}/core/scripts)
set(WEBUI_PUBLIC_DIR_TO_TEST ${PROJECT_SOURCE_DIR}/../webui/public)

endif()

message(" FD_PLUGINS_DIR_TO_TEST: ${PLUGINS_DIR_TO_TEST}")
message(" SD_PLUGINS_DIR_TO_TEST: ${PLUGINS_DIR_TO_TEST}")
message(" DIR_PLUGINS_DIR_TO_TEST: ${PLUGINS_DIR_TO_TEST}")
message(" FD_PLUGINS_DIR_TO_TEST: ${FD_PLUGINS_DIR_TO_TEST}")
message(" SD_PLUGINS_DIR_TO_TEST: ${SD_PLUGINS_DIR_TO_TEST}")
message(" DIR_PLUGINS_DIR_TO_TEST: ${DIR_PLUGINS_DIR_TO_TEST}")
message(" BACKEND_DIR_TO_TEST: ${BACKEND_DIR_TO_TEST}")
message(" WEBUI_PUBLIC_DIR_TO_TEST: ${WEBUI_PUBLIC_DIR_TO_TEST}")

# extract db version from cats.h
file(STRINGS ${CMAKE_SOURCE_DIR}/core/src/cats/cats.h DB_VERSION_STRING
Expand Down
2 changes: 2 additions & 0 deletions systemtests/environment.in
Expand Up @@ -92,6 +92,8 @@ export BAREOS_WEBUI_CLIENT_NAME=bareos-fd
export BAREOS_WEBUI_RESTOREFILE=${PROJECT_BINARY_DIR}
export BAREOS_WEBUI_LOG_PATH=${logdir}
export BAREOS_WEBUI_DELAY=1
export BAREOS_WEBUI_PUBLIC_DIR=@BAREOS_WEBUI_PUBLIC_DIR@


#
# oVirt Plugin Test
Expand Down
2 changes: 1 addition & 1 deletion systemtests/tests/webui-common/testrunner.in
Expand Up @@ -36,7 +36,7 @@ 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@ -S 127.0.0.1:@php_port@ -t @BAREOS_WEBUI_PUBLIC_DIR@ >"$tmp/php.out" 2>&1 &

PHP_PID=$(echo $!)

Expand Down

0 comments on commit ac7e7bc

Please sign in to comment.