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 6777ede
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 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 @@ -18,10 +18,11 @@ class SitlTest : public testing::Test
abort();
}
// We need to wait a bit until it's up and running.
std::this_thread::sleep_for(std::chrono::seconds(3));
#else std::this_thread::sleep_for(std::chrono::seconds(3));
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 +32,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 6777ede

Please sign in to comment.