2013-10-31 16:08:01 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(dirname $0)
|
|
|
|
|
2014-10-26 08:06:28 +01:00
|
|
|
use_lcov=0
|
2014-10-26 08:06:29 +01:00
|
|
|
force_config=0
|
2014-10-26 08:06:28 +01:00
|
|
|
while [ "$1" != "" ]; do
|
|
|
|
case $1 in
|
|
|
|
-c | --codecov ) shift
|
|
|
|
echo "$0: use code coverage specified"
|
|
|
|
use_lcov=1
|
|
|
|
;;
|
2014-10-26 08:06:29 +01:00
|
|
|
-f | --force-config ) shift
|
|
|
|
force_config=1
|
|
|
|
echo "$0: force copy config specified"
|
|
|
|
;;
|
2014-10-26 08:06:28 +01:00
|
|
|
* ) exit 1
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2013-10-31 16:08:01 +01:00
|
|
|
cd ../../wpa_supplicant
|
2014-10-26 08:06:29 +01:00
|
|
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
2013-11-09 14:40:06 +01:00
|
|
|
cp ../tests/hwsim/example-wpa_supplicant.config .config
|
2014-10-26 08:06:28 +01:00
|
|
|
else
|
|
|
|
echo "wpa_supplicant config file exists"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $use_lcov -eq 1 ]; then
|
|
|
|
if ! grep -q CONFIG_CODE_COVERAGE .config; then
|
|
|
|
echo CONFIG_CODE_COVERAGE=y >> .config
|
|
|
|
else
|
|
|
|
echo "CONFIG_CODE_COVERAGE already exists in wpa_supplicant/.config. Ignore"
|
|
|
|
fi
|
2013-11-09 14:40:06 +01:00
|
|
|
fi
|
2014-10-26 08:06:28 +01:00
|
|
|
|
2013-10-31 16:08:01 +01:00
|
|
|
make clean
|
|
|
|
make -j8
|
2014-10-26 08:06:28 +01:00
|
|
|
|
2013-10-31 16:08:01 +01:00
|
|
|
cd ../hostapd
|
2014-10-26 08:06:29 +01:00
|
|
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
2013-11-09 14:40:06 +01:00
|
|
|
cp ../tests/hwsim/example-hostapd.config .config
|
2014-10-26 08:06:28 +01:00
|
|
|
else
|
|
|
|
echo "hostapd config file exists"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $use_lcov -eq 1 ]; then
|
|
|
|
if ! grep -q CONFIG_CODE_COVERAGE .config; then
|
|
|
|
echo CONFIG_CODE_COVERAGE=y >> .config
|
|
|
|
else
|
|
|
|
echo "CONFIG_CODE_COVERAGE already exists in hostapd/.config. Ignore"
|
|
|
|
fi
|
2013-11-09 14:40:06 +01:00
|
|
|
fi
|
2014-10-26 08:06:28 +01:00
|
|
|
|
2013-10-31 16:08:01 +01:00
|
|
|
make clean
|
|
|
|
make -j8 hostapd hlr_auc_gw
|
|
|
|
cd ../wlantest
|
|
|
|
make clean
|
|
|
|
make -j8
|
|
|
|
cd ../mac80211_hwsim/tools
|
2014-04-01 06:59:47 +02:00
|
|
|
make clean
|
2013-10-31 16:08:01 +01:00
|
|
|
make -j8
|
2014-05-16 23:47:37 +02:00
|
|
|
cd ../../tests/hwsim/tnc
|
|
|
|
make clean
|
|
|
|
make -j8
|
|
|
|
cd ..
|