tests: Add an option to force copy config files
"./build.sh --force-config" can be used to force copying configuration files before building. This will overwrite any changes in .config files. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
102c2bf461
commit
2593aadb3b
1 changed files with 7 additions and 2 deletions
|
@ -5,18 +5,23 @@ set -e
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
use_lcov=0
|
use_lcov=0
|
||||||
|
force_config=0
|
||||||
while [ "$1" != "" ]; do
|
while [ "$1" != "" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-c | --codecov ) shift
|
-c | --codecov ) shift
|
||||||
echo "$0: use code coverage specified"
|
echo "$0: use code coverage specified"
|
||||||
use_lcov=1
|
use_lcov=1
|
||||||
;;
|
;;
|
||||||
|
-f | --force-config ) shift
|
||||||
|
force_config=1
|
||||||
|
echo "$0: force copy config specified"
|
||||||
|
;;
|
||||||
* ) exit 1
|
* ) exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
cd ../../wpa_supplicant
|
cd ../../wpa_supplicant
|
||||||
if [ ! -e .config ]; then
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
||||||
cp ../tests/hwsim/example-wpa_supplicant.config .config
|
cp ../tests/hwsim/example-wpa_supplicant.config .config
|
||||||
else
|
else
|
||||||
echo "wpa_supplicant config file exists"
|
echo "wpa_supplicant config file exists"
|
||||||
|
@ -34,7 +39,7 @@ make clean
|
||||||
make -j8
|
make -j8
|
||||||
|
|
||||||
cd ../hostapd
|
cd ../hostapd
|
||||||
if [ ! -e .config ]; then
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
||||||
cp ../tests/hwsim/example-hostapd.config .config
|
cp ../tests/hwsim/example-hostapd.config .config
|
||||||
else
|
else
|
||||||
echo "hostapd config file exists"
|
echo "hostapd config file exists"
|
||||||
|
|
Loading…
Reference in a new issue