Skip to content

Commit

Permalink
regress: moved webui-bsock-connection-test to webui/tests/regress
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Jan 16, 2019
1 parent 7bfe2e2 commit f6acca5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
15 changes: 13 additions & 2 deletions webui/CMakeLists.txt
Expand Up @@ -34,7 +34,7 @@ ELSE()
ENDIF()


find_program(apxs APXS)
find_program(PHP php)

# set defaults
IF(NOT DEFINED sysconfdir)
Expand All @@ -59,6 +59,7 @@ set(CONFDIR "${confdir}")
set(WEBUICONFDIR "${webuiconfdir}")


MESSAGE(" PHP is ${PHP} ")
MESSAGE(" Install system config files: ${sysconfdir} ")
MESSAGE(" Install Bareos config dir: ${confdir} ")
MESSAGE(" Install BareosWebui configdir:${webuiconfdir} ")
Expand Down Expand Up @@ -88,8 +89,18 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/install/configuration.ini.in ${CMAKE_

CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.php.in ${CMAKE_CURRENT_SOURCE_DIR}/version.php @ONLY)


IF (PHP)
SET(WEBUI_DIR ${SHARE_INSTALL_PREFIX}/bareos-webui)
SET(WEBUI_TESTS_DIR ${WEBUI_DIR}/tests/regress)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/tests/regress/webui-bsock-connection-test.in ${CMAKE_CURRENT_SOURCE_DIR}/tests/regress/webui-bsock-connection-test @ONLY)
# FILE(APPEND ${CMAKE_CURRENT_SOURCE_DIR}/../regress/DartTestfile.txt.in "ADD_TEST(disk:webui-bsock-connection-test \"../webui/tests/regress/webui-bsock-connection-test\")")
ELSE()
MESSAGE("PHP not found")
ENDIF()

INSTALL(FILES version.php init_autoloader.php DESTINATION ${SHARE_INSTALL_PREFIX}/bareos-webui)
INSTALL(DIRECTORY config data module public vendor DESTINATION ${SHARE_INSTALL_PREFIX}/bareos-webui)
INSTALL(DIRECTORY tests config data module public vendor DESTINATION ${SHARE_INSTALL_PREFIX}/bareos-webui)

INSTALL(FILES install/bareos/bareos-dir.d/console/admin.conf.example DESTINATION ${confdir}/bareos-dir.d/console/)
INSTALL(FILES install/bareos/bareos-dir.d/profile/webui-admin.conf DESTINATION ${confdir}/bareos-dir.d/profile/)
Expand Down
Expand Up @@ -6,6 +6,10 @@
#
TestName="webui-bsock-connection-test"

PHP=@PHP@
WEBUI_TESTS_DIR=@WEBUI_TESTS_DIR@
WEBUI_DIR=@WEBUI_DIR@

. scripts/functions

scripts/cleanup
Expand All @@ -16,8 +20,9 @@ start_test

run_bareos

cp ./usr/share/bareos-webui/version.php .
php tests/webui-bsock-connection-test.php
cd ${WEBUI_DIR}
${PHP} ${WEBUI_TESTS_DIR}/webui-bsock-connection-test.php
cd -

estat_plain=$?

Expand Down

0 comments on commit f6acca5

Please sign in to comment.