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

Refactor WiFI test for NUC #189

Merged
merged 1 commit into from
Dec 10, 2024
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
35 changes: 26 additions & 9 deletions Robot-Framework/test-suites/bat-tests/netvm.robot
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ Wifi passthrought into NetVM
Check Network Availability 8.8.8.8 expected_result=True
[Teardown] Run Keywords Remove Wifi configuration ${TEST_WIFI_SSID} AND Close All Connections

Wifi passthrought into NetVM (NUC)
[Documentation] Verify that wifi works inside netvm
[Tags] bat SP-T111 nuc
[Setup] Run Keywords
... Connect to ghaf host AND Connect to netvm
Configure wifi via wpa_supplicant ${netvm_ssh} ${TEST_WIFI_SSID} ${TEST_WIFI_PSWD}
Check Network Availability 8.8.8.8 expected_result=True
Remove wpa_supplicant configuration
Check Network Availability 8.8.8.8 expected_result=False
[Teardown] Run Keywords Remove wpa_supplicant configuration AND Close All Connections

NetVM stops and starts successfully
[Documentation] Verify that NetVM stops properly and starts after that
[Tags] bat pre-merge SP-T47 SP-T90 nuc orin-nx lenovo-x1
Expand All @@ -66,15 +77,6 @@ NetVM is wiped after restarting
Check file doesn't exist /etc/test.txt
[Teardown] Run Keywords Close All Connections

Verify wpa_supplicant.service is running
[Documentation] Verify that wpa_supplicant.service exists and is running
[Tags] bat SP-T77
[Setup] Run Keywords
... Connect to ghaf host AND Connect to netvm
Switch Connection ${netvm_ssh}
Verify service status service=wpa_supplicant.service
[Teardown] Run Keywords Close All Connections

Verify NetVM PCI device passthrough
[Documentation] Verify that proper PCI devices have been passed through to the NetVM
[Tags] bat pre-merge SP-T96 nuc orin-agx orin-nx
Expand Down Expand Up @@ -121,3 +123,18 @@ Start NetVM if dead
[Documentation] Teardown keyword. Check global variable ${netvm_state} and start NetVM if it's stopped.
... Pre-condition: requires active ssh connection to ghaf host.
Start NetVM

Configure wifi via wpa_supplicant
[Arguments] ${netvm_ssh} ${SSID} ${passw} ${lenovo}=False
Switch Connection ${netvm_ssh}
Log To Console Configuring Wifi
Set Log Level NONE
Execute Command sh -c "wpa_passphrase ${SSID} ${passw} > /etc/wpa_supplicant.conf" sudo=True sudo_password=${PASSWORD}
Execute Command systemctl restart wpa_supplicant.service sudo=True sudo_password=${PASSWORD}
Set Log Level INFO

Remove wpa_supplicant configuration
Switch Connection ${netvm_ssh}
Log To Console Removing Wifi configuration
Execute Command rm /etc/wpa_supplicant.conf sudo=True sudo_password=${PASSWORD}
Execute Command systemctl restart wpa_supplicant.service sudo=True sudo_password=${PASSWORD}
Loading