[PATCH] tests: Validate .config file for wpa_supplicant build and print warning message for hwsim build.

Amit Khatri amit.khatriatsamsung.com
Wed May 27 00:12:48 PDT 2015


Signed-off-by: Amit Khatri <amit.khatri at samsung.com>
---
 tests/hwsim/build.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tests/hwsim/build.sh b/tests/hwsim/build.sh
index 301c330..5ff4188 100755
--- a/tests/hwsim/build.sh
+++ b/tests/hwsim/build.sh
@@ -4,6 +4,24 @@ set -e
 
 cd $(dirname $0)
 
+validate_config_file()
+{
+	temp=`grep CONFIG_P2P .config`;
+	if [ `echo "${temp:0:1}"` == '#' ]; then
+		echo "CONFIG_P2P is not enabled in .config file";
+	fi
+	temp=`grep CONFIG_DEBUG_FILE .config`;
+	if [ `echo "${temp:0:1}"` == '#' ]; then
+		echo "CONFIG_DEBUG_FILE is not enabled in .config file";
+	fi
+	temp=`grep CONFIG_DEBUG_LINUX_TRACING .config`;
+	if [ `echo "${temp:0:1}"` == '#' ]; then
+		echo "CONFIG_DEBUG_LINUX_TRACING is not enabled in .config file";
+	fi
+	echo "Please check the above config options it may cause not to start wpa_supplicant";
+	echo "Either use -f or --force-config option";
+}
+
 usage()
 {
 	echo "$0 [-c | --codecov] [-f | --force-config]"
@@ -61,6 +79,7 @@ if [ ! -e .config -o $force_config -eq 1 ]; then
     cp ../tests/hwsim/example-wpa_supplicant.config .config
 else
     echo "wpa_supplicant config file exists"
+    validate_config_file;
 fi
 
 if [ $use_lcov -eq 1 ]; then
-- 
1.9.1




More information about the Hostap mailing list