From 9e3a6fc8a2240e2cb58f422e74006ab4bf9cd294 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Tue, 15 Mar 2022 13:38:33 -0500 Subject: [PATCH] Fixup AutoLogFixture and tests that had transitive depends Signed-off-by: Michael Carroll --- events/src/Event_TEST.cc | 1 + geospatial/src/CMakeLists.txt | 2 +- test/integration/video_encoder.cc | 1 + testing/include/ignition/common/testing/AutoLogFixture.hh | 2 ++ .../ignition/common/testing/detail/AutoLogFixture.hh} | 7 ++++++- testing/src/CMakeLists.txt | 1 - 6 files changed, 11 insertions(+), 3 deletions(-) rename testing/{src/AutoLogFixture.cc => include/ignition/common/testing/detail/AutoLogFixture.hh} (93%) diff --git a/events/src/Event_TEST.cc b/events/src/Event_TEST.cc index 388bd6b0d..aac91dd6f 100644 --- a/events/src/Event_TEST.cc +++ b/events/src/Event_TEST.cc @@ -21,6 +21,7 @@ #include #include +#include using namespace ignition; diff --git a/geospatial/src/CMakeLists.txt b/geospatial/src/CMakeLists.txt index 6975e86fc..918fdc743 100644 --- a/geospatial/src/CMakeLists.txt +++ b/geospatial/src/CMakeLists.txt @@ -19,4 +19,4 @@ target_include_directories(${geospatial_target} ${GDAL_INCLUDE_DIR}) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources} - LIB_DEPS ${geospatial_target}) + LIB_DEPS ${geospatial_target} ignition-common${IGN_COMMON_VER}-testing) diff --git a/test/integration/video_encoder.cc b/test/integration/video_encoder.cc index 7368abb6c..4ab280061 100644 --- a/test/integration/video_encoder.cc +++ b/test/integration/video_encoder.cc @@ -18,6 +18,7 @@ // needed on MacOS #include +#include "ignition/common/Console.hh" #include "ignition/common/VideoEncoder.hh" #include "ignition/common/Video.hh" #include "ignition/common/ffmpeg_inc.hh" diff --git a/testing/include/ignition/common/testing/AutoLogFixture.hh b/testing/include/ignition/common/testing/AutoLogFixture.hh index 348c665fa..c685723f9 100644 --- a/testing/include/ignition/common/testing/AutoLogFixture.hh +++ b/testing/include/ignition/common/testing/AutoLogFixture.hh @@ -54,4 +54,6 @@ class AutoLogFixture : public ::testing::Test }; } // namespace ignition::common::testing +#include + #endif // IGNITION_COMMON_TESTING_AUTOLOGFIXTURE_HH_ diff --git a/testing/src/AutoLogFixture.cc b/testing/include/ignition/common/testing/detail/AutoLogFixture.hh similarity index 93% rename from testing/src/AutoLogFixture.cc rename to testing/include/ignition/common/testing/detail/AutoLogFixture.hh index 9fc80b5b4..897f04149 100644 --- a/testing/src/AutoLogFixture.cc +++ b/testing/include/ignition/common/testing/detail/AutoLogFixture.hh @@ -14,6 +14,8 @@ * limitations under the License. * */ +#ifndef IGNITION_COMMON_TESTING_DETAIL_AUTOLOGFIXTURE_HH_ +#define IGNITION_COMMON_TESTING_DETAIL_AUTOLOGFIXTURE_HH_ #include "ignition/common/testing/AutoLogFixture.hh" @@ -66,7 +68,7 @@ void AutoLogFixture::SetUp() this->dataPtr->logFilename = testCaseName + "_" + testName + ".log"; this->dataPtr->temp = std::make_unique( - "test", "ign_common", true); + "test", "ign_common", false); ASSERT_TRUE(this->dataPtr->temp->Valid()); common::setenv(IGN_HOMEDIR, this->dataPtr->temp->Path()); @@ -104,3 +106,6 @@ std::string AutoLogFixture::LogContent() const } } // namespace ignition::common::testing + +#endif // IGNITION_COMMON_TESTING_DETAIL_AUTOLOGFIXTURE_HH_ + diff --git a/testing/src/CMakeLists.txt b/testing/src/CMakeLists.txt index 657701821..970bd7a81 100644 --- a/testing/src/CMakeLists.txt +++ b/testing/src/CMakeLists.txt @@ -1,5 +1,4 @@ set(sources - AutoLogFixture.cc BazelTestPaths.cc CMakeTestPaths.cc TestPaths.cc