From 55a382dabe782cf7cb576da5bbe0233284890931 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Wed, 13 Jul 2022 17:10:47 -0700 Subject: [PATCH] Finale: Source hard-tocks Signed-off-by: methylDragon --- src/Console_TEST.cc | 2 +- src/Filesystem_TEST.cc | 2 +- src/PluginLoader_TEST.cc | 2 +- src/SystemPaths_TEST.cc | 2 +- testing/include/gz/common/testing/TestPaths.hh | 2 +- .../gz/common/testing/detail/AutoLogFixture.hh | 3 +-- testing/src/TestPaths.cc | 12 ++++++------ 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/Console_TEST.cc b/src/Console_TEST.cc index 303cc955a..097d7d6b9 100644 --- a/src/Console_TEST.cc +++ b/src/Console_TEST.cc @@ -32,7 +32,7 @@ class Console_TEST : public ::testing::Test { protected: virtual void SetUp() { this->temp = std::make_unique( - "test", "ign_common", true); + "test", "gz_common", true); ASSERT_TRUE(this->temp->Valid()); common::setenv(GZ_HOMEDIR, this->temp->Path()); } diff --git a/src/Filesystem_TEST.cc b/src/Filesystem_TEST.cc index cd3a90da7..c3196d7a5 100644 --- a/src/Filesystem_TEST.cc +++ b/src/Filesystem_TEST.cc @@ -43,7 +43,7 @@ namespace fs = std::filesystem; class TestTempDirectory : public TempDirectory { public: TestTempDirectory(): - TempDirectory("filesystem", "ign_common", true) + TempDirectory("filesystem", "gz_common", true) { } }; diff --git a/src/PluginLoader_TEST.cc b/src/PluginLoader_TEST.cc index 4726e9f8b..f6cfa26b6 100644 --- a/src/PluginLoader_TEST.cc +++ b/src/PluginLoader_TEST.cc @@ -34,7 +34,7 @@ class TestTempDirectory : public gz::common::TempDirectory { public: TestTempDirectory(): - gz::common::TempDirectory("plugin_loader", "ign_common", true) + gz::common::TempDirectory("plugin_loader", "gz_common", true) { } }; diff --git a/src/SystemPaths_TEST.cc b/src/SystemPaths_TEST.cc index 1bb2c8e57..97580ecbd 100644 --- a/src/SystemPaths_TEST.cc +++ b/src/SystemPaths_TEST.cc @@ -40,7 +40,7 @@ const char kFilePath[] = "GZ_FILE_PATH"; class TestTempDirectory : public gz::common::TempDirectory { public: TestTempDirectory(): - gz::common::TempDirectory("systempaths", "ign_common", true) + gz::common::TempDirectory("systempaths", "gz_common", true) { } }; diff --git a/testing/include/gz/common/testing/TestPaths.hh b/testing/include/gz/common/testing/TestPaths.hh index 1e075d97d..caa0d811a 100644 --- a/testing/include/gz/common/testing/TestPaths.hh +++ b/testing/include/gz/common/testing/TestPaths.hh @@ -39,7 +39,7 @@ namespace gz::common::testing /// /// For CMake builds, it is expected that this is injected via a /// buildsystem define of TESTING_PROJECT_SOURCE_DIR. -/// This is done automatically for tests using gz-cmake's ign_build_tests +/// This is done automatically for tests using gz-cmake's gz_build_tests /// /// For Bazel builds, it is expected to be empty constexpr char kTestingProjectSourceDir[] = TESTING_PROJECT_SOURCE_DIR; diff --git a/testing/include/gz/common/testing/detail/AutoLogFixture.hh b/testing/include/gz/common/testing/detail/AutoLogFixture.hh index 4126da5fb..c986cd351 100644 --- a/testing/include/gz/common/testing/detail/AutoLogFixture.hh +++ b/testing/include/gz/common/testing/detail/AutoLogFixture.hh @@ -75,7 +75,7 @@ void AutoLogFixture::SetUp() '/', '_'); this->dataPtr->temp = std::make_unique( - "test", "ign_common", true); + "test", "gz_common", true); ASSERT_TRUE(this->dataPtr->temp->Valid()); common::setenv(GZ_HOMEDIR, this->dataPtr->temp->Path()); @@ -121,4 +121,3 @@ std::string AutoLogFixture::LogContent() const } // namespace gz::common::testing #endif // GZ_COMMON_TESTING_DETAIL_AUTOLOGFIXTURE_HH_ - diff --git a/testing/src/TestPaths.cc b/testing/src/TestPaths.cc index 134fa77d1..af6cd036e 100644 --- a/testing/src/TestPaths.cc +++ b/testing/src/TestPaths.cc @@ -35,18 +35,18 @@ TestPaths::~TestPaths() = default; ////////////////////////////////////////////////// BuildType TestBuildType(const std::string &_projectSourcePath) { - std::string ign_bazel; - bool ign_bazel_set = common::env("IGN_BAZEL", ign_bazel); - bool ign_cmake_set = !_projectSourcePath.empty(); + std::string gz_bazel; + bool gz_bazel_set = common::env("GZ_BAZEL", gz_bazel); + bool gz_cmake_set = !_projectSourcePath.empty(); - if (ign_bazel_set && ign_cmake_set) + if (gz_bazel_set && gz_cmake_set) { gzwarn << "Detected settings from Bazel and CMake, preferring CMake\n"; } - if (ign_cmake_set) + if (gz_cmake_set) return BuildType::kCMake; - else if (ign_bazel_set) + else if (gz_bazel_set) return BuildType::kBazel; else return BuildType::kUnknown;