auto-t: cleanup the few uses of is_verbose

These were used outside of run-tests in a couple places. Replace
these with Process.is_verbose()
This commit is contained in:
James Prestwood 2022-04-06 12:14:52 -07:00 committed by Denis Kenzior
parent e70d7e0857
commit 1a903001f9
2 changed files with 7 additions and 2 deletions

View File

@ -11,6 +11,8 @@ import testutil
from config import ctx from config import ctx
from wpas import Wpas from wpas import Wpas
from utils import Process
class Test(unittest.TestCase): class Test(unittest.TestCase):
leases_path = '/tmp/dhcp.lease' leases_path = '/tmp/dhcp.lease'
@ -110,7 +112,7 @@ class Test(unittest.TestCase):
self.assertEqual(wpas.p2p_group['go_ip_addr'], '192.168.1.1') self.assertEqual(wpas.p2p_group['go_ip_addr'], '192.168.1.1')
extra_params = [] extra_params = []
if ctx.is_verbose('dhclient'): if Process.is_verbose('dhclient'):
extra_params.append('-v') extra_params.append('-v')
dhcp = ctx.start_process(['dhclient', '-d', '--no-pid', '-cf', '/dev/null', '-lf', self.leases_path, dhcp = ctx.start_process(['dhclient', '-d', '--no-pid', '-cf', '/dev/null', '-lf', self.leases_path,

View File

@ -3,8 +3,11 @@ import os
import socket import socket
from gi.repository import GLib from gi.repository import GLib
from config import ctx from config import ctx
import binascii import binascii
from utils import Process
ctrl_count = 0 ctrl_count = 0
class Wpas: class Wpas:
@ -31,7 +34,7 @@ class Wpas:
self.io_watch = None self.io_watch = None
cmd = ['wpa_supplicant', '-i', self.interface.name, '-c', self.config_path] cmd = ['wpa_supplicant', '-i', self.interface.name, '-c', self.config_path]
if ctx.is_verbose('wpa_supplicant-dbg'): if Process.is_verbose('wpa_supplicant-dbg'):
cmd += ['-d'] cmd += ['-d']
self.wpa_supplicant = ctx.start_process(cmd) self.wpa_supplicant = ctx.start_process(cmd)