Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/ip/link_local/test_link_local_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ def check_if_test_is_supported(duthost):
sai_settings = {}
sai_profile = "/usr/share/sonic/device/{}/{}/sai.profile".format(platform, hwsku)
for line in duthost.command("cat %s" % sai_profile)["stdout_lines"]:
key, value = line.split("=")
sai_settings[key] = value
if (not re.match("^[ \t]*#", line)) and re.search("=", line):
# line should not a comment, and must contain the "=".
key, value = line.split("=")
sai_settings[key] = value
if int(sai_settings.get("SAI_NOT_DROP_SIP_DIP_LINK_LOCAL", 0)) != 1:
pytest.skip("Test is not supported, SAI_NOT_DROP_SIP_DIP_LINK_LOCAL is not equal 1 or not specified")

Expand Down
Loading