-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L1 tests reboot device #84
base: master
Are you sure you want to change the base?
Conversation
yield | ||
devices = await _get_dent_devs_from_testbed(testbed) | ||
to_reboot = [dev.reboot() for dev in devices] | ||
# up_ports = [dev.run_cmd("sudo onlpdump -S") for dev in devices] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can not perform onlpdump
on the device. -> cmd not found
bde955a
to
4ba1a94
Compare
DentOS_Framework/DentOsTestbed/src/dent_os_testbed/test/conftest.py
Outdated
Show resolved
Hide resolved
761b676
to
35ca1d6
Compare
35ca1d6
to
131ad5d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
131ad5d
to
20ffb68
Compare
This comment was marked as resolved.
This comment was marked as resolved.
f410ad9
to
5b01ffb
Compare
if reboot_after_test: | ||
if reboot_after_test.name == item.name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if reboot_after_test: | |
if reboot_after_test.name == item.name: | |
if reboot_after_test and reboot_after_test.name == item.name: |
to_reboot = [dev.reboot() for dev in devices] | ||
up_ports = [dev.run_cmd('onlpd') for dev in devices] | ||
await asyncio.gather(*to_reboot) | ||
await asyncio.gather(*up_ports) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to_reboot = [dev.reboot() for dev in devices] | |
up_ports = [dev.run_cmd('onlpd') for dev in devices] | |
await asyncio.gather(*to_reboot) | |
await asyncio.gather(*up_ports) | |
await asyncio.gather(*[dev.reboot() for dev in devices]) | |
# https://github.com/dentproject/dentOS/issues/152#issuecomment-973264204 | |
await asyncio.gather(*[dev.run_cmd('onlpd') for dev in devices]) |
Signed-off-by: Stepan Vovk <[email protected]>
2f19191
to
fe531c5
Compare
Objective: if in collected tests we have at least one test_l1 we will sort the list with collected test items, and to the last test of the list(which will be last L1 test) we add additional fixture which will reboot device
def pytest_collection_modifyitems(session, config, items)
will perform sorting of ALL the items based on the key providedpytest_collection_finish(session)
hook we will select last test within current session and set the test where to add reboot fixtureasync def reboot_device(testbed)
will perform reboot of the devicepytest_runtest_setup(item):
we modify the last item in sortedsession.items
list and addrebot_device
fixture