ethernet: skip tests on devices without support
Test: atest EthernetManagerTest Bug: 239521025 Change-Id: Ie39cc371315899ead8c6991ef8d5e8b95cc0e3a8
This commit is contained in:
parent
dd2eca9e4a
commit
29d4aaabcf
1 changed files with 4 additions and 0 deletions
|
|
@ -306,14 +306,18 @@ class EthernetManagerTest {
|
|||
}
|
||||
}
|
||||
|
||||
private fun isEthernetSupported() = em != null
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
assumeTrue(isEthernetSupported())
|
||||
setIncludeTestInterfaces(true)
|
||||
addInterfaceStateListener(ifaceListener)
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
if (!isEthernetSupported()) return
|
||||
// Reenable ethernet, so ABSENT callbacks are received.
|
||||
setEthernetEnabled(true)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue