summaryrefslogtreecommitdiff
path: root/tests/AppLaunch/src
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2018-09-26 14:09:44 -0700
committerCalin Juravle <calin@google.com>2018-09-26 14:09:44 -0700
commit55db8ff9a6fa383134142f65d0b1d0da9957411d (patch)
tree85214f64947e72a4803420f6357ffcda9d3c37bf /tests/AppLaunch/src
parent5c9a0085a3366b4c7f00586dba9691fac9016f22 (diff)
Fix trial run in AppLaunch test
If the app does not exist log an error but do not fail the test. Test: atest google/test/performance/app-install-startup -v Change-Id: Idb6f1d0ba3c5bfb6c7985cd84f5aa4e0599c6b59
Diffstat (limited to 'tests/AppLaunch/src')
-rw-r--r--tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
index 4a6fe49f2676..1f60b71c3c0f 100644
--- a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
+++ b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
@@ -247,8 +247,14 @@ public class AppLaunch extends InstrumentationTestCase {
mIterationCycle = false;
// In the "applaunch.txt" file, trail launches is referenced using
// "TRIAL_LAUNCH"
- String appPkgName = mNameToIntent.get(launch.getApp())
- .getComponent().getPackageName();
+ Intent startIntent = mNameToIntent.get(launch.getApp());
+ if (startIntent == null) {
+ Log.w(TAG, "App does not exist: " + launch.getApp());
+ mResult.putString(mNameToResultKey.get(launch.getApp()),
+ "App does not exist");
+ continue;
+ }
+ String appPkgName = startIntent.getComponent().getPackageName();
if (SPEED_PROFILE_FILTER.equals(launch.getCompilerFilter())) {
assertTrue(String.format("Not able to compile the app : %s", appPkgName),
compileApp(VERIFY_FILTER, appPkgName));