From b76cf5b07f194baf844687846f73ddfdef0a085f Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Thu, 15 Mar 2012 02:10:37 +0000 Subject: [PATCH] Made unit test names unique between subdirectories and 'tests' directory, removed subdir prefix from compiled executable names. The duplicate filenames confused Eclipse and made things difficult in CMake as well. --- cmake/GtsamTesting.cmake | 6 +++--- tests/CMakeLists.txt | 4 ++-- ...GaussianFactorGraph.cpp => testGaussianFactorGraphB.cpp} | 2 +- ...ussianJunctionTree.cpp => testGaussianJunctionTreeB.cpp} | 2 +- tests/{testInference.cpp => testInferenceB.cpp} | 2 +- .../{testSymbolicBayesNet.cpp => testSymbolicBayesNetB.cpp} | 2 +- ...SymbolicFactorGraph.cpp => testSymbolicFactorGraphB.cpp} | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) rename tests/{testGaussianFactorGraph.cpp => testGaussianFactorGraphB.cpp} (99%) rename tests/{testGaussianJunctionTree.cpp => testGaussianJunctionTreeB.cpp} (99%) rename tests/{testInference.cpp => testInferenceB.cpp} (98%) rename tests/{testSymbolicBayesNet.cpp => testSymbolicBayesNetB.cpp} (98%) rename tests/{testSymbolicFactorGraph.cpp => testSymbolicFactorGraphB.cpp} (99%) diff --git a/cmake/GtsamTesting.cmake b/cmake/GtsamTesting.cmake index f2f345f11..28683c98b 100644 --- a/cmake/GtsamTesting.cmake +++ b/cmake/GtsamTesting.cmake @@ -6,7 +6,7 @@ macro(gtsam_add_tests subdir libs) file(GLOB tests_srcs "tests/test*.cpp") foreach(test_src ${tests_srcs}) get_filename_component(test_base ${test_src} NAME_WE) - set( test_bin ${subdir}.${test_base} ) + set( test_bin ${test_base} ) message(STATUS "Adding Test ${test_bin}") add_executable(${test_bin} ${test_src}) add_dependencies(check.${subdir} ${test_bin}) @@ -30,7 +30,7 @@ macro(gtsam_add_external_tests subdir libs) file(GLOB tests_srcs "tests/test*.cpp") foreach(test_src ${tests_srcs}) get_filename_component(test_base ${test_src} NAME_WE) - set( test_bin ${subdir}.${test_base} ) + set( test_bin ${test_base} ) message(STATUS "Adding Test ${test_bin}") add_executable(${test_bin} ${test_src}) add_dependencies(check.${subdir} ${test_bin}) @@ -48,7 +48,7 @@ macro(gtsam_add_timing subdir libs) file(GLOB base_timing_srcs "tests/time*.cpp") foreach(time_src ${base_timing_srcs}) get_filename_component(time_base ${time_src} NAME_WE) - set( time_bin ${subdir}.${time_base} ) + set( time_bin ${time_base} ) message(STATUS "Adding Timing Benchmark ${time_bin}") add_executable(${time_bin} ${time_src}) add_dependencies(timing.${subdir} ${time_bin}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8a28c8dad..02b4d455e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -25,7 +25,7 @@ if (GTSAM_BUILD_TESTS) list(REMOVE_ITEM tests_srcs ${tests_exclude}) foreach(test_src ${tests_srcs}) get_filename_component(test_base ${test_src} NAME_WE) - set( test_bin tests.${test_base} ) + set( test_bin ${test_base} ) message(STATUS "Adding Test ${test_bin}") add_executable(${test_bin} ${test_src}) add_dependencies(check.tests ${test_bin}) @@ -43,7 +43,7 @@ if (GTSAM_BUILD_TIMING) list(REMOVE_ITEM timing_srcs ${tests_exclude}) foreach(time_src ${timing_srcs}) get_filename_component(time_base ${time_src} NAME_WE) - set( time_bin tests.${time_base} ) + set( time_bin ${time_base} ) message(STATUS "Adding Timing Benchmark ${time_bin}") add_executable(${time_bin} ${time_src}) add_dependencies(timing.tests ${time_bin}) diff --git a/tests/testGaussianFactorGraph.cpp b/tests/testGaussianFactorGraphB.cpp similarity index 99% rename from tests/testGaussianFactorGraph.cpp rename to tests/testGaussianFactorGraphB.cpp index fecba4d3c..8d7d96ea4 100644 --- a/tests/testGaussianFactorGraph.cpp +++ b/tests/testGaussianFactorGraphB.cpp @@ -10,7 +10,7 @@ * -------------------------------------------------------------------------- */ /** - * @file testGaussianFactorGraph.cpp + * @file testGaussianFactorGraphB.cpp * @brief Unit tests for Linear Factor Graph * @author Christian Potthast **/ diff --git a/tests/testGaussianJunctionTree.cpp b/tests/testGaussianJunctionTreeB.cpp similarity index 99% rename from tests/testGaussianJunctionTree.cpp rename to tests/testGaussianJunctionTreeB.cpp index b01aa2ba4..c6b935c21 100644 --- a/tests/testGaussianJunctionTree.cpp +++ b/tests/testGaussianJunctionTreeB.cpp @@ -10,7 +10,7 @@ * -------------------------------------------------------------------------- */ /** - * @file testGaussianJunctionTree.cpp + * @file testGaussianJunctionTreeB.cpp * @date Jul 8, 2010 * @author nikai */ diff --git a/tests/testInference.cpp b/tests/testInferenceB.cpp similarity index 98% rename from tests/testInference.cpp rename to tests/testInferenceB.cpp index a08358b29..a4aa37b10 100644 --- a/tests/testInference.cpp +++ b/tests/testInferenceB.cpp @@ -10,7 +10,7 @@ * -------------------------------------------------------------------------- */ /** - * @file testInference.cpp + * @file testInferenceB.cpp * @brief Unit tests for functionality declared in inference.h * @author Frank Dellaert */ diff --git a/tests/testSymbolicBayesNet.cpp b/tests/testSymbolicBayesNetB.cpp similarity index 98% rename from tests/testSymbolicBayesNet.cpp rename to tests/testSymbolicBayesNetB.cpp index b18c01f04..e25cf33ca 100644 --- a/tests/testSymbolicBayesNet.cpp +++ b/tests/testSymbolicBayesNetB.cpp @@ -10,7 +10,7 @@ * -------------------------------------------------------------------------- */ /** - * @file testSymbolicBayesNet.cpp + * @file testSymbolicBayesNetB.cpp * @brief Unit tests for a symbolic Bayes chain * @author Frank Dellaert */ diff --git a/tests/testSymbolicFactorGraph.cpp b/tests/testSymbolicFactorGraphB.cpp similarity index 99% rename from tests/testSymbolicFactorGraph.cpp rename to tests/testSymbolicFactorGraphB.cpp index f8fa777d1..9b195e0c1 100644 --- a/tests/testSymbolicFactorGraph.cpp +++ b/tests/testSymbolicFactorGraphB.cpp @@ -10,7 +10,7 @@ * -------------------------------------------------------------------------- */ /** - * @file testSymbolicFactorGraph.cpp + * @file testSymbolicFactorGraphB.cpp * @brief Unit tests for a symbolic Factor Graph * @author Frank Dellaert */