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> |
||
---|---|---|
.. | ||
conf.d | ||
brcm_interface_to_front_map.ini | ||
Dockerfile.j2 | ||
msn_2700_interface_to_front_map.ini | ||
ptf_tgen.sh | ||
supervisord.conf |