commit | dccd4d04ad65b45928cb3b11a0a57ab924e93f04 | [log] [tgz] |
---|---|---|
author | Sudheer Shanka <sudheersai@google.com> | Fri Apr 15 17:53:47 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Apr 15 17:53:47 2022 +0000 |
tree | 5a977561114484da8e926c534d81edf3b02551b9 | |
parent | bb8601a015124a388013e04ec82e7ac0ef08f326 [diff] | |
parent | 90a74273e72467f9288288c6f304ac79f786de5b [diff] |
Merge "Throw an error if a shell command results in an error." am: 90a74273e7 Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2064787 Change-Id: I0ea6c58e8f48f32ccbcf42c2c07f42c66c453c86 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/NetworkPolicyTestUtils.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/NetworkPolicyTestUtils.java index b6218d2..56be3e3 100644 --- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/NetworkPolicyTestUtils.java +++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/NetworkPolicyTestUtils.java
@@ -25,7 +25,7 @@ import static android.net.wifi.WifiConfiguration.METERED_OVERRIDE_METERED; import static android.net.wifi.WifiConfiguration.METERED_OVERRIDE_NONE; -import static com.android.compatibility.common.util.SystemUtil.runShellCommand; +import static com.android.compatibility.common.util.SystemUtil.runShellCommandOrThrow; import static com.android.cts.net.hostside.AbstractRestrictBackgroundNetworkTestCase.TAG; import static org.junit.Assert.assertEquals; @@ -390,7 +390,7 @@ } public static String executeShellCommand(String command) { - final String result = runShellCommand(command).trim(); + final String result = runShellCommandOrThrow(command).trim(); Log.d(TAG, "Output of '" + command + "': '" + result + "'"); return result; }