From bdb49233968482e736f0b7cd901204cc2126ddce Mon Sep 17 00:00:00 2001 From: Nicolo' Mazzucato Date: Thu, 2 Feb 2023 13:09:06 +0000 Subject: [PATCH] Add instruction to put the device into test harness to error message Bug: 267601529 Test: Run a test while not in test harness mode. Change-Id: I8089503e61831e5dde6f4e659e92a8d75ea18e2b --- .../com/android/launcher3/tapl/LauncherInstrumentation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index ae9ba6787b..2d1c963f9a 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -242,7 +242,8 @@ public final class LauncherInstrumentation { // Launcher should run in test harness so that custom accessibility protocol between // Launcher and TAPL is enabled. In-process tests enable this protocol with a direct call // into Launcher. - assertTrue("Device must run in a test harness", + assertTrue("Device must run in a test harness. " + + "Run `adb shell setprop ro.test_harness 1` to enable it.", TestHelpers.isInLauncherProcess() || ActivityManager.isRunningInTestHarness()); final String testPackage = getContext().getPackageName();