tests: Add start/stop scripts and configuration files

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-03-02 11:39:54 +02:00
parent 3eb29b7b47
commit 731e60f5c5
5 changed files with 29 additions and 0 deletions

3
tests/hwsim/p2p0.conf Normal file
View file

@ -0,0 +1,3 @@
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin
device_name=Device A
p2p_no_group_iface=1

3
tests/hwsim/p2p1.conf Normal file
View file

@ -0,0 +1,3 @@
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin
device_name=Device B
p2p_no_group_iface=1

3
tests/hwsim/p2p2.conf Normal file
View file

@ -0,0 +1,3 @@
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin
device_name=Device C
p2p_no_group_iface=1

13
tests/hwsim/start-p2p.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
DIR="$( cd "$( dirname "$0" )" && pwd )"
WPAS=$DIR/../../wpa_supplicant/wpa_supplicant
$DIR/stop-wifi.sh
sudo modprobe mac80211_hwsim radios=3
mkdir -p $DIR/logs
DATE=`date +%s`
sudo $WPAS -Dnl80211 -iwlan0 -c $DIR/p2p0.conf -ddKt > $DIR/logs/$DATE-log0 &
sudo $WPAS -Dnl80211 -iwlan1 -c $DIR/p2p1.conf -ddKt > $DIR/logs/$DATE-log1 &
sudo $WPAS -Dnl80211 -iwlan2 -c $DIR/p2p2.conf -ddKt > $DIR/logs/$DATE-log2 &
sleep 1

7
tests/hwsim/stop-wifi.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
sudo killall -q hostapd
sudo killall -q wpa_supplicant
if grep -q mac80211_hwsim /proc/modules ; then
sudo rmmod mac80211_hwsim
fi