Skip to content
Snippets Groups Projects
Commit 36085891 authored by Brad King's avatar Brad King
Browse files

ENH: Add test for KWSys SharedForward

This tests the basic capability of running another executable from the
build tree.
parent b458b866
No related branches found
No related tags found
No related merge requests found
......@@ -992,6 +992,13 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
ADD_TEST(kwsys.testProcess-${n} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestProcess ${n})
ENDFOREACH(n)
# Test SharedForward
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/testSharedForward.c.in
${PROJECT_BINARY_DIR}/testSharedForward.c @ONLY IMMEDIATE)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestSharedForward
${PROJECT_BINARY_DIR}/testSharedForward.c)
ADD_TEST(kwsys.testSharedForward ${EXEC_DIR}/${KWSYS_NAMESPACE}TestSharedForward 1)
# Configure some test properties.
IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE)
# We expect test to fail
......
/*=========================================================================
Program: KWSys - Kitware System Library
Module: testSharedForward.c.in
Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#if defined(CMAKE_INTDIR)
# define CONFIG_DIR_PRE CMAKE_INTDIR "/"
# define CONFIG_DIR_POST "/" CMAKE_INTDIR
#else
# define CONFIG_DIR_PRE ""
# define CONFIG_DIR_POST ""
#endif
#define @KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD "@EXEC_DIR@"
#define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD "." CONFIG_DIR_POST
#define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL 0
#define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD \
CONFIG_DIR_PRE "@KWSYS_NAMESPACE@TestProcess"
#define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL \
"@KWSYS_NAMESPACE@TestProcess"
#define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_COMMAND "--command"
#define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT "--print"
#define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD "--ldd"
#if defined(CMAKE_INTDIR)
# define @KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME CMAKE_INTDIR
#endif
#include <@KWSYS_NAMESPACE@/SharedForward.h>
int main(int argc, char** argv)
{
return @KWSYS_NAMESPACE@_shared_forward_to_real(argc, argv);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment