Skip to content

Commit

Permalink
Add guestos download during bootstrap
Browse files Browse the repository at this point in the history
Let's download if enabled guest os image during
bootstrap

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
  • Loading branch information
Satheesh Rajendran committed Apr 17, 2019
1 parent ecada6b commit 75fde01
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions avocado-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,8 @@ def parse_test_config(test_config_file, avocado_bin):
action='store', default="",
help='Pass additional arguments to the command')
parser.add_argument('--guest-os', dest='guest_os',
action='store', default='CentOS.7.3.ppc64le',
help='Provide Guest os: Default: CentOS.7.3.ppc64le')
action='store', default='JeOS.27.ppc64le',
help='Provide Guest os: Default: JeOS.27.ppc64le')
parser.add_argument('--vt', dest='vt_type',
action='store', choices=['qemu', 'libvirt'],
default='libvirt',
Expand Down Expand Up @@ -679,10 +679,13 @@ def parse_test_config(test_config_file, avocado_bin):
outputdir = os.path.join(BASE_PATH, 'results')

additional_args += ' --job-results-dir %s' % outputdir

bootstraped = False
if (args.bootstrap or need_bootstrap()):
create_config(outputdir)
bootstrap()
bootstraped = True
if args.guest_os and not args.no_guest_download:
vt_bootstrap(args.guest_os)
# Install optional plugins from config file
plugins = CONFIGFILE.get('plugins', 'optional').split(',')
for plugin in plugins:
Expand All @@ -705,7 +708,7 @@ def parse_test_config(test_config_file, avocado_bin):
if args.run_suite:
if "guest_" in args.run_suite:
# Make sure we download guest image once
if not args.no_guest_download:
if not args.no_guest_download and not bootstraped:
vt_bootstrap(args.guest_os)
only_filter = args.only_filter
if only_filter:
Expand Down

0 comments on commit 75fde01

Please sign in to comment.