]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Use per-test case log/capture file from wlantest
authorJouni Malinen <j@w1.fi>
Sun, 17 Nov 2013 19:25:17 +0000 (21:25 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 17 Nov 2013 19:47:06 +0000 (21:47 +0200)
Signed-hostap: Jouni Malinen <j@w1.fi>

tests/hwsim/run-tests.py
tests/hwsim/start.sh
tests/hwsim/wlantest.py

index 697fd6f5a6db3a988bcdb287ed955942fef8a97d..d4097f6a61a3134156861d926655f1f4751d987f 100755 (executable)
@@ -22,6 +22,7 @@ sys.path.append('../../wpaspy')
 from wpasupplicant import WpaSupplicant
 from hostapd import HostapdGlobal
 from check_kernel import check_kernel
+from wlantest import Wlantest
 
 def reset_devs(dev, apdev):
     ok = True
@@ -332,6 +333,10 @@ def main():
                 hapd = None
             rename_log(args.logdir, 'hostapd', name, hapd)
 
+            wt = Wlantest()
+            rename_log(args.logdir, 'hwsim0.pcapng', name, wt)
+            rename_log(args.logdir, 'hwsim0', name, wt)
+
         end = datetime.now()
         diff = end - start
 
index 86900d1b093ec5d63cc2079b8a1d47b2a2485cfc..f87d2f389fa34ad54a81f21dfa46c93d39883e48 100755 (executable)
@@ -63,7 +63,7 @@ if [ "$CONCURRENT" = "y" ]; then
     sudo iw wlan2 interface add sta2 type station
 fi
 sudo ifconfig hwsim0 up
-sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -d > $LOGDIR/hwsim0 &
+sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -dt -L $LOGDIR/hwsim0 &
 for i in 0 1 2; do
     sudo $(printf -- "$VALGRIND_WPAS" $i) $WPAS -g /tmp/wpas-wlan$i -G$GROUP -Dnl80211 -iwlan$i -c $LOGDIR/p2p$i.conf \
          $(printf -- "$CONCURRENT_ARGS" $i) -ddKt$TRACE -f $LOGDIR/log$i &
@@ -71,7 +71,7 @@ done
 sudo $VALGRIND_HAPD $HAPD -ddKt$TRACE -g /var/run/hostapd-global -G $GROUP -ddKt -f $LOGDIR/hostapd &
 
 sleep 1
-sudo chown -f $USER $LOGDIR/hwsim0.pcapng $LOGDIR/log* $LOGDIR/hostapd
+sudo chown -f $USER $LOGDIR/hwsim0.pcapng $LOGDIR/hwsim0 $LOGDIR/log* $LOGDIR/hostapd
 if [ "x$VALGRIND" = "xy" ]; then
     sudo chown -f $USER $LOGDIR/*valgrind*
 fi
index d9dc5cefe38d6d30b239c3de7f717489c227d192..c6dba12a7dc977256089deed5e9c52d0894adc3e 100644 (file)
@@ -26,6 +26,11 @@ class Wlantest:
         if "FAIL" in res:
             raise Exception("wlantest_cli flush failed")
 
+    def relog(self):
+        res = subprocess.check_output([self.wlantest_cli, "relog"])
+        if "FAIL" in res:
+            raise Exception("wlantest_cli relog failed")
+
     def add_passphrase(self, passphrase):
         res = subprocess.check_output([self.wlantest_cli, "add_passphrase",
                                        passphrase])