Don't run EthernetTetheringTest if Ethernet is not supported
Bug: 288844185 Test: atest CtsTetheringTest Change-Id: Ie918a0657ab17900437918f7ae99f7aa2539052c
This commit is contained in:
parent
5cebcf7d64
commit
dc581e6c8f
1 changed files with 7 additions and 2 deletions
|
|
@ -165,13 +165,18 @@ public abstract class EthernetTetheringTestBase {
|
|||
mHandlerThread.start();
|
||||
mHandler = new Handler(mHandlerThread.getLooper());
|
||||
|
||||
mRunTests = runAsShell(NETWORK_SETTINGS, TETHER_PRIVILEGED, () ->
|
||||
mTm.isTetheringSupported());
|
||||
mRunTests = isEthernetTetheringSupported();
|
||||
assumeTrue(mRunTests);
|
||||
|
||||
mTetheredInterfaceRequester = new TetheredInterfaceRequester(mHandler, mEm);
|
||||
}
|
||||
|
||||
private boolean isEthernetTetheringSupported() throws Exception {
|
||||
if (mEm == null) return false;
|
||||
|
||||
return runAsShell(NETWORK_SETTINGS, TETHER_PRIVILEGED, () -> mTm.isTetheringSupported());
|
||||
}
|
||||
|
||||
protected void maybeStopTapPacketReader(final TapPacketReader tapPacketReader)
|
||||
throws Exception {
|
||||
if (tapPacketReader != null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue