mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-05 16:26:10 +08:00
cleanup tests that are now useless (#31098)
* disable that onoe * e2e tests catch this * rm more useless checks old-commit-hash: 78e20cff3906ee76c356e8bdef920397e60389b4
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user