From 1e0933578dd363370ad7b2e46b3e050afa198b21 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 16 Jun 2022 09:47:33 -0700 Subject: [PATCH 1/3] Fix ign_TEST Signed-off-by: Louise Poubel --- src/ign_TEST.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ign_TEST.cc b/src/ign_TEST.cc index 5954542e2..8f2372002 100644 --- a/src/ign_TEST.cc +++ b/src/ign_TEST.cc @@ -86,13 +86,13 @@ class CmdLine : public ::testing::Test }; // See https://github.com/ignitionrobotics/ign-gui/issues/75 -// See https://github.com/gazebosim/gz-gui/issues/415 -TEST_F(CmdLine, DETAIL_IGN_UTILS_ADD_DISABLED_PREFIX(list)) +TEST_F(CmdLine, list) { // Clear home if it exists common::removeAll(this->kFakeHome); - EXPECT_FALSE(common::exists(this->kFakeHome)); + // Can't EXPECT_FALSE here, see https://github.com/gazebosim/gz-gui/issues/415 + common::exists(this->kFakeHome); std::string output = custom_exec_str("ign gui -l"); EXPECT_NE(output.find("TopicEcho"), std::string::npos) << output; @@ -104,7 +104,7 @@ TEST_F(CmdLine, DETAIL_IGN_UTILS_ADD_DISABLED_PREFIX(list)) ////////////////////////////////////////////////// /// \brief Check --help message and bash completion script for consistent flags -TEST(ignTest, GuiHelpVsCompletionFlags) +TEST(ignTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(GuiHelpVsCompletionFlags)) { // Flags in help message std::string helpOutput = custom_exec_str(kIgnCommand + " gui --help"); @@ -126,7 +126,7 @@ TEST(ignTest, GuiHelpVsCompletionFlags) EXPECT_GT(flags.size(), 0u); // Match each flag in script output with help message - for (std::string flag : flags) + for (const auto &flag : flags) { EXPECT_NE(std::string::npos, helpOutput.find(flag)) << helpOutput; } From 09065707c6a628929353b63769481e9640057349 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 16 Jun 2022 10:11:12 -0700 Subject: [PATCH 2/3] Disable list test on macOS and Windows Signed-off-by: Louise Poubel --- src/ign_TEST.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ign_TEST.cc b/src/ign_TEST.cc index 8f2372002..6bc795b44 100644 --- a/src/ign_TEST.cc +++ b/src/ign_TEST.cc @@ -86,7 +86,7 @@ class CmdLine : public ::testing::Test }; // See https://github.com/ignitionrobotics/ign-gui/issues/75 -TEST_F(CmdLine, list) +TEST_F(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(list)) { // Clear home if it exists common::removeAll(this->kFakeHome); From 5f442aec071090eb4a2ac8906f10949ca1101988 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Fri, 17 Jun 2022 09:20:55 -0700 Subject: [PATCH 3/3] PR feedback Signed-off-by: Louise Poubel --- src/ign_TEST.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ign_TEST.cc b/src/ign_TEST.cc index 6bc795b44..f1e03ee82 100644 --- a/src/ign_TEST.cc +++ b/src/ign_TEST.cc @@ -91,8 +91,8 @@ TEST_F(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(list)) // Clear home if it exists common::removeAll(this->kFakeHome); - // Can't EXPECT_FALSE here, see https://github.com/gazebosim/gz-gui/issues/415 - common::exists(this->kFakeHome); + // This line is flaky, see https://github.com/gazebosim/gz-gui/issues/415 + // EXPECT_FALSE(common::exists(this->kFakeHome)); std::string output = custom_exec_str("ign gui -l"); EXPECT_NE(output.find("TopicEcho"), std::string::npos) << output; @@ -104,6 +104,7 @@ TEST_F(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(list)) ////////////////////////////////////////////////// /// \brief Check --help message and bash completion script for consistent flags +// See https://github.com/gazebo-tooling/release-tools/issues/398 TEST(ignTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(GuiHelpVsCompletionFlags)) { // Flags in help message