mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 10:39:23 +01:00
auto-t: remove waitstatus_to_exitcode for better compatibility
This was added in Python 3.9 which isn't always supported. Instead use the subprocess module which automatically checks the command output.
This commit is contained in:
parent
2e173d4523
commit
327f719f91
@ -12,6 +12,7 @@ from hostapd import HostapdCLI
|
|||||||
import testutil
|
import testutil
|
||||||
from config import ctx
|
from config import ctx
|
||||||
import os, time
|
import os, time
|
||||||
|
import subprocess
|
||||||
|
|
||||||
class Test(unittest.TestCase):
|
class Test(unittest.TestCase):
|
||||||
|
|
||||||
@ -40,8 +41,8 @@ class Test(unittest.TestCase):
|
|||||||
testutil.test_ifaces_connected()
|
testutil.test_ifaces_connected()
|
||||||
|
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
ret = os.system('ip addr show ' + device.name + ' | grep \'inet6 3ffe:501:ffff:100::\'')
|
subprocess.check_output('ip addr show ' + device.name + \
|
||||||
self.assertEqual(os.waitstatus_to_exitcode(ret), 0)
|
' | grep \'inet6 3ffe:501:ffff:100::\'', shell=True)
|
||||||
|
|
||||||
device.disconnect()
|
device.disconnect()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user