File tree Expand file tree Collapse file tree
DentOS_Framework/DentOsTestbed/src/dent_os_testbed/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ def pytest_collection_finish(session):
8181 global reboot_after_test
8282 for item in session .items :
8383 # Save the name of the last L1 test in session
84- if " test_l1" in item .name :
84+ if ' test_l1' in item .name :
8585 reboot_after_test = session .items [- 1 ]
8686 break
8787
@@ -100,7 +100,7 @@ def pytest_runtest_setup(item):
100100 if reboot_after_test :
101101 if reboot_after_test .name == item .name :
102102 # Add `reboot_device` fixture to last L1 test
103- item .fixturenames .append (" reboot_device" )
103+ item .fixturenames .append (' reboot_device' )
104104
105105
106106def pytest_runtest_teardown (item , nextitem ):
@@ -174,7 +174,9 @@ async def reboot_device(testbed):
174174 yield
175175 devices = await _get_dent_devs_from_testbed (testbed )
176176 to_reboot = [dev .reboot () for dev in devices ]
177+ up_ports = [dev .run_cmd ('onlpd' ) for dev in devices ]
177178 await asyncio .gather (* to_reboot )
179+ await asyncio .gather (* up_ports )
178180
179181
180182@pytest_asyncio .fixture ()
You can’t perform that action at this time.
0 commit comments