We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2020dd7 commit 95a3363Copy full SHA for 95a3363
1 file changed
tests/ip/link_local/test_link_local_ip.py
@@ -61,8 +61,10 @@ def check_if_test_is_supported(duthost):
61
sai_settings = {}
62
sai_profile = "/usr/share/sonic/device/{}/{}/sai.profile".format(platform, hwsku)
63
for line in duthost.command("cat %s" % sai_profile)["stdout_lines"]:
64
- key, value = line.split("=")
65
- sai_settings[key] = value
+ if (not re.match("^[ \t]*#", line)) and re.search("=", line):
+ # line should not a comment, and must contain the "=".
66
+ key, value = line.split("=")
67
+ sai_settings[key] = value
68
if int(sai_settings.get("SAI_NOT_DROP_SIP_DIP_LINK_LOCAL", 0)) != 1:
69
pytest.skip("Test is not supported, SAI_NOT_DROP_SIP_DIP_LINK_LOCAL is not equal 1 or not specified")
70
0 commit comments