Skip to content

Commit

Permalink
core: add warnings for Windows
Browse files Browse the repository at this point in the history
SITL autostart is not working on Windows, so we might as well warn.
Also, it's good practice to use they keyword override.
  • Loading branch information
julianoes committed May 9, 2018
1 parent 1414f67 commit d2b0079
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/integration_test_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class SitlTest : public testing::Test
{
protected:
virtual void SetUp()
virtual void SetUp() override
{
#ifndef WINDOWS
const int ret = system("./start_px4_sitl.sh");
Expand All @@ -19,9 +19,11 @@ class SitlTest : public testing::Test
}
// We need to wait a bit until it's up and running.
std::this_thread::sleep_for(std::chrono::seconds(3));
#else
dronecore::LogErr() << "Auto-starting SITL not supported on Windows.";
#endif
}
virtual void TearDown()
virtual void TearDown() override
{
#ifndef WINDOWS
// Don't rush this either.
Expand All @@ -31,6 +33,8 @@ class SitlTest : public testing::Test
dronecore::LogErr() << "./stop_px4_sitl.sh failed, giving up.";
abort();
}
#else
dronecore::LogErr() << "Auto-starting SITL not supported on Windows.";
#endif
}
};

0 comments on commit d2b0079

Please sign in to comment.