diff options
Diffstat (limited to 'Tests/BundleUtilities')
-rw-r--r-- | Tests/BundleUtilities/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/BundleUtilities/bundleutils.cmake | 5 | ||||
-rw-r--r-- | Tests/BundleUtilities/testbundleutils.cpp | 6 |
3 files changed, 11 insertions, 2 deletions
diff --git a/Tests/BundleUtilities/CMakeLists.txt b/Tests/BundleUtilities/CMakeLists.txt index 2a649e4..be2b058 100644 --- a/Tests/BundleUtilities/CMakeLists.txt +++ b/Tests/BundleUtilities/CMakeLists.txt @@ -43,6 +43,7 @@ add_custom_target(testbundleutils1_test ALL "-DINPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" "-DOUTPUTDIR=${TESTBUNDLEDIR}" -P "${CMAKE_CURRENT_SOURCE_DIR}/bundleutils.cmake" + DEPENDS testbundleutils1 module ) add_dependencies(testbundleutils1_test testbundleutils1) @@ -66,5 +67,6 @@ add_custom_target(testbundleutils2_test ALL "-DINPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" "-DOUTPUTDIR=${TESTBUNDLEDIR}" -P "${CMAKE_CURRENT_SOURCE_DIR}/bundleutils.cmake" + DEPENDS testbundleutils1 module ) add_dependencies(testbundleutils2_test testbundleutils2) diff --git a/Tests/BundleUtilities/bundleutils.cmake b/Tests/BundleUtilities/bundleutils.cmake index 4df2f2d..46765e7 100644 --- a/Tests/BundleUtilities/bundleutils.cmake +++ b/Tests/BundleUtilities/bundleutils.cmake @@ -37,8 +37,9 @@ include(BundleUtilities) fixup_bundle("${OUTPUT}" "${OUTPUT_MODULE}" "${INPUTDIR}") # make sure we can run the app -execute_process(COMMAND "${OUTPUT}" RESULT_VARIABLE result WORKING_DIRECTORY "${EXE_DIR}") +message("Executing ${OUTPUT} in ${EXE_DIR}") +execute_process(COMMAND "${OUTPUT}" RESULT_VARIABLE result OUTPUT_VARIABLE out ERROR_VARIABLE out WORKING_DIRECTORY "${EXE_DIR}") if(NOT result STREQUAL "0") - message(FATAL_ERROR " failed to execute test program") + message(FATAL_ERROR " failed to execute test program\n${out}") endif(NOT result STREQUAL "0") diff --git a/Tests/BundleUtilities/testbundleutils.cpp b/Tests/BundleUtilities/testbundleutils.cpp index 0b1828f..87eaae3 100644 --- a/Tests/BundleUtilities/testbundleutils.cpp +++ b/Tests/BundleUtilities/testbundleutils.cpp @@ -1,6 +1,7 @@ #include "framework.h" #include "shared.h" +#include "stdio.h" #if defined(WIN32) #include <windows.h> @@ -19,5 +20,10 @@ int main(int, char**) void* lib = dlopen("module.so", RTLD_LAZY); #endif + if(!lib) + { + printf("Failed to open module\n"); + } + return lib == 0 ? 1 : 0; } |