mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
feat(openthread): fix ci avahi service cases issue
This commit is contained in:
@ -426,9 +426,10 @@ def start_avahi() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def host_close_service() -> None:
|
def host_close_service() -> None:
|
||||||
command = 'ps aux | grep avahi-publish-s'
|
command = 'ps auxww | grep avahi-publish-s'
|
||||||
out_bytes = subprocess.check_output(command, shell=True, timeout=5)
|
out_bytes = subprocess.check_output(command, shell=True, timeout=5)
|
||||||
out_str = out_bytes.decode('utf-8')
|
out_str = out_bytes.decode('utf-8')
|
||||||
|
print('host close service avahi status:\n', out_str)
|
||||||
service_info = [line for line in out_str.splitlines() if 'testxxx _testxxx._udp' in line]
|
service_info = [line for line in out_str.splitlines() if 'testxxx _testxxx._udp' in line]
|
||||||
for line in service_info:
|
for line in service_info:
|
||||||
print('Process:', line)
|
print('Process:', line)
|
||||||
@ -468,7 +469,7 @@ def open_host_interface() -> None:
|
|||||||
def get_domain() -> str:
|
def get_domain() -> str:
|
||||||
hostname = socket.gethostname()
|
hostname = socket.gethostname()
|
||||||
print('hostname is: ', hostname)
|
print('hostname is: ', hostname)
|
||||||
command = 'ps -aux | grep avahi-daemon | grep running'
|
command = 'ps -auxww | grep avahi-daemon | grep running'
|
||||||
out_str = subprocess.getoutput(command)
|
out_str = subprocess.getoutput(command)
|
||||||
print('avahi status:\n', out_str)
|
print('avahi status:\n', out_str)
|
||||||
role = re.findall(r'\[([\w\W]+)\.local\]', str(out_str))[0]
|
role = re.findall(r'\[([\w\W]+)\.local\]', str(out_str))[0]
|
||||||
|
Reference in New Issue
Block a user