Browse Source

tests: Extra coverage for command line arguments

The results for these are not currently verified, but this allows
--codecov runs to get more coverage for the command line argument
parsers.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 10 years ago
parent
commit
e9026725f7
1 changed files with 20 additions and 0 deletions
  1. 20 0
      tests/hwsim/start.sh

+ 20 - 0
tests/hwsim/start.sh

@@ -15,15 +15,35 @@ if [ -z "$LOGDIR" ] ; then
 else
 else
     if [ -e $LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant ]; then
     if [ -e $LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant ]; then
 	WPAS=$LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant
 	WPAS=$LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant
+	# extra code coverage
+	$WPAS > /dev/null 2>&1
+	$WPAS -efoo -Ifoo -mfoo -ofoo -Ofoo -pfoo -Pfoo -h > /dev/null 2>&1
+	$WPAS -bfoo -B -Cfoo -q -W -N -L > /dev/null 2>&1
+	$WPAS -T -v > /dev/null 2>&1
+	$WPAS -u -z > /dev/null 2>&1
     fi
     fi
     if [ -e $LOGDIR/alt-hostapd/hostapd/hostapd ]; then
     if [ -e $LOGDIR/alt-hostapd/hostapd/hostapd ]; then
 	HAPD=$LOGDIR/alt-hostapd/hostapd/hostapd
 	HAPD=$LOGDIR/alt-hostapd/hostapd/hostapd
+	# extra code coverage
+	$HAPD > /dev/null 2>&1
+	$HAPD -v > /dev/null 2>&1
+	$HAPD -B -efoo -Pfoo -T -bfoo -h > /dev/null 2>&1
+	$HAPD -ufoo > /dev/null 2>&1
+	$HAPD -u00:11:22:33:44:55 > /dev/null 2>&1
+	$HAPD -gfoo > /dev/null 2>&1
+	$HAPD -Gfoo-not-exists > /dev/null 2>&1
+	$HAPD -z > /dev/null 2>&1
     fi
     fi
     if [ -e $LOGDIR/alt-hostapd-as/hostapd/hostapd ]; then
     if [ -e $LOGDIR/alt-hostapd-as/hostapd/hostapd ]; then
 	HAPD_AS=$LOGDIR/alt-hostapd-as/hostapd/hostapd
 	HAPD_AS=$LOGDIR/alt-hostapd-as/hostapd/hostapd
     fi
     fi
     if [ -e $LOGDIR/alt-hlr_auc_gw/hostapd/hlr_auc_gw ]; then
     if [ -e $LOGDIR/alt-hlr_auc_gw/hostapd/hlr_auc_gw ]; then
 	HLR_AUC_GW=$LOGDIR/alt-hlr_auc_gw/hostapd/hlr_auc_gw
 	HLR_AUC_GW=$LOGDIR/alt-hlr_auc_gw/hostapd/hlr_auc_gw
+	# extra code coverage
+	$HLR_AUC_GW > /dev/null 2>&1
+	$HLR_AUC_GW -Dfoo -i7 -sfoo -h > /dev/null 2>&1
+	$HLR_AUC_GW -i100 > /dev/null 2>&1
+	$HLR_AUC_GW -z > /dev/null 2>&1
     fi
     fi
 fi
 fi