Skip API and time rollback tests with GTEST_SKIP

Bug: 251240681
Change-Id: Ie1cee828f239ddca03ad18aac4139e2e42038df3
This commit is contained in:
Vicky Min
2023-09-01 19:06:25 +00:00
committed by Robert Shih
parent 065d4d151e
commit b04fda2908
7 changed files with 110 additions and 12 deletions

View File

@@ -147,23 +147,12 @@ void DeviceFeatures::Initialize() {
std::string DeviceFeatures::RestrictFilter(const std::string& initial_filter) {
std::string filter = initial_filter;
// clang-format off
if (api_version < 17) FilterOut(&filter, "*API17*");
if (api_version < 18) FilterOut(&filter, "*API18*");
// clang-format on
// Some tests may require root access. If user is not root, filter these tests
// out.
if (!wvutil::TestSleep::CanChangeSystemTime()) {
printf("Filtering out TimeRollbackPrevention.\n");
FilterOut(&filter, "*TimeRollbackPrevention*");
} else {
printf("Can change time. I will run TimeRollbackPrevention.\n");
}
// Performance tests take a long time. Filter them out if they are not
// specifically requested.
if (filter.find("Performance") == std::string::npos) {
FilterOut(&filter, "*Performance*");
}
return filter;
}