Skip to content

Commit

Permalink
Finale: Source hard-tocks
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Jul 14, 2022
1 parent 71754e2 commit 55a382d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Console_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Console_TEST : public ::testing::Test {
protected: virtual void SetUp()
{
this->temp = std::make_unique<TempDirectory>(
"test", "ign_common", true);
"test", "gz_common", true);
ASSERT_TRUE(this->temp->Valid());
common::setenv(GZ_HOMEDIR, this->temp->Path());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Filesystem_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace fs = std::filesystem;
class TestTempDirectory : public TempDirectory
{
public: TestTempDirectory():
TempDirectory("filesystem", "ign_common", true)
TempDirectory("filesystem", "gz_common", true)
{
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/PluginLoader_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/SystemPaths_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
}
};
Expand Down
2 changes: 1 addition & 1 deletion testing/include/gz/common/testing/TestPaths.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions testing/include/gz/common/testing/detail/AutoLogFixture.hh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void AutoLogFixture::SetUp()
'/', '_');

this->dataPtr->temp = std::make_unique<TempDirectory>(
"test", "ign_common", true);
"test", "gz_common", true);
ASSERT_TRUE(this->dataPtr->temp->Valid());
common::setenv(GZ_HOMEDIR, this->dataPtr->temp->Path());

Expand Down Expand Up @@ -121,4 +121,3 @@ std::string AutoLogFixture::LogContent() const
} // namespace gz::common::testing

#endif // GZ_COMMON_TESTING_DETAIL_AUTOLOGFIXTURE_HH_

12 changes: 6 additions & 6 deletions testing/src/TestPaths.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 55a382d

Please sign in to comment.