Commit Graph

64 Commits

Author SHA1 Message Date
Nataniel Borges
5bc6531301 Disable failing flicker tests
Disable the flicker tests which are currently flaky and the failing ones to push the test suite into presubmit.

Test: atest FlickerTests
Change-Id: I92fadad88882ad331f183174aaa803cd87e8c97c
2020-04-01 13:36:27 +02:00
Nataniel Borges
5a288c9a68 Disable PIP tests
Pip is currently flaky. Disable them on the flicker tests until the
stabilize.

Test: atest FlickerTests
Change-Id: I762a998e99acf21e30140a8bb8950420f22df77e
2020-03-30 16:26:42 +02:00
Nataniel Borges
7ac1793496 Enable test harness flag before the test
The test harness must be enabled to alllow the test to interact with
TAPL (launcher), otherwise the test crashes with an "Error granting
runtime permission" exception.

Test: atest FlickerTests
Change-Id: I5fffa4e756fab7ab4abca8a4d301f3c01e1297ce
2020-03-30 13:13:23 +02:00
TreeHugger Robot
352aeb16db Merge "Refactoring transition location on flicker tests" 2020-03-24 16:02:42 +00:00
Nataniel Borges
be46afa39a Refactoring transition location on flicker tests
Currently, each test has its own "@Before" method which executed a transition.

Instead, each method now returns its transition and the base test class handles the execution.

Test: atest FlickerTests
Change-Id: I96a0be436ed28ed1d8ffe258ab2a002cca57dd9e
2020-03-24 15:56:33 +01:00
Ashwini Oruganti
e178c24db3 Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for S+. This change adds the value reflecting the previous
default to the manifest.

These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.

Bug: 150232615
Test: TH
Exempt-From-Owner-Approval: mechanical refactoring
Change-Id: I4457ff2bd466a4c56fed2570e110f251031c2385
2020-03-23 18:34:09 +00:00
Nataniel Borges
7b4cdb0b0e Merge "Disable split screen tests" 2020-03-18 12:15:18 +00:00
Nataniel Borges
574c53fc42 Disable split screen tests
Split screen tests cannot run until the split screen divider is
available again in the accessibility service (UiAutomation) API, which
we use to interact with the app under test.

Test: atest FlickerTests
Change-Id: Id7573c162a7aa765a77f07596fedc4920d44964a
2020-03-18 09:58:11 +01:00
Nataniel Borges
2884e6bb3c Merge "Add meaningful exception when the device is in an unknown state" 2020-03-17 16:49:11 +00:00
Nataniel Borges
fd683f7113 Add meaningful exception when the device is in an unknown state
Currently, when the device is in an incorrect state (e.g. in split
screen) because another test failed to teardown the error message is a
java.lang.NullPointerException. Instead of this error, show a message
warning about the problem to aid debugging.

Test: atest FlickerTests
Change-Id: If3bd75c14c90209952484802ee17f817ab4f0f20
2020-03-13 17:38:56 +01:00
TreeHugger Robot
9f7bc02992 Merge "Ensure split screen will be closed after the test" 2020-03-12 20:57:16 +00:00
TreeHugger Robot
d6ecdce435 Merge "Ensure pip window will be closed after the test" 2020-03-12 20:56:35 +00:00
Nataniel Borges
d5c33e63bc Ensure pip window will be closed after the test
If the test crashes for any reason, still clean-up the device to leave
the device in a consistent state and avoid affecting other tests.

Test: atest FlickerTests
Change-Id: If7c0238875fdc7a3cb548d6e6f9d49340bc96f26
2020-03-12 18:45:45 +01:00
Nataniel Borges
4658c78dbe Ensure split screen will be closed after the test
If the test crashes for any reason, still clean-up the device to leave
the device in a consistent state and avoid affecting other tests.

Test: atest FlickerTests
Change-Id: I53d4288b765a5c5221fae4cd1b8ce2b5035676a8
2020-03-12 17:04:37 +01:00
Nataniel Borges
8c31cfc013 Fix "ScreenshotLayer" name in the flicker tests
Previously the rotation animatino layer was called "ScreenshotLayer",
now that layer is called "RotationLayer". Updated the flicker tests to
consider the new name.

Test: astest FlickerTests
Change-Id: I4600d4be57284b6f373588081d3f6dac8125f06b
2020-03-12 16:13:52 +01:00
Automerger Merge Worker
b00e24740b Merge changes from topic "flicker" am: db3931fe93 am: 3bc31d6b34
Change-Id: Idb5519009b60c378960893aa072ba9d21ebc8db2
2020-02-27 12:03:15 +00:00
Automerger Merge Worker
a96b1f5ad1 Ensure screenshot layer appears during rotation am: 6a087ec8ed am: f401edf498
Change-Id: Ief97c63ea36466c4cb042f8db3af4455000d15f8
2020-02-27 12:03:05 +00:00
Automerger Merge Worker
40ed98adcc New FlickerTests: Create initial flicker tests for Pip am: 992a155b61 am: 1e665c424e
Change-Id: I804d26250d1d4df1ce9342eed01f195bc13fd1a1
2020-02-27 12:03:01 +00:00
Automerger Merge Worker
2db43c5246 Merge "Print the checksum of the trace file on failure" am: ef04ccb466 am: 895568cfe1
Change-Id: Id455d3186726eb82d268700cfe646ec0f0e80259
2020-02-27 12:02:53 +00:00
Automerger Merge Worker
f401edf498 Ensure screenshot layer appears during rotation am: 6a087ec8ed
Change-Id: Ie2657049ce147e8c3b4a8955f6d575804fdf97b7
2020-02-27 11:49:25 +00:00
Automerger Merge Worker
1e665c424e New FlickerTests: Create initial flicker tests for Pip am: 992a155b61
Change-Id: I50d0d2294e297d062e4384b342e8577c66e62f02
2020-02-27 11:49:21 +00:00
Jorim Jaggi
db3931fe93 Merge changes from topic "flicker"
* changes:
  New flicker test: Add rotation to split screen test
  Ensure screenshot layer appears during rotation
  New FlickerTests: Create initial flicker tests for Pip
2020-02-27 11:39:03 +00:00
Nataniel Borges
68e0c874a3 New flicker test: Add rotation to split screen test
Currently the split screen test only starts the app in 0 degrees. As the other tests, start in both 0 and 90 degrees to ensure animations work correctly.

Test: atest FlickerTests:OpenAppToSplitScreenTest
Change-Id: Ied316d9c48b243728544ad4a972cb3e0fa81bec8
2020-02-25 12:55:20 +01:00
Nataniel Borges
6a087ec8ed Ensure screenshot layer appears during rotation
Add some additional checks on flicker tests to ensure that the screenshot layer ir correctly being displayed during the rotation animation.

Test: atest FlickerTests:ChangeAppRotationTest, atest FlickerTests:OpenAppColdTest and atest FlickerTests:OpenAppWarmTest
Change-Id: I2a6c74179c07eee86caae08f05430752aa4e084e
2020-02-25 12:55:04 +01:00
Nataniel Borges
992a155b61 New FlickerTests: Create initial flicker tests for Pip
Create an initial set of tests for pip. Initial tests are:
- All regions covered
- Status and navigation bar is always visible
- Pip window is shown, expanded, closed, and doesn't flicker
- Pip layer is shown, expanded, closed, and doesn't flicker
- Background is displayed behind Pip window

Test: atest FlickerTests:PipToHomeTest and atest FlickerTests:PipToAppTest
Change-Id: I16345de39a799744b97a5390495538d568693222
2020-02-25 12:54:43 +01:00
Nataniel Borges
0606f92d7d Print the checksum of the trace file on failure
When the flicker tests fail we log as well what is the checksum of the trace file which was analyzed to ensure that the file which was tested is the same available for debugging. Also, print the checksum information on the test failure message.

Test: atest FlickerTests, then check if the resulting folder contains a ".sha256" file for each WM/SF trace.
Change-Id: I448bf373e3b837c2e40317809d511a0f5236de1f
2020-02-10 11:06:57 +01:00
Automerger Merge Worker
01a6af0611 Merge "Reduce the number of rotations of flicker tests" am: b6d051c228 am: 77f788067d am: 425a97149a
Change-Id: Ie7551934d419d5c9ca102e0b5b86f28a7c8f2b97
2020-01-28 21:14:25 +00:00
Automerger Merge Worker
e1422db2b9 Merge "Disable flaky flicker tests" am: e56396645b am: 29ff225c90 am: 575f7ef7bb
Change-Id: I53636801cc06fe23eccb35e033770b504a166073
2020-01-28 21:13:34 +00:00
Jorim Jaggi
b6d051c228 Merge "Reduce the number of rotations of flicker tests" 2020-01-28 20:34:21 +00:00
Jorim Jaggi
e56396645b Merge "Disable flaky flicker tests" 2020-01-28 20:34:11 +00:00
Nataniel Borges
0f5ebe8048 Disable flaky flicker tests
These tests are still flaky. Disable them for now so that we can move the flicker tests to presubmit.

Test: atest FlickerTests
Change-Id: I811f32723cdbaece3aff7d6dbb100c0c5b2653fa
2020-01-28 16:58:36 +01:00
Nataniel Borges
e894f6a870 Reduce the number of rotations of flicker tests
To reduce the flicker test time, reduce the tests to consider only:
* Start test at 0 degrees
* Start test at 90 degrees
* Rotation tests from 0 to 90 degrees
* Rotation tests from 90 to 0 degrees

Also, execute each action a single time.

Test: atest FlickerTest
Change-Id: I5976cf950998a8150fd5a1b32f0f1432cd731ee1
2020-01-28 16:47:18 +01:00
Automerger Merge Worker
85ca06ebbf Merge "Disable seamless rotation on flicker tests" am: 35d3ce82d4 am: 776b515187 am: e56d164d1a
Change-Id: I35180b88fb0fbe6e624b183dd39a4247feb1c0cb
2020-01-27 13:37:22 +00:00
Nataniel Borges
239e4bffff Disable seamless rotation on flicker tests
Due to bug b/147659548 the seamless rotation is not working properly on the flicker tests. Disable the test until the bug is fixed.

Test: atest FlickerTests
Change-Id: Ib286cadde9019e12dbf7c673cb7f60b53a1687bf
2020-01-21 11:26:47 +01:00
Jorim Jaggi
1473439a19 Merge "Automatically clean up flicker test data" am: d915fc7025 am: ade366490a
am: 2d3934fcaa

Change-Id: I1a2be40c54e4025d4c160e2f6beaa61aa1eb51db
2019-12-09 06:32:34 -08:00
Nataniel Borges
9f2ad75a6e Automatically clean up flicker test data
Currently the flicker tests leave data on the /sdcard/flicker directory. We now clean up this data after the test.

The logs are still available in the atest results directory.

Test: atest FlickerTests
Change-Id: Ia83cbedff3104964e3d4be14a7c035f2193d36a8
2019-12-04 10:38:42 +01:00
Nataniel Borges
2447db9d17 Merge "Include janky runs on flicker rotation tests" am: 3341bbefea am: fcc1ef2d7d
am: e1367ec912

Change-Id: I4030670dd2f0068511dba0f4ccb4e49138b748d5
2019-11-26 08:48:29 -08:00
Treehugger Robot
3341bbefea Merge "Include janky runs on flicker rotation tests" 2019-11-26 16:29:45 +00:00
Nataniel Borges
8e65a898ec Include janky runs on flicker rotation tests
Sometimes the tests crash because all runs are janky. Our checks are so far robust to jank, so we will consider janky runs too

Test: atest FlickerTests
Change-Id: I20303d530e1a9cc266230530c6f7fa1cecd51020
2019-11-26 11:46:42 +01:00
Jorim Jaggi
670b181d0a Merge "Record videos of the flicker tests" am: 6d5457bbb8 am: fcc92a701e
am: b2803b2350

Change-Id: I383ce0f59d16181634b3d298bba758a5355bfd8e
2019-11-13 08:08:20 -08:00
Nataniel Borges
4512ac6fa8 Record videos of the flicker tests
After a change in the flickerlib the videos are no longer recorded by
default. The tests which need to record a video must signal it.

Test: atest FlickerTests, check if the video exists in /sdcard/flicker
Change-Id: I8e74411ca6bf654ec7c0afcacf1c0591610f50bb
2019-11-12 16:07:28 +01:00
Jorim Jaggi
40367bbd1b Also run flicker tests on cloud
Such that we can compare real device and cloud result

Test: Builds
Change-Id: I1f8cd0c7e6a2344a35c70e0222541058edf330ce
2019-11-07 17:45:44 +01:00
Vishnu Nair
ff8a65e941 Add FlickerTests to run only on crosshatch in postsubmit
These tests are timing dependent and require the DUT to have the same performance
characteristics as the real devices.

Test: cd frameworks/base/tests/FlickerTests && atest :postsubmit
Change-Id: Ie836aa0a5df1050733169c8bd16adaccbfdf5e3c
2019-10-16 15:09:46 +00:00
Treehugger Robot
f2a739d5f0 Merge changes from topic "flicker-rotation"
* changes:
  New FlickerTests: Run split screen tests at 0 and 90 degrees
  New FlickerTests: Start app warm and cold at both 0 and 90 degrees
  New FlickerTests: Start IME alongside the app (0 and 90 degrees)
  New FlickerTests: Start IME tests with app rotated by 90 degrees
2019-09-27 14:21:58 +00:00
Nataniel Borges
40c517afac New FlickerTests: Run split screen tests at 0 and 90 degrees
Test: atest ResizeSplitScreenTest
Change-Id: I44b0733f8abbb022f2a00072bbb398e6d29699c7
2019-09-26 17:46:47 +02:00
Nataniel Borges
97572097a4 Add secure settings to the test apps
When running the flicker tests on postsubmit the apps require the following permission: "android.permission.WRITE_SECURE_SETTINGS"

Test: atest FlickerTests
Change-Id: I6a2647fb6d2351617297b3f89ae3f3edc1aad981
2019-09-26 12:01:57 +02:00
Nataniel Borges
d051c3b767 New FlickerTests: Start app warm and cold at both 0 and 90 degrees
Test: atest OpenAppColdTest OpenAppWarmTest
Change-Id: I1ea7377a07938b583c537b3db2da7bd5a3fc0ae1
2019-09-25 16:12:18 +02:00
Nataniel Borges
4bfe816030 New FlickerTests: Start IME alongside the app (0 and 90 degrees)
Test: atest FlickerTests:CloseImeAutoOpenWindowToAppTest
Change-Id: I8ed60eb5e4653cdcf4d31402069be7da96c5d2bb
2019-09-25 16:11:14 +02:00
Nataniel Borges
89888bf124 New FlickerTests: Start IME tests with app rotated by 90 degrees
Test: atest FlickerTests:CloseImeWindowToAppTest FlickerTests:CloseImeWindowToHomeTest
Change-Id: Ib78e3ecf5629938b722e067027098b8c43a64771
2019-09-25 16:10:50 +02:00
Nataniel Borges
0e476aa881 Ignore flicker tests with open bugs
Some flicker tests are failing because of open bugs. Mark them as
ignored until the bugs are fixed to prevent test failures.

Test: atest FlickerTests
Change-Id: If9216bccc32d64cd32ff87fae785df200eae8b79
2019-09-18 17:18:22 +02:00