Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. SPDX-License-Identifier: BSD-3-Clause
This test validates WiFi functionality by:
- Connecting to an access point (AP) using either
nmcliorwpa_supplicant. - Verifying IP acquisition via DHCP.
- Checking internet connectivity with a
pingtest. - Handling systemd network service status.
- Supporting flexible SSID/password input via arguments, environment, or file.
-
Command-line arguments:
./run.sh "MySSID" "MyPassword"
-
Environment variables:
SSID_ENV=MySSID PASSWORD_ENV=MyPassword ./run.sh
-
Fallback to
ssid_list.txtfile (if above not set):MySSID MyPassword
- Primary:
nmcli - Fallback:
wpa_supplicant,udhcpc,ifconfig
Ensure these tools are available in the system before running the test. Missing tools are detected and logged as skipped/failure.
- Dependency check – verifies necessary binaries are present.
- Systemd services check – attempts to start network services if inactive.
- WiFi connect (nmcli or wpa_supplicant) – based on tool availability.
- IP assignment check – validates
ifconfig wlan0output. - Internet test – pings
8.8.8.8to confirm outbound reachability. - Result logging – writes
.resfile and logs all actions.
WiFi_Connectivity.res: ContainsWiFi_Connectivity PASSorFAIL.- Logs are printed using
log_info,log_pass, andlog_failfromfunctestlib.sh.
WiFi/
├── run.sh
├── ssid_list.txt (optional)
├── README.md
Add this test with SSID parameters as follows:
- name: WiFi_Connectivity
path: Runner/suites/Connectivity/WiFi
timeout:
minutes: 5
params:
SSID_ENV: "xxxx"
PASSWORD_ENV: "xxxx"