tests: Verify that hostapd-as-RADIUS-server started
Large number of test cases will fail if hostapd fails to start as the RADIUS server. To make this more obvious, verify that the RADIUS server instance is running and do not even start test execution if the setup if not work properly. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
ed8a1fa496
commit
de677292d5
2 changed files with 13 additions and 1 deletions
|
@ -60,7 +60,7 @@ if [ $use_lcov -eq 1 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
make -j8 hostapd hlr_auc_gw
|
make -j8 hostapd hostapd_cli hlr_auc_gw
|
||||||
cd ../wlantest
|
cd ../wlantest
|
||||||
make clean
|
make clean
|
||||||
make -j8
|
make -j8
|
||||||
|
|
|
@ -5,6 +5,7 @@ WPAS=$DIR/../../wpa_supplicant/wpa_supplicant
|
||||||
WPACLI=$DIR/../../wpa_supplicant/wpa_cli
|
WPACLI=$DIR/../../wpa_supplicant/wpa_cli
|
||||||
HAPD=$DIR/../../hostapd/hostapd
|
HAPD=$DIR/../../hostapd/hostapd
|
||||||
HAPD_AS=$DIR/../../hostapd/hostapd
|
HAPD_AS=$DIR/../../hostapd/hostapd
|
||||||
|
HAPDCLI=$DIR/../../hostapd/hostapd_cli
|
||||||
WLANTEST=$DIR/../../wlantest/wlantest
|
WLANTEST=$DIR/../../wlantest/wlantest
|
||||||
HLR_AUC_GW=$DIR/../../hostapd/hlr_auc_gw
|
HLR_AUC_GW=$DIR/../../hostapd/hlr_auc_gw
|
||||||
DATE="$(date +%s)"
|
DATE="$(date +%s)"
|
||||||
|
@ -147,6 +148,17 @@ for j in `seq 1 10`; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for j in `seq 1 10`; do
|
||||||
|
if $HAPDCLI -i as ping | grep -q PONG; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if [ $j = "10" ]; then
|
||||||
|
echo "Could not connect to hostapd-as-RADIUS-server"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
if [ $USER = "0" -o $USER = "root" ]; then
|
if [ $USER = "0" -o $USER = "root" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue