Install python-subnettree to sonic-mgmt container. #3978
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
install python-subnettree to sonic-mgmt container.
sonic@6c789c1e31c6:~/sonic-mgmt/tests$ py.test -k 'platform' --host-pattern=2-4_t0 --module-path ../ansible/library/ --testbed_file=testbed.csv --inventory=lab --testbed=2-4_t0 --show-capture=stdout --duration=0 -v --ignore=platform/me llanox
============================================================================================================ test session starts ============================================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.7, py-1.8.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
ansible: 2.8.7
rootdir: /var/sonic/sonic-mgmt
plugins: ansible-2.2.2
collecting ...
collecting 474 items / 2 errors / 472 selected
collected 487 items / 4 errors / 471 deselected / 12 selected
================================================================================================================== ERRORS ===================================================================================================================
_____________________________________________________________________________________________ ERROR collecting tests/ptftests/IP_decap_test.py ______________________________________________________________________________________________
ImportError while importing test module '/var/sonic/sonic-mgmt/tests/ptftests/IP_decap_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
ptftests/IP_decap_test.py:58: in
import fib
ptftests/fib.py:3: in
from lpm import LpmDict
ptftests/lpm.py:4: in
from SubnetTree import SubnetTree
E ImportError: No module named SubnetTree
________________________________________________________________________________________________ ERROR collecting tests/ptftests/fib_test.py ________________________________________________________________________________________________
ImportError while importing test module '/var/sonic/sonic-mgmt/tests/ptftests/fib_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
ptftests/fib_test.py:28: in
import fib
ptftests/fib.py:3: in
from lpm import LpmDict
ptftests/lpm.py:4: in
from SubnetTree import SubnetTree
E ImportError: No module named SubnetTree
_______________________________________________________________________________________________ ERROR collecting tests/ptftests/hash_test.py ________________________________________________________________________________________________
ImportError while importing test module '/var/sonic/sonic-mgmt/tests/ptftests/hash_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
ptftests/hash_test.py:25: in
import fib
ptftests/fib.py:3: in
from lpm import LpmDict
ptftests/lpm.py:4: in
from SubnetTree import SubnetTree
E ImportError: No module named SubnetTree
________________________________________________________________________________________________ ERROR collecting tests/ptftests/vrf_test.py ________________________________________________________________________________________________
ImportError while importing test module '/var/sonic/sonic-mgmt/tests/ptftests/vrf_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
ptftests/vrf_test.py:21: in
from fib_test import FibTest
ptftests/fib_test.py:28: in
import fib
ptftests/fib.py:3: in
from lpm import LpmDict
ptftests/lpm.py:4: in
from SubnetTree import SubnetTree
E ImportError: No module named SubnetTree
- How I did it
add intall python-subnettree command
- How to verify it
test sonic-mgmt pytest
sonic@6c789c1e31c6:~/sonic-mgmt/tests$ py.test -k 'platform' --host-pattern=2-4_t0 --module-path ../ansible/library/ --testbed_file=testbed.csv --inventory=lab --testbed=2-4_t0 --show-capture=stdout --duration=0 -v --ignore=platform/mel
llanox
============================================================================================================ test session starts ============================================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.7, py-1.8.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
ansible: 2.8.7
rootdir: /var/sonic/sonic-mgmt
plugins: ansible-2.2.2
collecting ...
collected 502 items / 486 deselected / 16 selected
platform/test_platform_info.py::test_show_platform_summary PASSED [ 6%]
platform/test_platform_info.py::test_show_platform_psustatus PASSED [ 12%]
platform/test_platform_info.py::test_turn_on_off_psu_and_check_psustatus SKIPPED [ 18%]
platform/test_platform_info.py::test_show_platform_syseeprom PASSED [ 25%]
platform/test_reboot.py::test_cold_reboot FAILED [ 31%]
platform/test_reboot.py::test_fast_reboot FAILED [ 37%]
platform/test_reboot.py::test_warm_reboot FAILED [ 43%]
platform/test_reboot.py::test_power_off_reboot[15] SKIPPED [ 50%]
platform/test_reboot.py::test_power_off_reboot[5] SKIPPED [ 56%]
platform/test_reboot.py::test_watchdog_reboot FAILED [ 62%]
platform/test_reload_config.py::test_reload_configuration PASSED [ 68%]
platform/test_sequential_restart.py::test_restart_swss FAILED [ 75%]
platform/test_sequential_restart.py::test_restart_syncd SKIPPED [ 81%]
platform/test_sfp.py::test_check_sfp_status_and_configure_sfp PASSED [ 87%]
platform/test_sfp.py::test_check_sfp_low_power_mode PASSED [ 93%]
platform/test_xcvr_info_in_db.py::test_xcvr_info_in_db PASSED [100%]
================================================================================================================= FAILURES ==================================================================================================================