Skip to content

Commit

Permalink
Merge pull request #105 from sathnaga/guest_os_bootstrap
Browse files Browse the repository at this point in the history
Add guestos download during bootstrap
  • Loading branch information
Satheesh Rajendran committed Apr 24, 2019
2 parents bd968f5 + 75fde01 commit 4005faa
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 @@ -645,8 +645,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 @@ -678,10 +678,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 @@ -704,7 +707,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 4005faa

Please sign in to comment.