From 1623dc2183996810c00417e9bc532ce38f7c893e Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Wed, 27 Mar 2002 13:47:05 -0500 Subject: ENH: add testdriver test with source file in subdir --- Source/CMakeLists.txt | 4 +++- Tests/TestDriver/CMakeLists.txt | 8 +++++++- Tests/TestDriver/subdir/test3.cxx | 8 ++++++++ Tests/TestDriver/test3.cxx | 8 -------- 4 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 Tests/TestDriver/subdir/test3.cxx delete mode 100644 Tests/TestDriver/test3.cxx diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 118bf2f..bab332e 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -137,18 +137,20 @@ IF(BUILD_TESTING) TestDriverTest ${CMake_BINARY_DIR}/Tests/Wrapping/bin TestDriverTest test1) + ADD_TEST(testdriver2 ${CMake_BINARY_DIR}/Source/cmaketest ${CMake_SOURCE_DIR}/Tests/TestDriver ${CMake_BINARY_DIR}/Tests/TestDriver TestDriverTest ${CMake_BINARY_DIR}/Tests/Wrapping/bin TestDriverTest test2) + ADD_TEST(testdriver3 ${CMake_BINARY_DIR}/Source/cmaketest ${CMake_SOURCE_DIR}/Tests/TestDriver ${CMake_BINARY_DIR}/Tests/TestDriver TestDriverTest ${CMake_BINARY_DIR}/Tests/Wrapping/bin - TestDriverTest test3) + TestDriverTest subdir/test3) ENDIF (DART_ROOT) ENDIF(BUILD_TESTING) diff --git a/Tests/TestDriver/CMakeLists.txt b/Tests/TestDriver/CMakeLists.txt index 0b3d07f..a94e8bc 100644 --- a/Tests/TestDriver/CMakeLists.txt +++ b/Tests/TestDriver/CMakeLists.txt @@ -1,4 +1,10 @@ PROJECT(TestDriverTest) -CREATE_TEST_SOURCELIST(testSrcs TestDriverTest test1 test2 test3) + +CREATE_TEST_SOURCELIST(testSrcs + TestDriverTest + test1 + test2 + subdir/test3) + ADD_EXECUTABLE(TestDriverTest testSrcs) diff --git a/Tests/TestDriver/subdir/test3.cxx b/Tests/TestDriver/subdir/test3.cxx new file mode 100644 index 0000000..13cfb5e --- /dev/null +++ b/Tests/TestDriver/subdir/test3.cxx @@ -0,0 +1,8 @@ +#include +int subdir_test3(int ac, char** av) +{ + printf("test3\n"); + for(int i =0; i < ac; i++) + printf("arg %d is %s\n", ac, av[i]); + return 0; +} diff --git a/Tests/TestDriver/test3.cxx b/Tests/TestDriver/test3.cxx deleted file mode 100644 index b6bcd91..0000000 --- a/Tests/TestDriver/test3.cxx +++ /dev/null @@ -1,8 +0,0 @@ -#include -int test3(int ac, char** av) -{ - printf("test3\n"); - for(int i =0; i < ac; i++) - printf("arg %d is %s\n", ac, av[i]); - return 0; -} -- cgit v0.12