]> git.ipfire.org Git - thirdparty/hostap.git/blame - tests/hwsim/build.sh
HE: MCS size is always a minimum of 4 bytes
[thirdparty/hostap.git] / tests / hwsim / build.sh
CommitLineData
fdbc0923
JB
1#!/bin/sh
2
3set -e
4
5cd $(dirname $0)
6
6492a9ca
IP
7usage()
8{
9 echo "$0 [-c | --codecov] [-f | --force-config]"
10 exit 1
11}
12
102c2bf4 13use_lcov=0
2593aadb 14force_config=0
102c2bf4
IP
15while [ "$1" != "" ]; do
16 case $1 in
17 -c | --codecov ) shift
18 echo "$0: use code coverage specified"
19 use_lcov=1
20 ;;
2593aadb
IP
21 -f | --force-config ) shift
22 force_config=1
23 echo "$0: force copy config specified"
24 ;;
6492a9ca 25 * ) usage
102c2bf4
IP
26 esac
27done
28
7fe84009
JM
29echo "Building TNC testing tools"
30cd tnc
31make clean > /dev/null
32make QUIET=1 -j8
33
34echo "Building wlantest"
35cd ../../../wlantest
36make clean > /dev/null
37make QUIET=1 -j8 > /dev/null
38
00bd8157
JB
39echo "Building hs20-osu-client"
40cd ../hs20/client/
41make clean > /dev/null 2>&1
42make QUIET=1 CONFIG_NO_BROWSER=1
43
7fe84009 44echo "Building hostapd"
00bd8157 45cd ../../hostapd
2593aadb 46if [ ! -e .config -o $force_config -eq 1 ]; then
7fe84009 47 cp ../tests/hwsim/example-hostapd.config .config
102c2bf4 48else
7fe84009 49 echo "hostapd config file exists"
102c2bf4
IP
50fi
51
52if [ $use_lcov -eq 1 ]; then
53 if ! grep -q CONFIG_CODE_COVERAGE .config; then
54 echo CONFIG_CODE_COVERAGE=y >> .config
55 else
7fe84009 56 echo "CONFIG_CODE_COVERAGE already exists in hostapd/.config. Ignore"
102c2bf4 57 fi
0c905797 58fi
102c2bf4 59
18527522 60make clean > /dev/null
7fe84009 61make QUIET=1 -j8 hostapd hostapd_cli hlr_auc_gw
102c2bf4 62
7fe84009
JM
63echo "Building wpa_supplicant"
64cd ../wpa_supplicant
2593aadb 65if [ ! -e .config -o $force_config -eq 1 ]; then
7fe84009 66 cp ../tests/hwsim/example-wpa_supplicant.config .config
102c2bf4 67else
7fe84009 68 echo "wpa_supplicant config file exists"
102c2bf4
IP
69fi
70
71if [ $use_lcov -eq 1 ]; then
72 if ! grep -q CONFIG_CODE_COVERAGE .config; then
73 echo CONFIG_CODE_COVERAGE=y >> .config
74 else
7fe84009 75 echo "CONFIG_CODE_COVERAGE already exists in wpa_supplicant/.config. Ignore"
102c2bf4 76 fi
0c905797 77fi
102c2bf4 78
18527522 79make clean > /dev/null
b2a1f262
JM
80if [ -z $FIPSLD_CC ]; then
81export FIPSLD_CC=gcc
82fi
18527522 83make QUIET=1 -j8