cleanup tests that are now useless (#31098)
* disable that onoe * e2e tests catch this * rm more useless checks
This commit is contained in:
parent
ec72cdca00
commit
78e20cff39
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
|
@ -181,6 +181,7 @@ class TestMapRenderer(unittest.TestCase):
|
|||
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)
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue