commit f88d45c9d3773d17421b3844d50b5939f89c1e10
parent 6bf514c4c39c7714eeec0448f9a9842440799769
Author: James Prestwood <prestwoj@gmail.com>
Date: Mon, 16 Nov 2020 14:25:10 -0800
test-runner: delay starting the shell until after pre_test
This makes --shell somewhat more useful by copying all the test
files and starting test processes before dumping the user into
a shell.
Diffstat:
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/test-runner b/tools/test-runner
@@ -1005,19 +1005,19 @@ def run_auto_tests(ctx, args):
shutil.copytree(args.testhome + '/autotests/misc/secrets', '/tmp/secrets')
shutil.copy(args.testhome + '/autotests/misc/phonesim/phonesim.conf', '/tmp')
- if args.shell:
- #
- # Shell really isn't meant to be used with multiple tests. If
- # a set of tests was passed in just start out in the first.
- #
- os.chdir(tests[0])
- os.system('/bin/bash')
- exit()
-
for test in tests:
try:
copied, subtests = pre_test(ctx, test)
+ if args.shell:
+ #
+ # Shell really isn't meant to be used with multiple tests. If
+ # a set of tests was passed in just start out in the first.
+ #
+ os.chdir(tests[0])
+ os.system('/bin/bash')
+ exit()
+
if len(subtests) < 1:
dbg("No tests to run")
exit()