diff --git a/tests/conftest.py b/tests/conftest.py index b53f5dbcc5ca..35a96f0007cf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -92,7 +92,7 @@ def pytest_addoption(parser): parser.addoption("--graceful-stop", action="store_true", default=False, - help="Stop swss before stopping a conatainer") + help="Stop swss and syncd before stopping a conatainer") def random_string(size=4, chars=string.ascii_uppercase + string.digits): @@ -670,6 +670,10 @@ def stop_swss(self): self.runcmd(['sh', '-c', cmd]) time.sleep(5) + def stop_syncd(self): + self.runcmd(['sh', '-c', 'supervisorctl stop syncd']) + time.sleep(5) + # deps: warm_reboot def start_zebra(self): self.runcmd(['sh', '-c', 'supervisorctl start zebra']) @@ -1792,6 +1796,7 @@ def update_dvs(log_path, new_dvs_env=[]): if graceful_stop: dvs.stop_swss() + dvs.stop_syncd() dvs.get_logs() dvs.destroy()