Android browser tests do not obey PRE_-based test ordering |
|||||
Issue descriptionBrowser tests can be split up across multiple browser launches using the PRE_ prefix. https://cs.chromium.org/chromium/src/chrome/test/base/in_process_browser_test.h?q=PRE_+file:in_process_browser_test.h&sq=package:chromium&l=100 This is used to test behavior across crashes / shutdowns. Usage across the codebase: https://cs.chromium.org/search/?q=IN_PROC_BROWSER_TEST_F%5C(.*,+PRE_&sq=package:chromium&type=cs Android tests currently simply skip the PRE_ tests. https://cs.chromium.org/chromium/src/build/android/pylib/gtest/gtest_test_instance.py?q=gtest+PRE_&sq=package:chromium&l=406 Asides from finding the code above, I manually checked that PRE_ tests are skipped using NOTREACHED() assertions.
,
Oct 11 2016
,
Oct 12 2016
Is that filter function in gtest_test_instance.py used when running all tests, or only when running a subset? If Android was skipping all 'PRE_' tests (~115 tests) intuitively I would expect more tests to fail.
,
Oct 16 2016
TL;DR: I'm pretty sure that all the tests that depend on PRE_ tests are skipped on Android. The query I had above [1] shows 69 results. 2 of them are in content/browser [2], 66 of them are in chrome/browser [3], and one of them is an example of documentation in chrome/test [4]. The content tests are the IndexedDB test that prompted this investigation, and a database test [5]. The database test has 2 cases that use PRE_, DatabasePersistsAfterRelaunch and OffTheRecordDatabaseNotPersistent. The latter passes even if the PRE_ does not run. I could not figure out how the former test is excluded, but I uploaded a CL [6] that adds a NOTREACHED() to DatabasePersistsAfterRelaunch, and it crashes on desktop trybots (linux / mac / win), but passes on the Android bots (android_n5x_swarming_rel, linux_android_rel_ng). This proves that the test is not run on Android (though I can't explain why). I went through the first 40 tests in chrome/browser, and found that some tests in chrome/browser are excluded on Android using BUILD.gn [7], some are ChromeOS-only [8], and some are conditioned on feature flags that aren't used in Android (enable_app_list, use_ash). [1] https://cs.chromium.org/search/?q=IN_PROC_BROWSER_TEST_F%5C(.*,+PRE_&sq=package:chromium&type=cs [2] https://cs.chromium.org/search/?q=IN_PROC_BROWSER_TEST_F%5C(.*,+PRE_+file:content/browser&sq=package:chromium&type=cs [3] https://cs.chromium.org/search/?q=IN_PROC_BROWSER_TEST_F%5C(.*,+PRE_+file:chrome/browser&sq=package:chromium&type=cs [4] https://cs.chromium.org/chromium/src/chrome/test/base/in_process_browser_test.h?type=cs&q=IN_PROC_BROWSER_TEST_F%5C(.*,+PRE_+file:chrome/%5B%5Eb%5D&sq=package:chromium&l=100 [5] https://cs.chromium.org/chromium/src/content/browser/database_browsertest.cc?q=IN_PROC_BROWSER_TEST_F%5C(.*,+PRE_+file:content/browser&sq=package:chromium&dr=C&l=69 [6] https://codereview.chromium.org/2422883002 [7] https://cs.chromium.org/chromium/src/chrome/test/BUILD.gn?q=app_browsertest.cc&sq=package:chromium&l=1277 [8] https://cs.chromium.org/chromium/src/chrome/test/BUILD.gn?q=app_browsertest.cc&sq=package:chromium&l=2137
,
Oct 18 2016
Android does not support the browser_tests suite at the moment (see https://bugs.chromium.org/p/chromium/issues/detail?id=611756), so the IN_PROC_BROWSER_TESTs in chrome/browser/ do not run at all on Android. That said, I wouldn't be surprised if our sharding mechanism breaks PRE_.
,
Jan 23 2017
Just ran into this myself as well. Would be really nice if PRE_ could somehow be made to work for content_browsertests on android, but I guess since only so few content tests use it it's not very high priority to fix? Presumably this bug should be blocking for the bug for getting the chrome browser_tests suite to run on android though?
,
Jan 24 2017
#6: Correct, it is not a high priority for us at this time. I don't think his bug would block the entire browser_tests suite but would obviously block the 66 tests mentioned in #4 from running on Android.
,
Mar 18 2017
,
Apr 11 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by pwnall@chromium.org
, Oct 11 2016