Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SP-3183] Check QSPI version #53

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions Robot-Framework/lib/output_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def parse_iperf_output(output):
"rx": rx
}


def get_wifi_ip_from_ifconfig(output, if_name):
pattern = if_name + r'.*?\n.*?inet (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'
match = re.search(pattern, output)
Expand All @@ -143,3 +144,22 @@ def get_wifi_ip_from_ifconfig(output, if_name):
else:
print(f"Couldn't find ip with pattern {pattern}")
return None


def get_qspi_versions(output):
fw_pattern = r"Current firmware version is: (\d*.\d*.\d*)"
sw_pattern = r"Current software version is: (\d*.\d*.\d*)"

match = re.search(fw_pattern, output)
if match:
fw_version = match.group(1)
else:
raise Exception(f"Couldn't parse current firmware version, pattern: {tx_pattern}")

match = re.search(sw_pattern, output)
if match:
sw_version = match.group(1)
else:
raise Exception(f"Couldn't parse current software version, pattern: {rx_pattern}")

return fw_version, sw_version
5 changes: 5 additions & 0 deletions Robot-Framework/resources/ssh_keywords.resource
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,8 @@ Check if ssh is ready on device
END

[Return] ${is_ready}

Check QSPI Version is up to date
${output} Execute Command ota-check-firmware
${fw_version} ${sw_version} Get qspi versions ${output}
Should Be True '${fw_version}' == '${sw_version}' Update QSPI version! Test results can be wrong!
7 changes: 6 additions & 1 deletion Robot-Framework/test-suites/bat-tests/others.robot
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ Test nixos version format
Verify Nixos Version Format
[Teardown] Close All Connections


Check QSPI version
[Documentation] QSPI version should be up-to-date
[Tags] bat SP-T100 orin-agx orin-nx
[Setup] Connect
Check QSPI Version is up to date
[Teardown] Close All Connections