Home
last modified time | relevance | path

Searched refs:ShellCommandUtils (Results 1 – 25 of 33) sorted by relevance

12

/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/utils/
DShellCommandUtilsTest.java51 assertThat(ShellCommandUtils.executeCommand(LIST_USERS_COMMAND)) in executeCommand_returnsOutput()
61 () -> ShellCommandUtils.executeCommand(INVALID_COMMAND_LEGACY_OUTPUT)); in executeCommand_invalidCommand_legacyOutput_throwsException()
72 assertThat(ShellCommandUtils.executeCommand(INVALID_COMMAND_LEGACY_OUTPUT)) in executeCommand_invalidCommand_legacyOutput_preAndroid11_throwsException()
80 ShellCommandUtils.executeCommandAndValidateOutput( in executeCommandAndValidateOutput_outputFilterMatched_returnsOutput()
88 () -> ShellCommandUtils.executeCommandAndValidateOutput( in executeCommandAndValidateOutput_outputFilterNotMatched_throwsException()
95 () -> ShellCommandUtils.executeCommand(INVALID_COMMAND_CORRECT_OUTPUT)); in executeCommand_invalidCommand_correctOutput_throwsException()
100 assertThat(ShellCommandUtils.startsWithSuccess("suCceSs: ...")).isTrue(); in startsWithSuccess_doesStartWithSuccess_returnsTrue()
105 assertThat(ShellCommandUtils.startsWithSuccess("success")).isTrue(); in startsWithSuccess_equalsSuccess_returnsTrue()
110 assertThat(ShellCommandUtils.startsWithSuccess("not success...")).isFalse(); in startsWithSuccess_doesNotStartWithSuccess_returnsFalse()
116 assertThat(ShellCommandUtils.isRunningAsRoot()).isTrue(); in isRunningAsRoot_true_returnsTrue()
[all …]
/cts/hostsidetests/inputmethodservice/hostside/src/android/inputmethodservice/cts/hostside/
DInputMethodServiceLifecycleTest.java34 import android.inputmethodservice.cts.common.test.ShellCommandUtils;
71 shell(ShellCommandUtils.deleteContent(EventTableConstants.CONTENT_URI)); in setUp()
79 shell(ShellCommandUtils.resetImes()); in tearDown()
98 shell(ShellCommandUtils.listPackage(packageName)).contains(packageName), in installPackageSync()
142 shell(ShellCommandUtils.waitForBroadcastBarrier()); in testSwitchToHandwritingIme()
145 shell(ShellCommandUtils.waitForBroadcastBarrier()); in testSwitchToHandwritingIme()
146 shell(ShellCommandUtils.enableIme(Ime1Constants.IME_ID)); in testSwitchToHandwritingIme()
147 shell(ShellCommandUtils.enableIme(Ime2Constants.IME_ID)); in testSwitchToHandwritingIme()
149 shell(ShellCommandUtils.setCurrentImeSync(Ime1Constants.IME_ID)); in testSwitchToHandwritingIme()
179 shell(ShellCommandUtils.waitForBroadcastBarrier()); in testSwitchToNextInput()
[all …]
/cts/hostsidetests/inputmethodservice/deviceside/devicetest/src/android/inputmethodservice/cts/devicetest/
DInputMethodServiceDeviceTest.java50 import android.inputmethodservice.cts.common.test.ShellCommandUtils;
118 pollingCheck(() -> helper.shell(ShellCommandUtils.getCurrentIme()) in testSwitchToNextInputMethod()
121 helper.shell(ShellCommandUtils.broadcastIntent( in testSwitchToNextInputMethod()
124 pollingCheck(() -> !helper.shell(ShellCommandUtils.getCurrentIme()) in testSwitchToNextInputMethod()
140 final String initialIme = helper.shell(ShellCommandUtils.getCurrentIme()); in switchToPreviousInputMethod()
141 helper.shell(ShellCommandUtils.setCurrentImeSync(Ime2Constants.IME_ID)); in switchToPreviousInputMethod()
146 helper.shell(ShellCommandUtils.broadcastIntent( in switchToPreviousInputMethod()
149 pollingCheck(() -> helper.shell(ShellCommandUtils.getCurrentIme()) in switchToPreviousInputMethod()
191 helper.shell(ShellCommandUtils.broadcastIntent( in testSwitchToHandwritingInputMethod()
196 pollingCheck(() -> helper.shell(ShellCommandUtils.getCurrentIme()) in testSwitchToHandwritingInputMethod()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/adb/
DAdb.kt20 import com.android.bedstead.nene.utils.ShellCommandUtils
32 fun isRootAvailable(): Boolean = ShellCommandUtils.isRootAvailable(); in isRootAvailable()
/cts/common/device-side/bedstead/modules/adb/src/main/kotlin/com/android/bedstead/adb/
DAdb.kt19 import com.android.bedstead.nene.utils.ShellCommandUtils
31 fun isRootAvailable(): Boolean = ShellCommandUtils.isRootAvailable()
/cts/tests/inputmethod/installtests/src/android/view/inputmethod/cts/installtests/
DMultiUserTest.java43 import android.view.inputmethod.cts.installtests.common.ShellCommandUtils;
111 runShellCommandOrThrow(ShellCommandUtils.resetImesForAllUsers()); in tearDown()
113 runShellCommandOrThrow(ShellCommandUtils.wakeUp()); in tearDown()
114 runShellCommandOrThrow(ShellCommandUtils.dismissKeyguard()); in tearDown()
115 runShellCommandOrThrow(ShellCommandUtils.closeSystemDialog()); in tearDown()
145 runShellCommandOrThrow(ShellCommandUtils.enableIme(Ime1Constants.IME_ID, additionalUserId)); in testAdditionalUser()
147 ShellCommandUtils.setCurrentImeSync(Ime1Constants.IME_ID, additionalUserId)); in testAdditionalUser()
204 runShellCommandOrThrow(ShellCommandUtils.waitForBroadcastBarrier()); in testProfileUser()
209 runShellCommandOrThrow(ShellCommandUtils.enableIme(Ime1Constants.IME_ID, currentUserId)); in testProfileUser()
211 ShellCommandUtils.setCurrentImeSync(Ime1Constants.IME_ID, currentUserId)); in testProfileUser()
[all …]
DInputMethodServiceSwitchingTest.java31 import android.view.inputmethod.cts.installtests.common.ShellCommandUtils;
68 runShellCommandOrThrow(ShellCommandUtils.resetImesForAllUsers()); in tearDown()
81 runShellCommandOrThrow(ShellCommandUtils.enableIme(Ime1Constants.IME_ID, currentUserId)); in testUninstallCurrentIme()
83 ShellCommandUtils.setCurrentImeSync(Ime1Constants.IME_ID, currentUserId)); in testUninstallCurrentIme()
102 runShellCommandOrThrow(ShellCommandUtils.enableIme(Ime1Constants.IME_ID, currentUserId)); in testDisableCurrentIme()
104 ShellCommandUtils.setCurrentImeSync(Ime1Constants.IME_ID, currentUserId)); in testDisableCurrentIme()
DForceStopTest.java32 import android.view.inputmethod.cts.installtests.common.ShellCommandUtils;
85 runShellCommandOrThrow(ShellCommandUtils.resetImesForAllUsers()); in tearDown()
87 runShellCommandOrThrow(ShellCommandUtils.wakeUp()); in tearDown()
88 runShellCommandOrThrow(ShellCommandUtils.dismissKeyguard()); in tearDown()
89 runShellCommandOrThrow(ShellCommandUtils.closeSystemDialog()); in tearDown()
138 runShellCommandOrThrow(ShellCommandUtils.enableIme(Ime1Constants.IME_ID, userId)); in testImeRemainsEnabledAfterForceStopMain()
142 ShellCommandUtils.setCurrentImeSync(Ime1Constants.IME_ID, userId)); in testImeRemainsEnabledAfterForceStopMain()
DMultiUserMockImeTest.java31 import android.view.inputmethod.cts.installtests.common.ShellCommandUtils;
74 runShellCommandOrThrow(ShellCommandUtils.resetImesForAllUsers()); in tearDown()
106 runShellCommandOrThrow(ShellCommandUtils.installExisting( in testProfileSwitching()
109 runShellCommandOrThrow(ShellCommandUtils.installExisting( in testProfileSwitching()
DAdditionalSubtypeLifecycleTest.java37 import android.view.inputmethod.cts.installtests.common.ShellCommandUtils;
108 runShellCommandOrThrow(ShellCommandUtils.resetImesForAllUsers()); in tearDown()
245 ShellCommandUtils.clearPackageData(Ime1Constants.PACKAGE, currentUserId)); in testClearAdditionalInputMethodSubtypeUponClearDataForForegroundUser()
291 ShellCommandUtils.clearPackageData(Ime2Constants.PACKAGE, additionalUserId)); in testClearAdditionalInputMethodSubtypeUponClearDataForBackgroundUser()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/telecom/
DTelecom.kt22 import com.android.bedstead.nene.utils.ShellCommandUtils in <lambda>()
34 .validate { output -> ShellCommandUtils.startsWithSuccess(output) } in <lambda>()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/ui/
DUi.java27 import com.android.bedstead.nene.utils.ShellCommandUtils;
44 return UiDevice.getInstance(ShellCommandUtils.instrumentation()); in device()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/logcat/
DLogcat.java27 import com.android.bedstead.nene.utils.ShellCommandUtils;
74 try (ShellCommandUtils.StreamingShellOutput sso = dump()){ in dump()
94 public ShellCommandUtils.StreamingShellOutput dump() { in dump()
96 return ShellCommandUtils.executeCommandForStream( in dump()
129 try (ShellCommandUtils.StreamingShellOutput sso = dump()){ in findSystemServerExceptions()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/utils/
DShellCommand.java91 !ShellCommandUtils.isRunningAsRoot() && in asRoot()
92 ShellCommandUtils.isSuperUserAvailable(); in asRoot()
224 return ShellCommandUtils.executeCommandAndValidateOutput( in executeSync()
231 return ShellCommandUtils.executeCommand( in executeSync()
315 return ShellCommandUtils.executeCommandForBytes( in execute()
DShellCommandUtils.java49 public final class ShellCommandUtils { class
51 private static final String LOG_TAG = ShellCommandUtils.class.getSimpleName();
68 private ShellCommandUtils() { } in ShellCommandUtils() method in ShellCommandUtils
/cts/tests/inputmethod/installtests/src/android/view/inputmethod/cts/installtests/common/
DShellCommandUtils.java23 public final class ShellCommandUtils { class
26 private ShellCommandUtils() { in ShellCommandUtils() method in ShellCommandUtils
/cts/common/device-side/bedstead/modules/root/src/test/kotlin/com/android/xts/root/
DRootAnnotationExecutorTest.kt23 import com.android.bedstead.nene.utils.ShellCommandUtils
56 ShellCommandUtils.uiAutomation().clearOverridePermissionStates(/* uid = */ -1) in requireRootInstrumentation_isRecognisedAsRootBySystemServer()
/cts/common/device-side/bedstead/modules/root/src/main/kotlin/com/android/xts/root/
DRootAnnotationExecutor.kt26 import com.android.bedstead.nene.utils.ShellCommandUtils
46 ShellCommandUtils.uiAutomation().clearOverridePermissionStates(-1) in <lambda>()
/cts/common/device-side/bedstead/modules/permissions/src/main/kotlin/com/android/bedstead/permissions/
DPermissions.java38 import com.android.bedstead.nene.utils.ShellCommandUtils;
640 ShellCommandUtils.uiAutomation());
739 … TestApisReflectionKt.clearAllOverridePermissionStates(ShellCommandUtils.uiAutomation());
747 TestApisReflectionKt.clearOverridePermissionStates(ShellCommandUtils.uiAutomation(),
753 ShellCommandUtils.uiAutomation(), pkg.uid(user), permission,
759 ShellCommandUtils.uiAutomation(), pkg.uid(user), permission);
775 ShellCommandUtils.uiAutomation().adoptShellPermissionIdentity(permissions);
781 ShellCommandUtils.uiAutomation().adoptShellPermissionIdentity();
787 ShellCommandUtils.uiAutomation().dropShellPermissionIdentity();
/cts/hostsidetests/os/test-apps/StaticSharedLibTestApp/src/android/os/lib/app/
DStaticSharedLibsMultiUserTests.java36 import com.android.bedstead.nene.utils.ShellCommandUtils;
84 return ShellCommandUtils.startsWithSuccess(cmd.execute()); in installPackageAsUser()
94 return ShellCommandUtils.startsWithSuccess(cmd.execute()); in uninstallPackage()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DProfileOwnerTest.kt33 import com.android.bedstead.nene.utils.ShellCommandUtils in <lambda>()
55 .validate { ShellCommandUtils.startsWithSuccess(it) } in <lambda>()
76 .validate { ShellCommandUtils.startsWithSuccess(it) } in <lambda>()
99 .validate { ShellCommandUtils.startsWithSuccess(it) } in <lambda>()
220 .validate { ShellCommandUtils.startsWithSuccess(it) } in <lambda>()
DDeviceOwnerTest.kt43 import com.android.bedstead.nene.utils.ShellCommandUtils in <lambda>()
137 .validate { ShellCommandUtils.startsWithSuccess(it) } in <lambda>()
163 .validate { ShellCommandUtils.startsWithSuccess(it) } in <lambda>()
288 .validate { ShellCommandUtils.startsWithSuccess(it) } in <lambda>()
311 .validate { ShellCommandUtils.startsWithSuccess(it) } in <lambda>()
/cts/hostsidetests/inputmethodservice/common/src/android/inputmethodservice/cts/common/test/
DShellCommandUtils.java24 public final class ShellCommandUtils { class
27 private ShellCommandUtils() {} in ShellCommandUtils() method in ShellCommandUtils
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilitySoftKeyboardTest.java39 import android.inputmethodservice.cts.common.test.ShellCommandUtils;
274 enableImeCommand = ShellCommandUtils.enableIme(imeId); in TestImeSession()
276 enableImeCommand = ShellCommandUtils.disableIme(imeId); in TestImeSession()
287 .addCommand(ShellCommandUtils.resetImes()) in close()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/users/
DUserBuilder.java33 import com.android.bedstead.nene.utils.ShellCommandUtils;
197 commandBuilder.validate(ShellCommandUtils::startsWithSuccess) in create()

12