Skip to content

Commit

Permalink
tests: winepath works
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Dec 6, 2019
1 parent b92fe77 commit 7eadd7d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
4 changes: 2 additions & 2 deletions core/CMakeLists.txt
Expand Up @@ -159,8 +159,8 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Windows")

# set WINEPATH so that cross-compiled .exe tests find their dlls
set(WINEPATH "Z:${MINGW_BINDIR}\\\\;")
string(APPEND WINEPATH "Z:${CMAKE_BINARY_DIR}/src/lib\\\\;")
string(APPEND WINEPATH "Z:${CMAKE_BINARY_DIR}/src/fastlz\\\\;")
string(APPEND WINEPATH "Z:${CMAKE_BINARY_DIR}/core/src/lib\\\\;")
string(APPEND WINEPATH "Z:${CMAKE_BINARY_DIR}/core/src/fastlz\\\\;")


MESSAGE(${WINEPATH})
Expand Down
8 changes: 4 additions & 4 deletions core/src/tests/CMakeLists.txt
Expand Up @@ -54,14 +54,13 @@ ENDIF()
file(RELATIVE_PATH RELATIVE_PROJECT_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_SOURCE_DIR} )
add_definitions(-DRELATIVE_PROJECT_SOURCE_DIR=\"${RELATIVE_PROJECT_SOURCE_DIR}\")

IF(NOT HAVE_WIN32)
####### test_lib ###############################
add_executable(test_lib
alist_test.cc
bareos_test_sockets.cc
# bareos_test_sockets.cc
dlist_test.cc
htable_test.cc
qualified_resource_name_type_converter_test.cc
#qualified_resource_name_type_converter_test.cc
lib_tests.cc
${PROJECT_SOURCE_DIR}/src/filed/evaluate_job_command.cc
)
Expand All @@ -82,6 +81,7 @@ target_compile_definitions(test_lib PRIVATE -DTEST_SMALL_HTABLE)
set_tests_properties(${found_tests}
PROPERTIES ENVIRONMENT "WINEPATH=${WINEPATH}" )

IF(NOT HAVE_WIN32)
####### test_fd_plugins #####################################
add_executable(test_fd_plugins
test_fd_plugins.cc
Expand Down Expand Up @@ -152,7 +152,7 @@ IF(NOT HAVE_WIN32)
####### test_bsock ###############################
add_executable(test_bsock
bsock_test.cc
bareos_test_sockets.cc
# bareos_test_sockets.cc
bsock_constructor_test.cc
bsock_cert_verify_common_names_test.cc
create_resource.cc
Expand Down
8 changes: 5 additions & 3 deletions core/src/tests/alist_test.cc
Expand Up @@ -2,7 +2,7 @@
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2003-2011 Free Software Foundation Europe e.V.
Copyright (C) 2015-2017 Bareos GmbH & Co. KG
Copyright (C) 2015-2019 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -27,10 +27,12 @@
* Philipp Storz, November 2017
*/

#include "gtest/gtest.h"
#define _S_IFDIR S_IFDIR
#define _stat stat

#include "include/bareos.h"
#include "gtest/gtest.h"
#include "lib/alist.h"
//#include "windows.h"

struct FileSet {
FileSet() = default;
Expand Down
7 changes: 5 additions & 2 deletions core/src/tests/dlist_test.cc
Expand Up @@ -2,7 +2,7 @@
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2003-2011 Free Software Foundation Europe e.V.
Copyright (C) 2015-2017 Bareos GmbH & Co. KG
Copyright (C) 2015-2019 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -27,8 +27,11 @@
* Philipp Storz, November 2017
*/

#include "gtest/gtest.h"
#define _S_IFDIR S_IFDIR
#define _stat stat

#include "include/bareos.h"
#include "gtest/gtest.h"
#include "lib/dlist.h"


Expand Down
8 changes: 7 additions & 1 deletion core/src/tests/htable_test.cc
Expand Up @@ -26,8 +26,14 @@
*
* Philipp Storz, November 2017
*/
#include "gtest/gtest.h"

#define _S_IFDIR S_IFDIR
#define _stat stat
#include "minwindef.h"

#include "include/bareos.h"
#include "lib/htable.h"
#include "gtest/gtest.h"

struct HTABLEJCR {
#ifndef TEST_NON_CHAR
Expand Down
4 changes: 3 additions & 1 deletion core/src/tests/lib_tests.cc
Expand Up @@ -18,9 +18,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#define _S_IFDIR S_IFDIR
#define _stat stat

#include "gtest/gtest.h"
#include "include/bareos.h"
#include "gtest/gtest.h"
#include "include/version_numbers.h"
#define BAREOS_TEST_LIB
#include "lib/bnet.h"
Expand Down

0 comments on commit 7eadd7d

Please sign in to comment.