From 7b7e8a2ee73819ffbf833d4a7a77fc310d93484c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 19 Jul 2015 23:10:55 +0300 Subject: [PATCH] tests: Use codecov build hostapd/wpa_supplicant in FST tests Try to use the special build for --codecov purposes, if present, instead of hardcoding the hostapd/wpa_supplicant binary to the default location. This is needed to collect code coverage correctly. Signed-off-by: Jouni Malinen --- tests/hwsim/test_fst_config.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_fst_config.py b/tests/hwsim/test_fst_config.py index 65980657a..938cf9ac0 100644 --- a/tests/hwsim/test_fst_config.py +++ b/tests/hwsim/test_fst_config.py @@ -158,7 +158,11 @@ class FstLauncher: raise Exception("No FST APs to start") pidfile = self.fst_logpath + '/' + 'myhostapd.pid' mylogfile = self.fst_logpath + '/' + 'fst-hostapd' - cmd = [ '../../hostapd/hostapd', '-B', '-ddd', + prg = os.path.join(self.fst_logpath, + 'alt-hostapd/hostapd/hostapd') + if not os.path.exists(prg): + prg = '../../hostapd/hostapd' + cmd = [ prg, '-B', '-ddd', '-P', pidfile, '-f', mylogfile, '-g', self.hapd_fst_global] for i in range(0, len(self.cfgs_to_run)): cfg = self.cfgs_to_run[i] @@ -181,7 +185,11 @@ class FstLauncher: raise Exception("No FST STAs to start") pidfile = self.fst_logpath + '/' + 'mywpa_supplicant.pid' mylogfile = self.fst_logpath + '/' + 'fst-wpa_supplicant' - cmd = [ '../../wpa_supplicant/wpa_supplicant', '-B', '-ddd', + prg = os.path.join(self.fst_logpath, + 'alt-wpa_supplicant/wpa_supplicant/wpa_supplicant') + if not os.path.exists(prg): + prg = '../../wpa_supplicant/wpa_supplicant' + cmd = [ prg, '-B', '-ddd', '-P' + pidfile, '-f', mylogfile, '-g', self.wsup_fst_global ] sta_no = 0 for i in range(0, len(self.cfgs_to_run)):