Merge "Throw an error if a shell command results in an error."
This commit is contained in:
commit
90a74273e7
1 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
|
|||
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 class NetworkPolicyTestUtils {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue