]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Add run-tests.py --no-reset
authorJouni Malinen <j@w1.fi>
Sat, 2 Nov 2013 18:38:40 +0000 (20:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 3 Nov 2013 09:31:48 +0000 (11:31 +0200)
This can be used to request the previously used default behavior where
the devices are not stopped at the end of a test case if a single test
case is run.

Signed-hostap: Jouni Malinen <j@w1.fi>

tests/hwsim/run-tests.py

index 1e5de29f53a94aa860d35dfaae7304476742883c..08706f615dba6ba69d5e38fe2e5a26fc7f513b63 100755 (executable)
@@ -138,6 +138,8 @@ def main():
     parser.add_argument('--shuffle-tests', action='store_true',
                         dest='shuffle_tests',
                         help='Shuffle test cases to randomize order')
+    parser.add_argument('--no-reset', action='store_true', dest='no_reset',
+                        help='Do not reset devices at the end of the test')
     parser.add_argument('-f', dest='testmodules', metavar='<test module>',
                         help='execute only tests from these test modules',
                         type=str, choices=[[]] + test_modules, nargs='+')
@@ -299,7 +301,10 @@ def main():
                 except Exception, e:
                     logger.info("Failed to issue TEST-STOP after {} for {}".format(name, d.ifname))
                     logger.info(e)
-            reset_devs(dev, apdev)
+            if args.no_reset:
+                print "Leaving devices in current state"
+            else:
+                reset_devs(dev, apdev)
 
             for i in range(0, 3):
                 rename_log(args.logdir, 'log' + str(i), name, dev[i])