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