1effff9836
Why I did it test_sai_qos failed because of the following error: "stderr_lines": [ "Traceback (most recent call last):", " File \"/usr/bin/ptf\", line 522, in <module>", " test_modules = load_test_modules(config)", " File \"/usr/bin/ptf\", line 413, in load_test_modules", " mod = imp.load_module(modname, *imp.find_module(modname, [root]))", " File \"saitests/switch.py\", line 19, in <module>", " import switch_sai_thrift", "ImportError: No module named switch_sai_thrift" ], It's because test_sai_qos runs ptf script which imports switch_sai_thrift, switch_sai_thrift is installed from python-saithrift_0.9.4_amd64.deb. For master image, the deb file is for python3, but ptf only has virtual python3 environment, that's why we add --system-site-packages to allow virtual env to access system site-packeges. Add thrift package in docker ptf virtual python3 env, because currently env-python3 doesn't have thrift module which is needed in switch_sai_thrift. How I did it Enable --system-site-packages for virtual py3 env in ptf docker and install thrift for test_qos_sai How to verify it load and login ptf conatiner dpkg - i python-saithrift_0.9.4_amd64.deb source /root/env-python3/bin/activate python import switch_sai_thrift.switch_sai_rpc Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com> |
||
---|---|---|
.. | ||
docker-base | ||
docker-base-bullseye | ||
docker-base-buster | ||
docker-base-stretch | ||
docker-basic_router | ||
docker-config-engine | ||
docker-config-engine-bullseye | ||
docker-config-engine-buster | ||
docker-config-engine-stretch | ||
docker-database | ||
docker-dhcp-relay | ||
docker-eventd | ||
docker-fpm-frr | ||
docker-fpm-gobgp | ||
docker-iccpd | ||
docker-lldp | ||
docker-macsec | ||
docker-mux | ||
docker-nat | ||
docker-orchagent | ||
docker-pde | ||
docker-platform-monitor | ||
docker-ptf | ||
docker-ptf-sai | ||
docker-router-advertiser | ||
docker-sflow | ||
docker-snmp | ||
docker-sonic-mgmt | ||
docker-sonic-mgmt-framework | ||
docker-sonic-p4rt | ||
docker-sonic-restapi | ||
docker-sonic-sdk | ||
docker-sonic-sdk-buildenv | ||
docker-sonic-telemetry | ||
docker-swss-layer-bullseye | ||
docker-swss-layer-buster | ||
docker-teamd | ||
dockerfile-macros.j2 |