From b5476d940e21388c320da40cb1bda9c58a7495b2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 2 Nov 2013 20:38:40 +0200 Subject: [PATCH] tests: Add run-tests.py --no-reset 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 --- tests/hwsim/run-tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index 1e5de29f5..08706f615 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -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='', 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])