Skip to content

Commit

Permalink
Optimize PTF conftest (#221)
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Lisovskyi <[email protected]>
  • Loading branch information
yuriilisovskyi authored Oct 20, 2023
1 parent 936a5f9 commit 7f8e2cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usecases/sai-ptf/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def set_ptf_params(request):
# Clean-up saiserver after previous test session
subprocess.run(["supervisorctl", "restart", "saiserver"], check=True)
except Exception as e:
raise RuntimeError(f"Failed to apply the patch: {e}")
raise RuntimeError(f"Failed to restart the saiserver: {e}")

tb_params.generate_sai_ptf_config_files()
ports = to_ptf_int_list(tb_params.config['dataplane'][0]['port_groups'])
Expand All @@ -46,7 +46,7 @@ def set_ptf_params(request):
# provide required PTF runner params to avoid exiting with an error
sys.argv = ['ptf.py','--test-dir', '/sai-challenger/usecases/sai-ptf/SAI/ptf', *ports]
sys.argv.append("--test-params")
sys.argv.append("thrift_server='127.0.0.1';config_db_json='/sai-challenger/testbeds/config_db.json'")
sys.argv.append(f"thrift_server='{tb_params.config['npu'][0]['client']['config']['ip']}';config_db_json='/sai-challenger/testbeds/config_db.json'")

# load PTF runner module to let it collect test params into ptf.config
import imp
Expand Down

0 comments on commit 7f8e2cd

Please sign in to comment.