Skip to content

Commit

Permalink
[sonic-bgpcfgd] Call Python 3 version of sonic-cfggen for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jleveque committed Nov 6, 2020
1 parent 174b741 commit 9ff7105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sonic-bgpcfgd/tests/test_sonic-cfggen.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def run_test(name, template_path, json_path, match_path):
template_path = os.path.join(TEMPLATE_PATH, template_path)
json_path = os.path.join(DATA_PATH, json_path)
cfggen = os.path.abspath("../sonic-config-engine/sonic-cfggen")
command = ['/usr/bin/python2.7', cfggen, "-T", TEMPLATE_PATH, "-t", template_path, "-y", json_path]
command = ['/usr/bin/python3', cfggen, "-T", TEMPLATE_PATH, "-t", template_path, "-y", json_path]
p = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env={"PYTHONPATH": "."})
stdout, stderr = p.communicate()
assert p.returncode == 0, "sonic-cfggen for %s test returned %d code. stderr='%s'" % (name, p.returncode, stderr)
Expand Down

0 comments on commit 9ff7105

Please sign in to comment.