Commit Graph

124 Commits

Author SHA1 Message Date
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Vinit Nayak
6b7cc3fdc2 Re-enable orientation sensor for Overview animation
Slight revert of ag/10668129 with adjustment
of disabling it for tests.

Fixes: 151456795
Test: Ran the labtest command for OOP
tests for crosshatch (where this issue
was first detected)

Change-Id: I315d138c2e4a6d4068304e9b5fb2e1b7feb34e63
2020-04-02 11:07:10 -07:00
vadimt
7a9f1628f2 Repeating unlocking the phone several times
Bug: 151613234
Change-Id: Id5cbc247d7827fa31c2011d817b2964c1486daeb
2020-03-21 15:09:39 -07:00
vadimt
7500c241ac Increasing wait time till unlock
Bug: 151613234
Change-Id: I47e0a87551cebf31fa309b9a65b2ecff809a7f00
2020-03-21 13:04:15 -07:00
vadimt
330fde4aaf Adding more checks around unlocking the phone
Bug: 151613234
Change-Id: I045306cce2ce85d6895c9f050ebb4d2bd15ba232
2020-03-20 18:55:53 -07:00
vadimt
1b4247d9cd Disable battery defender to avoid locking during the test
Bug: 151613234
Change-Id: Id323025c1a3bb53cc39839aa2295fcd25436e68e
2020-03-20 14:26:31 -07:00
vadimt
d8070756f1 Making sure the device doesn't lock during test execution
Unlocking the device at the beginning
of the test does help, but perhaps we should prevent
locking during the test execution.
Some failures still remain.

Bug: 151613234
2020-03-19 20:33:47 +00:00
vadimt
14b60d77b7 Unlocking device from the test
This is a workaround for the infra not unlocking
the device properly.

I don't have access to may machine, so
I've created this CL in Gerrit editor, didn't test,
but it should work.

Bug: 151613234
2020-03-19 17:59:34 +00:00
TreeHugger Robot
f67ab6c64d Merge "Catching everything from dumpHprofData" into ub-launcher3-master 2020-03-06 02:14:19 +00:00
vadimt
bb2bf277c0 Catching everything from dumpHprofData
Change-Id: I79ced1d4bb3e6ea43ce6fa5bd07fe22b577006f9
2020-03-05 17:22:18 -08:00
vadimt
6d605da821 Verifying that tests run against a matching Launcher version
Change-Id: I3a6c9e1a2487cfd571abdf4bdd18ab17c7ac9406
2020-03-05 13:36:12 -08:00
vadimt
3d9dad3b9b Saving heap dump immediately as reported by StrictMode
Can do this via API with the exact heap state that triggered the
callback because using API allows to avoid deadlock that we'd have in
main thread if we used shell command.

checkDetectedLeaks() is still needed, as I'll add throwing an
exception there soon.

Bug: 139137636
Change-Id: I3c8670071b058c5c146ac58bb16152c980553065
2020-03-03 18:21:07 +00:00
Vadim Tryshev
0e0b176361 Merge "Not showing "mismatched events" and other diags after Launcher crashes" into ub-launcher3-master 2020-02-27 19:45:39 +00:00
vadimt
da12b805cc Not showing "mismatched events" and other diags after Launcher crashes
Change-Id: Iee5f8813c3610314d486589bc361466a05da0ecb
2020-02-26 12:19:32 -08:00
vadimt
1779a38290 Using StrictMode to detect activity leaks
Change-Id: I615f641897d57be0cd31be944796c6931ef9ab00
2020-02-25 14:46:27 -08:00
vadimt
b79614cc93 Performing a check for a crashed Launcher process for each UI test 2020-02-25 02:28:32 +00:00
TreeHugger Robot
ae5e991f5e Merge "Not crashing tests when a test fails to deinitialize" into ub-launcher3-master 2020-01-29 21:46:27 +00:00
Tony Wickham
8a054061ef Change LauncherState to Supplier<LauncherState> in tests
This prevents the test from statically initializing LauncherState and
all its static dependencies, which might lead to runtime exceptions in
out-of-proc tests.

Change-Id: I0e4e09dfb31a8b256c2c0c0b3d1d2ecd0cc92230
2020-01-28 18:07:33 -08:00
vadimt
053cb7a6e6 Not crashing tests when a test fails to deinitialize
This causes nondescript diags "Test failed to run to completion.
Reason: 'Instrumentation run failed due to 'Process crashed.''. Check
device logcat for details"

Now quietly skipping all consequent tests after such failure.

Change-Id: I3747cda1a3094bfe82e27eae39ba9e9dfd4af9b6
2020-01-27 19:26:00 -08:00
Vadim Tryshev
8cf7b03cad Merge "Adding auto-investigation of one more flake" into ub-launcher3-master 2020-01-23 20:17:33 +00:00
vadimt
29d8b54957 Disabling events checks for successful gestures by default
Launcher tests will still perform checks upon every gesture completion.

All tests using tapl will still use events for diagnostics if the
gesture fails.

The benefit is that system health and other platform tests won't have to
use expensive logcat, and moreover, wait seconds for the events to
appear in logcat because of buffering in logcat.

Change-Id: I3b5a0965d9432144d0c4a8b40ebe2fa89b19a689
2020-01-22 19:16:32 -08:00
vadimt
2c6316be46 Adding auto-investigation of one more flake
Reshuffling the tests to make the investigator the outmost rule and run
the code that throws the original exception inside the investigator.

Change-Id: I714717a9b616862db5ce59116138ba7ea6ceb971
2020-01-21 19:06:59 -08:00
TreeHugger Robot
c9a907bec1 Merge "Removing temporary workarounds to make tests pass on Cuttlefish" into ub-launcher3-master 2019-12-16 22:37:09 +00:00
vadimt
08eca2fa2e Removing temporary workarounds to make tests pass on Cuttlefish
Bug: 136278866
Change-Id: Ie537a578bb871921c0cbea1f197261e703de98f5
2019-12-12 18:15:48 -08:00
vadimt
2eb48498b4 Improving navigation mode switch rule and around
Logging assertion failures.
Modifying waits for condition to avoid timing out the whole test if the
iteration takes too long in favor of failing with an actionable diag.

Bug: 145985438
Change-Id: Ie32d93e1548ce6ec64c38449eb1be1287ff9cf56
2019-12-12 15:10:52 -08:00
vadimt
f9e559275d Making the default launcher rule outer for the Portrait-Landscape one
Portrait-Landscape uses Launcher activity and needs it to be set up
correctly.

Change-Id: I13c9712647b3e45a259039d7968bb95cfe8158ef
2019-11-19 13:36:29 -08:00
vadimt
137f5b62ac Improve diags when system errors cause failing Launcher tests
Now, for example, we won't diagnose a locked phone as a
"home button not showing in 3-button mode", even though it's technically
correct.

Change-Id: Ibdfa0741af7ff8545a811f6702dda74dc6c31c2e
2019-11-04 14:50:22 -08:00
Tony Wickham
bc42d64c85 Fix testQuickSwitchFromApp
Instead of starting getAppPackageName() and relying on it being our Test
Pin Item activity, instead launch our own test activities with the
FLAG_ACTIVITY_MULTIPLE_TASK and FLAG_ACTIVITY_NEW_DOCUMENT flags.

Test:
- Locally run testQuickSwitchFromApp() from Android Studio
- flake -oop -t com.android.quickstep.TaplTestsQuickstep#testQuickSwitchFromApp

Bug: 140252765
Change-Id: Ie137261ce65bfd3dd39df78d57784854a026e967
2019-10-23 23:42:19 +00:00
TreeHugger Robot
f31dab5e02 Merge "Removing static instance of LauncherAppsCompat and unnecessary wrapper classes" into ub-launcher3-master 2019-10-08 18:49:36 +00:00
Sunny Goyal
e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07:00
Sunny Goyal
b0adac23e0 Removing access to LauncherModel.getCallbacks
Bug: 137568159
Change-Id: Ic074dec6a8981a4b9aabf028cf3b878b532abb11
2019-10-02 14:27:40 -07:00
Vadim Tryshev
67138875fa Merge "Not unlocking phone on the test start" into ub-launcher3-qt-qpr1-dev am: 872a380b59
am: 4c420047cf

Change-Id: I23f87d541771baa7ba3e5857999a5e5c96c301ce
2019-09-30 14:01:37 -07:00
Vadim Tryshev
4c420047cf Merge "Not unlocking phone on the test start" into ub-launcher3-qt-qpr1-dev
am: 872a380b59

Change-Id: I6e0831a2660459803eef6c755e4fcfc9f414c94f
2019-09-30 13:54:36 -07:00
vadimt
ee3db65ecc Not unlocking phone on the test start
Somehow tests unlock the phone anyways.

Bug: 141772190
Change-Id: I66de70ec10a7e9ae05ba942570bf9eff9d9e7a82
2019-09-30 12:48:47 -07:00
Vadim Tryshev
6254e5e246 Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev am: dd079691c1
am: 1430f132f3

Change-Id: If494e30957893c4e3414ebdbd274601d16a66a98
2019-09-27 13:28:18 -07:00
Vadim Tryshev
1430f132f3 Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev
am: dd079691c1

Change-Id: I7419be6416f26274bf03abfd84eedef20fd6f084
2019-09-27 13:21:46 -07:00
vadimt
2611d79f69 Deprecating LauncherInstrumentation constructor with parameter
Change-Id: I779b4a8fde2db73cced8133f12d1356ad0b8729e
2019-09-27 12:00:09 -07:00
Vadim Tryshev
52b1ff2050 Merge "Not using dropbox entries before the test start for diagnostics" into ub-launcher3-qt-qpr1-dev
am: dcb5412e1c

Change-Id: I70b2434f162f6575a88bcc0b43bdf8cce1cbc359
2019-09-20 19:48:40 -07:00
vadimt
3bdba61542 Not using dropbox entries before the test start for diagnostics
Change-Id: Ieb48d969d86a855c91109f4ace0d636fa01aafc7
Merged-in: Ia060b5d2b98ea9ea3b6e61ae11d610f1a888d7a0
2019-09-21 01:37:56 +00:00
vadimt
6a585df8d1 Not using dropbox entries before the test start for diagnostics
Change-Id: Ia060b5d2b98ea9ea3b6e61ae11d610f1a888d7a0
2019-09-20 18:12:05 -07:00
Sunny Goyal
8f90d5da8a Adding test to check view inflation during swipe up
Bug: 137851409
Change-Id: Ic8e6f0b3c667051b921d1d4fad03c94122ee92e9
2019-09-20 15:36:02 -07:00
Vadim Tryshev
493ea23bfd Merge "Experimenting with detecting whether a test runs in presubmit" into ub-launcher3-qt-qpr1-dev
am: 37cc797fd0

Change-Id: I0ab81659ea9aaf6b75cd1106bbbaf9c75c679a41
2019-09-18 19:33:40 -07:00
vadimt
fead086f2d Experimenting with detecting whether a test runs in presubmit
Change-Id: I386c6ad29182170326c557252fe6e20a8d2af34a
Merged-in: I386c6ad29182170326c557252fe6e20a8d2af34a
2019-09-19 01:18:46 +00:00
vadimt
6d88752eeb Experimenting with detecting whether a test runs in presubmit
Change-Id: I386c6ad29182170326c557252fe6e20a8d2af34a
2019-09-19 00:59:32 +00:00
Sunny Goyal
ed83cf6df0 Adding recents test for 3P Launcher
Bug: 140749967
Change-Id: I3644822accfd229d1e46ca5e43ad827aef776787
2019-09-17 13:41:10 -07:00
TreeHugger Robot
f3fd35d5f2 Merge "Adding flickerlib test" into ub-launcher3-master 2019-09-11 20:33:01 +00:00
Vadim Tryshev
c698c0cdbb Merge "Adding a test method to get a Launcher object when it becomes non-null" into ub-launcher3-qt-qpr1-dev
am: b34f951e7e

Change-Id: Id63a1df1aef2f35b0f6cdb0f8ab851163c8140c9
2019-09-09 14:17:20 -07:00
vadimt
84fa5893e7 Enabling some tests in landscape mode
am: 8c2efd0de0

Change-Id: If74fe6cec774787f73f43aae43863cd71887b81f
2019-09-09 14:17:08 -07:00
Winson Chung
11ae8642dc Adding flickerlib test
Bug: 140244969
Change-Id: I45edfbbfb85fa371435ad0940cd939ed3d28c374
2019-09-05 17:14:09 -07:00
Vadim Tryshev
b34f951e7e Merge "Adding a test method to get a Launcher object when it becomes non-null" into ub-launcher3-qt-qpr1-dev 2019-09-05 18:49:10 +00:00