diff --git a/common/SConscript b/common/SConscript index 52b3adf1d332c7..829db6eeec0cc9 100644 --- a/common/SConscript +++ b/common/SConscript @@ -23,7 +23,7 @@ Export('_common', '_gpucommon') if GetOption('extras'): env.Program('tests/test_common', - ['tests/test_runner.cc', 'tests/test_params.cc', 'tests/test_util.cc', 'tests/test_swaglog.cc', 'tests/test_ratekeeper.cc'], + ['tests/test_runner.cc', 'tests/test_params.cc', 'tests/test_util.cc', 'tests/test_swaglog.cc'], LIBS=[_common, 'json11', 'zmq', 'pthread']) # Cython bindings diff --git a/common/tests/test_ratekeeper.cc b/common/tests/test_ratekeeper.cc deleted file mode 100644 index 32c7dfe58cc53a..00000000000000 --- a/common/tests/test_ratekeeper.cc +++ /dev/null @@ -1,23 +0,0 @@ -#include "catch2/catch.hpp" -#include "common/ratekeeper.h" -#include "common/timing.h" -#include "common/util.h" - -TEST_CASE("RateKeeper") { - float freq = GENERATE(10, 50, 100); - RateKeeper rk("Test RateKeeper", freq); - - int lags = 0; - int bad_keep_times = 0; - for (int i = 0; i < freq; ++i) { - double begin = seconds_since_boot(); - util::sleep_for(util::random_int(0, 1000.0 / freq - 1)); - bool lagged = rk.keepTime(); - lags += lagged; - bad_keep_times += (seconds_since_boot() - begin - (1 / freq)) > 1e-3; - } - - // need a tolerance here due to scheduling - REQUIRE(lags < 5); - REQUIRE(bad_keep_times < 5); -} diff --git a/selfdrive/navd/tests/test_map_renderer.py b/selfdrive/navd/tests/test_map_renderer.py index d336ffb6517511..d056198becc977 100755 --- a/selfdrive/navd/tests/test_map_renderer.py +++ b/selfdrive/navd/tests/test_map_renderer.py @@ -181,6 +181,7 @@ def test_with_no_internet(self): self._run_test(False) @with_processes(["mapsd"]) + @pytest.mark.skip(reason="slow, flaky, and unlikely to break") def test_recover_from_no_internet(self): self._setup_test() self._run_test(True) diff --git a/system/proclogd/tests/test_proclog.cc b/system/proclogd/tests/test_proclog.cc index 613c3261668e60..b86229a4996cd1 100644 --- a/system/proclogd/tests/test_proclog.cc +++ b/system/proclogd/tests/test_proclog.cc @@ -109,7 +109,7 @@ TEST_CASE("Parser::cmdline") { test_cmdline(std::string("a\0b\0c\0\0\0", 9), {"a", "b", "c"}); } -TEST_CASE("buildProcLogerMessage") { +TEST_CASE("buildProcLoggerMessage") { MessageBuilder msg; buildProcLogMessage(msg); @@ -137,18 +137,6 @@ TEST_CASE("buildProcLogerMessage") { REQUIRE(p.getState() == 'R'); REQUIRE_THAT(p.getExe().cStr(), Catch::Matchers::Contains("test_proclog")); REQUIRE_THAT(p.getCmdline()[0], Catch::Matchers::Contains("test_proclog")); - } else { - std::string cmd_path = "/proc/" + std::to_string(p.getPid()) + "/cmdline"; - if (util::file_exists(cmd_path)) { - std::ifstream stream(cmd_path); - auto cmdline = Parser::cmdline(stream); - REQUIRE(cmdline.size() == p.getCmdline().size()); - for (int i = 0; i < p.getCmdline().size(); ++i) { - // do not check the cmdline of pytest as it will change. - if (cmdline[i].find("[pytest") || std::string(p.getCmdline()[i]).find("[pytest")) continue; - REQUIRE(cmdline[i] == p.getCmdline()[i].cStr()); - } - } } } }