tests: Build tests for wpa_supplicant and hostapd
Allow multiple build configurations to be tested automatically. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
52e78198b7
commit
4fb6963b39
12 changed files with 364 additions and 0 deletions
1
tests/build/build-hostapd-empty.config
Normal file
1
tests/build/build-hostapd-empty.config
Normal file
|
@ -0,0 +1 @@
|
||||||
|
CFLAGS += -Werror
|
90
tests/build/build-hostapd-internal.config
Normal file
90
tests/build/build-hostapd-internal.config
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
CFLAGS += -Werror
|
||||||
|
|
||||||
|
CONFIG_DRIVER_NONE=y
|
||||||
|
CONFIG_DRIVER_NL80211=y
|
||||||
|
CONFIG_RSN_PREAUTH=y
|
||||||
|
|
||||||
|
CONFIG_TLS=internal
|
||||||
|
CONFIG_INTERNAL_LIBTOMMATH=y
|
||||||
|
CONFIG_INTERNAL_LIBTOMMATH_FAST=y
|
||||||
|
|
||||||
|
CONFIG_EAP=y
|
||||||
|
CONFIG_ERP=y
|
||||||
|
CONFIG_EAP_MD5=y
|
||||||
|
CONFIG_EAP_TLS=y
|
||||||
|
CONFIG_EAP_MSCHAPV2=y
|
||||||
|
CONFIG_EAP_PEAP=y
|
||||||
|
CONFIG_EAP_GTC=y
|
||||||
|
CONFIG_EAP_TTLS=y
|
||||||
|
CONFIG_EAP_SIM=y
|
||||||
|
CONFIG_EAP_AKA=y
|
||||||
|
CONFIG_EAP_AKA_PRIME=y
|
||||||
|
CONFIG_EAP_GPSK=y
|
||||||
|
CONFIG_EAP_GPSK_SHA256=y
|
||||||
|
CONFIG_EAP_SAKE=y
|
||||||
|
CONFIG_EAP_PAX=y
|
||||||
|
CONFIG_EAP_PSK=y
|
||||||
|
CONFIG_EAP_VENDOR_TEST=y
|
||||||
|
CONFIG_EAP_FAST=y
|
||||||
|
CONFIG_EAP_IKEV2=y
|
||||||
|
CONFIG_EAP_TNC=y
|
||||||
|
CFLAGS += -DTNC_CONFIG_FILE=\"tnc/tnc_config\"
|
||||||
|
LIBS += -rdynamic
|
||||||
|
CONFIG_EAP_UNAUTH_TLS=y
|
||||||
|
CONFIG_EAP_EKE=y
|
||||||
|
CONFIG_PKCS12=y
|
||||||
|
CONFIG_RADIUS_SERVER=y
|
||||||
|
CONFIG_IPV6=y
|
||||||
|
CONFIG_TLSV11=y
|
||||||
|
CONFIG_TLSV12=y
|
||||||
|
|
||||||
|
CONFIG_FULL_DYNAMIC_VLAN=y
|
||||||
|
CONFIG_VLAN_NETLINK=y
|
||||||
|
CONFIG_LIBNL32=y
|
||||||
|
CONFIG_LIBNL3_ROUTE=y
|
||||||
|
CONFIG_PEERKEY=y
|
||||||
|
CONFIG_IEEE80211W=y
|
||||||
|
CONFIG_IEEE80211R=y
|
||||||
|
CONFIG_IEEE80211N=y
|
||||||
|
CONFIG_IEEE80211AC=y
|
||||||
|
|
||||||
|
CONFIG_WPS=y
|
||||||
|
CONFIG_WPS_UPNP=y
|
||||||
|
CONFIG_WPS_NFC=y
|
||||||
|
#CONFIG_WPS_STRICT=y
|
||||||
|
#CONFIG_WPA_TRACE=y
|
||||||
|
#CONFIG_WPA_TRACE_BFD=y
|
||||||
|
|
||||||
|
CONFIG_P2P_MANAGER=y
|
||||||
|
CONFIG_DEBUG_FILE=y
|
||||||
|
CONFIG_DEBUG_LINUX_TRACING=y
|
||||||
|
CONFIG_WPA_CLI_EDIT=y
|
||||||
|
CONFIG_ACS=y
|
||||||
|
CONFIG_NO_RANDOM_POOL=y
|
||||||
|
CONFIG_WNM=y
|
||||||
|
CONFIG_INTERWORKING=y
|
||||||
|
CONFIG_HS20=y
|
||||||
|
CONFIG_SQLITE=y
|
||||||
|
#CONFIG_SAE=y
|
||||||
|
#CFLAGS += -DALL_DH_GROUPS
|
||||||
|
|
||||||
|
CONFIG_FST=y
|
||||||
|
CONFIG_FST_TEST=y
|
||||||
|
|
||||||
|
CONFIG_TESTING_OPTIONS=y
|
||||||
|
CFLAGS += -DCONFIG_RADIUS_TEST
|
||||||
|
CONFIG_MODULE_TESTS=y
|
||||||
|
|
||||||
|
CONFIG_SUITEB=y
|
||||||
|
|
||||||
|
CONFIG_MBO=y
|
||||||
|
|
||||||
|
CONFIG_CODE_COVERAGE=y
|
||||||
|
CFLAGS += -O0 -Wsign-compare
|
||||||
|
|
||||||
|
CONFIG_IAPP=y
|
||||||
|
CONFIG_TAXONOMY=y
|
||||||
|
#CONFIG_FILS=y
|
||||||
|
#CONFIG_FILS_SK_PFS=y
|
||||||
|
#CONFIG_OWE=y
|
||||||
|
#CONFIG_DPP=y
|
17
tests/build/build-hostapd-minimal.config
Normal file
17
tests/build/build-hostapd-minimal.config
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
CONFIG_NO_STDOUT_DEBUG=y
|
||||||
|
|
||||||
|
CONFIG_NO_RADIUS=y
|
||||||
|
#CONFIG_NO_ACCOUNTING=y
|
||||||
|
|
||||||
|
CONFIG_NO_VLAN=y
|
||||||
|
CONFIG_NO_CTRL_IFACE=y
|
||||||
|
|
||||||
|
CFLAGS += -Werror
|
||||||
|
|
||||||
|
CFLAGS += -DCONFIG_NO_HOSTAPD_LOGGER
|
||||||
|
|
||||||
|
CONFIG_NO_AES_EXTRAS=y
|
||||||
|
|
||||||
|
CFLAGS += -Os
|
||||||
|
|
||||||
|
CONFIG_IEEE80211N=y
|
36
tests/build/build-hostapd.sh
Executable file
36
tests/build/build-hostapd.sh
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR=$1
|
||||||
|
CONF=$2
|
||||||
|
if [ -z "$DIR" -o -z "$CONF" ]; then
|
||||||
|
echo "usage: $0 <DIR> <CONF>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -d "$DIR" ]; then
|
||||||
|
echo "DIR does not exist: $DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -r "$CONF" ]; then
|
||||||
|
echo "CONF does not exist: $CONF"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
NAME=`echo $CONF | sed s/^build-hostapd-// | sed s/\.config$//`
|
||||||
|
echo -n "hostapd build: $NAME - "
|
||||||
|
|
||||||
|
pushd $DIR > /dev/null
|
||||||
|
rm -rf hostap-build
|
||||||
|
tar xf hostap-build.tar
|
||||||
|
popd > /dev/null
|
||||||
|
cp $CONF $DIR/hostap-build/hostapd/.config
|
||||||
|
|
||||||
|
pushd $DIR/hostap-build/hostapd > /dev/null
|
||||||
|
if make -j8 > $DIR/hostapd-$NAME.log 2>&1; then
|
||||||
|
mv $DIR/hostapd-$NAME.log{,-OK}
|
||||||
|
echo OK
|
||||||
|
else
|
||||||
|
mv $DIR/hostapd-$NAME.log{,-FAIL}
|
||||||
|
echo FAIL
|
||||||
|
fi
|
||||||
|
rm -rf $DIR/hostap-build
|
||||||
|
popd > /dev/null
|
7
tests/build/build-wpa_supplicant-basic.config
Normal file
7
tests/build/build-wpa_supplicant-basic.config
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
CFLAGS += -Werror
|
||||||
|
CONFIG_WPS=y
|
||||||
|
CONFIG_WPS2=y
|
||||||
|
CONFIG_EAP_TLS=y
|
||||||
|
CONFIG_EAP_MSCHAPV2=y
|
||||||
|
CONFIG_EAP_PSK=y
|
||||||
|
CONFIG_EAP_FAST=y
|
2
tests/build/build-wpa_supplicant-dbus_without_ap.config
Normal file
2
tests/build/build-wpa_supplicant-dbus_without_ap.config
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
CFLAGS += -Werror
|
||||||
|
CONFIG_CTRL_IFACE_DBUS_NEW=y
|
1
tests/build/build-wpa_supplicant-empty.config
Normal file
1
tests/build/build-wpa_supplicant-empty.config
Normal file
|
@ -0,0 +1 @@
|
||||||
|
CFLAGS += -Werror
|
17
tests/build/build-wpa_supplicant-gnutls.config
Normal file
17
tests/build/build-wpa_supplicant-gnutls.config
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
CONFIG_TLS=gnutls
|
||||||
|
|
||||||
|
CONFIG_WPS=y
|
||||||
|
CONFIG_EAP_TLS=y
|
||||||
|
CONFIG_EAP_MSCHAPV2=y
|
||||||
|
|
||||||
|
CONFIG_EAP_PSK=y
|
||||||
|
CONFIG_EAP_GPSK=y
|
||||||
|
CONFIG_EAP_AKA=y
|
||||||
|
CONFIG_EAP_SIM=y
|
||||||
|
CONFIG_EAP_SAKE=y
|
||||||
|
CONFIG_EAP_PAX=y
|
||||||
|
CONFIG_EAP_FAST=y
|
||||||
|
CONFIG_EAP_IKEV2=y
|
||||||
|
|
||||||
|
CONFIG_IEEE80211W=y
|
||||||
|
CFLAGS += -Werror
|
129
tests/build/build-wpa_supplicant-internal.config
Normal file
129
tests/build/build-wpa_supplicant-internal.config
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
CFLAGS += -Werror
|
||||||
|
|
||||||
|
CONFIG_TLS=internal
|
||||||
|
CONFIG_INTERNAL_LIBTOMMATH=y
|
||||||
|
CONFIG_INTERNAL_LIBTOMMATH_FAST=y
|
||||||
|
|
||||||
|
CONFIG_IEEE8021X_EAPOL=y
|
||||||
|
|
||||||
|
CONFIG_ERP=y
|
||||||
|
CONFIG_EAP_MD5=y
|
||||||
|
CONFIG_MSCHAPV2=y
|
||||||
|
CONFIG_EAP_TLS=y
|
||||||
|
CONFIG_EAP_PEAP=y
|
||||||
|
CONFIG_EAP_TTLS=y
|
||||||
|
CONFIG_EAP_GTC=y
|
||||||
|
CONFIG_EAP_OTP=y
|
||||||
|
CONFIG_EAP_PSK=y
|
||||||
|
CONFIG_EAP_PAX=y
|
||||||
|
CONFIG_EAP_LEAP=y
|
||||||
|
CONFIG_EAP_SIM=y
|
||||||
|
CONFIG_EAP_AKA=y
|
||||||
|
CONFIG_EAP_AKA_PRIME=y
|
||||||
|
CONFIG_EAP_VENDOR_TEST=y
|
||||||
|
CONFIG_EAP_TLV=y
|
||||||
|
CONFIG_EAP_SAKE=y
|
||||||
|
CONFIG_EAP_GPSK=y
|
||||||
|
CONFIG_EAP_GPSK_SHA256=y
|
||||||
|
CONFIG_EAP_EKE=y
|
||||||
|
CONFIG_EAP_TNC=y
|
||||||
|
CFLAGS += -DTNC_CONFIG_FILE=\"tnc/tnc_config\"
|
||||||
|
LIBS += -rdynamic
|
||||||
|
CONFIG_EAP_FAST=y
|
||||||
|
CONFIG_EAP_IKEV2=y
|
||||||
|
|
||||||
|
CONFIG_IPV6=y
|
||||||
|
CONFIG_DRIVER_NONE=y
|
||||||
|
CONFIG_PKCS12=y
|
||||||
|
CONFIG_CTRL_IFACE=unix
|
||||||
|
|
||||||
|
CONFIG_WPA_CLI_EDIT=y
|
||||||
|
|
||||||
|
CONFIG_OCSP=y
|
||||||
|
|
||||||
|
#CONFIG_ELOOP_POLL=y
|
||||||
|
|
||||||
|
#CONFIG_CTRL_IFACE_DBUS=y
|
||||||
|
#CONFIG_CTRL_IFACE_DBUS_NEW=y
|
||||||
|
#CONFIG_CTRL_IFACE_DBUS_INTRO=y
|
||||||
|
|
||||||
|
CONFIG_PEERKEY=y
|
||||||
|
CONFIG_IEEE80211W=y
|
||||||
|
CONFIG_IEEE80211R=y
|
||||||
|
CONFIG_IEEE80211N=y
|
||||||
|
CONFIG_IEEE80211AC=y
|
||||||
|
|
||||||
|
CONFIG_DEBUG_FILE=y
|
||||||
|
|
||||||
|
CONFIG_WPS=y
|
||||||
|
#CONFIG_WPS_STRICT=y
|
||||||
|
CONFIG_WPS_UPNP=y
|
||||||
|
CONFIG_WPS_NFC=y
|
||||||
|
CONFIG_WPS_ER=y
|
||||||
|
#CONFIG_WPS_REG_DISABLE_OPEN=y
|
||||||
|
|
||||||
|
CONFIG_DRIVER_WEXT=y
|
||||||
|
|
||||||
|
CONFIG_DRIVER_NL80211=y
|
||||||
|
CFLAGS += -I/usr/include/libnl3
|
||||||
|
CONFIG_LIBNL32=y
|
||||||
|
|
||||||
|
CONFIG_IBSS_RSN=y
|
||||||
|
|
||||||
|
CONFIG_AP=y
|
||||||
|
#CONFIG_MESH=y
|
||||||
|
CONFIG_P2P=y
|
||||||
|
CONFIG_WIFI_DISPLAY=y
|
||||||
|
|
||||||
|
CONFIG_ACS=y
|
||||||
|
|
||||||
|
CONFIG_BGSCAN_SIMPLE=y
|
||||||
|
CONFIG_BGSCAN_LEARN=y
|
||||||
|
|
||||||
|
#CONFIG_WPA_TRACE=y
|
||||||
|
#CONFIG_WPA_TRACE_BFD=y
|
||||||
|
|
||||||
|
CONFIG_TDLS=y
|
||||||
|
#CONFIG_TDLS_TESTING=y
|
||||||
|
CONFIG_NO_RANDOM_POOL=y
|
||||||
|
|
||||||
|
CONFIG_TLSV11=y
|
||||||
|
CONFIG_TLSV12=y
|
||||||
|
|
||||||
|
#CONFIG_HT_OVERRIDES=y
|
||||||
|
#CONFIG_VHT_OVERRIDES=y
|
||||||
|
|
||||||
|
#CONFIG_DEBUG_LINUX_TRACING=y
|
||||||
|
|
||||||
|
CONFIG_INTERWORKING=y
|
||||||
|
CONFIG_HS20=y
|
||||||
|
|
||||||
|
CONFIG_AUTOSCAN_EXPONENTIAL=y
|
||||||
|
CONFIG_AUTOSCAN_PERIODIC=y
|
||||||
|
|
||||||
|
CONFIG_EXT_PASSWORD_TEST=y
|
||||||
|
|
||||||
|
CONFIG_EAP_UNAUTH_TLS=y
|
||||||
|
|
||||||
|
#CONFIG_SAE=y
|
||||||
|
#CFLAGS += -DALL_DH_GROUPS
|
||||||
|
|
||||||
|
CONFIG_WNM=y
|
||||||
|
|
||||||
|
CONFIG_FST=y
|
||||||
|
#CONFIG_FST_TEST=y
|
||||||
|
|
||||||
|
#CONFIG_TESTING_OPTIONS=y
|
||||||
|
#CONFIG_MODULE_TESTS=y
|
||||||
|
|
||||||
|
CONFIG_SUITEB=y
|
||||||
|
|
||||||
|
CONFIG_MBO=y
|
||||||
|
|
||||||
|
#CONFIG_CODE_COVERAGE=y
|
||||||
|
CFLAGS += -O0 -Wsign-compare
|
||||||
|
#CONFIG_FILS=y
|
||||||
|
#CONFIG_FILS_SK_PFS=y
|
||||||
|
CONFIG_PMKSA_CACHE_EXTERNAL=y
|
||||||
|
#CONFIG_OWE=y
|
||||||
|
#CONFIG_DPP=y
|
8
tests/build/build-wpa_supplicant-p2p.config
Normal file
8
tests/build/build-wpa_supplicant-p2p.config
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
CONFIG_DRIVER_NL80211=y
|
||||||
|
CONFIG_CTRL_IFACE=y
|
||||||
|
CONFIG_WPS=y
|
||||||
|
CONFIG_P2P=y
|
||||||
|
CONFIG_WPS2=y
|
||||||
|
CONFIG_AP=y
|
||||||
|
CFLAGS += -Werror
|
||||||
|
CONFIG_LIBNL32=y
|
36
tests/build/build-wpa_supplicant.sh
Executable file
36
tests/build/build-wpa_supplicant.sh
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR=$1
|
||||||
|
CONF=$2
|
||||||
|
if [ -z "$DIR" -o -z "$CONF" ]; then
|
||||||
|
echo "usage: $0 <DIR> <CONF>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -d "$DIR" ]; then
|
||||||
|
echo "DIR does not exist: $DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -r "$CONF" ]; then
|
||||||
|
echo "CONF does not exist: $CONF"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
NAME=`echo $CONF | sed s/^build-wpa_supplicant-// | sed s/\.config$//`
|
||||||
|
echo -n "wpa_supplicant build: $NAME - "
|
||||||
|
|
||||||
|
pushd $DIR > /dev/null
|
||||||
|
rm -rf hostap-build
|
||||||
|
tar xf hostap-build.tar
|
||||||
|
popd > /dev/null
|
||||||
|
cp $CONF $DIR/hostap-build/wpa_supplicant/.config
|
||||||
|
|
||||||
|
pushd $DIR/hostap-build/wpa_supplicant > /dev/null
|
||||||
|
if make -j8 > $DIR/wpa_supplicant-$NAME.log 2>&1; then
|
||||||
|
mv $DIR/wpa_supplicant-$NAME.log{,-OK}
|
||||||
|
echo OK
|
||||||
|
else
|
||||||
|
mv $DIR/wpa_supplicant-$NAME.log{,-FAIL}
|
||||||
|
echo FAIL
|
||||||
|
fi
|
||||||
|
rm -rf $DIR/hostap-build
|
||||||
|
popd > /dev/null
|
20
tests/build/run-build-tests.sh
Executable file
20
tests/build/run-build-tests.sh
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR=`mktemp -d`
|
||||||
|
pushd ../.. > /dev/null
|
||||||
|
git archive --format=tar --prefix=hostap-build/ HEAD > $DIR/hostap-build.tar
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
|
echo "Build test directory: $DIR"
|
||||||
|
echo
|
||||||
|
|
||||||
|
for i in build-hostapd-*.config; do
|
||||||
|
./build-hostapd.sh $DIR $i
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in build-wpa_supplicant-*.config; do
|
||||||
|
./build-wpa_supplicant.sh $DIR $i
|
||||||
|
done
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Build test directory: $DIR"
|
Loading…
Reference in a new issue