From 332449d80daa9f0a4744a9fae8e3fb4042e47618 Mon Sep 17 00:00:00 2001 From: Rahul Rahul Date: Wed, 18 May 2016 16:28:11 -0700 Subject: [PATCH] autotests: README for twoNetworksTest --- autotests/test2AP/README.txt | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 autotests/test2AP/README.txt diff --git a/autotests/test2AP/README.txt b/autotests/test2AP/README.txt new file mode 100644 index 00000000..e29dea09 --- /dev/null +++ b/autotests/test2AP/README.txt @@ -0,0 +1,44 @@ +twoNetworksTest: connect to network A. disconnect from network A. + connect to network B. disconnect from network B. + +Start with test-runner: + Test-runner looks at the hw.conf file and creates radios using + hwsim and reads the conf file(s) defined under [HOSTAPD] section + +1. Just start test-runner from under /tools directory and it + will automatically run the tests. + cd /tools + sudo ./test-runner -v + +Run stand-alone: +Pre-requisites: +1. Ensure you have hostapd installed. +2. Verify that the kernel has mac80211_hwsim. + +Setup: +1. Create radios using mac80211_hwsim. For most tests, we need 4 radios. + sudo modprobe mac80211_hwsim radios=4 +2. Enable network interfaces: + sudo ifconfig wlan2 up + sudo ifconfig wlan3 up + +Run test (e.g. twoNetworksTest test): +1. Start hostapd, with a config file as an argument. + You can use the IntelWIFI.conf and PersonalWIFI.conf + file in autotests/test2AP directory. + sudo ./hostapd + sudo ./hostapd + +Note: You might need to edit the *.conf file and change wln0 and wln1 + to wlan0 and wlan1 respectively. + +2. Start iwd. + sudo iwd +3. Start twoNetworksTest test (inside autotests/test2AP directory). + cd /autotests/test2AP + ./twoNetworksTest.py + +Optional changes: +1. You can provide your own config file to hostapd. If so, then you would need to + change the assert inside the test to the name of the ssid in your test. + self.assertEqual(connectedNetworkName, "IntelWIFI")