Skip to content

Commit

Permalink
Refactor WiFI test for NUC
Browse files Browse the repository at this point in the history
Signed-off-by: Mariia Azbeleva <[email protected]>
  • Loading branch information
azbeleva committed Dec 10, 2024
1 parent b841ebc commit b7b4977
Showing 1 changed file with 26 additions and 9 deletions.
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}

0 comments on commit b7b4977

Please sign in to comment.