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.
This commit is contained in:
James Prestwood 2020-11-16 14:25:10 -08:00 committed by Denis Kenzior
parent 6bf514c4c3
commit f88d45c9d3
1 changed files with 9 additions and 9 deletions

View File

@ -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()