tests: build.sh: Avoid copying .config if identical
If the .config file is already identical, avoid copying it even if -f was specified; this improves build time if nothing has changed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
e7c11ad249
commit
5c7a048e45
1 changed files with 6 additions and 2 deletions
|
@ -41,7 +41,9 @@ make QUIET=1 CONFIG_NO_BROWSER=1
|
||||||
echo "Building hostapd"
|
echo "Building hostapd"
|
||||||
cd ../../hostapd
|
cd ../../hostapd
|
||||||
if [ ! -e .config -o $force_config -eq 1 ]; then
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
||||||
cp ../tests/hwsim/example-hostapd.config .config
|
if ! cmp ../tests/hwsim/example-hostapd.config .config >/dev/null 2>&1 ; then
|
||||||
|
cp ../tests/hwsim/example-hostapd.config .config
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $use_lcov -eq 1 ]; then
|
if [ $use_lcov -eq 1 ]; then
|
||||||
|
@ -57,7 +59,9 @@ make QUIET=1 -j8 hostapd hostapd_cli hlr_auc_gw
|
||||||
echo "Building wpa_supplicant"
|
echo "Building wpa_supplicant"
|
||||||
cd ../wpa_supplicant
|
cd ../wpa_supplicant
|
||||||
if [ ! -e .config -o $force_config -eq 1 ]; then
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
||||||
cp ../tests/hwsim/example-wpa_supplicant.config .config
|
if ! cmp ../tests/hwsim/example-wpa_supplicant.config .config >/dev/null 2>&1 ; then
|
||||||
|
cp ../tests/hwsim/example-wpa_supplicant.config .config
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $use_lcov -eq 1 ]; then
|
if [ $use_lcov -eq 1 ]; then
|
||||||
|
|
Loading…
Reference in a new issue