Skip to content

Commit

Permalink
cleanup tests that are now useless (#31098)
Browse files Browse the repository at this point in the history
* disable that onoe

* e2e tests catch this

* rm more useless checks
  • Loading branch information
adeebshihadeh authored Jan 21, 2024
1 parent ec72cdc commit 78e20cf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 37 deletions.
2 changes: 1 addition & 1 deletion common/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 0 additions & 23 deletions common/tests/test_ratekeeper.cc

This file was deleted.

1 change: 1 addition & 0 deletions selfdrive/navd/tests/test_map_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 1 addition & 13 deletions system/proclogd/tests/test_proclog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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());
}
}
}
}
}

0 comments on commit 78e20cf

Please sign in to comment.