Skip to content

Commit

Permalink
test/image-prepare: slight re-org
Browse files Browse the repository at this point in the history
Move some code around for more logical grouping.

Split the appending of the image name onto its own line.  It has nothing
to do with the vm.install invocation.
  • Loading branch information
allisonkarlitskaya committed Jan 31, 2023
1 parent 90a489f commit fe33bf6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/image-prepare
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ def main():
parser.add_argument('image', nargs='?', default=DEFAULT_IMAGE, help='The image to use')
args = parser.parse_args()

dist_tar = subprocess.check_output([f'{BASE_DIR}/tools/make-dist'], text=True).strip()

customize = [os.path.join(BOTS_DIR, "image-customize"), "--no-network"]
if not args.overlay:
customize.append("--fresh")
Expand All @@ -223,6 +221,8 @@ def main():
if args.quick:
customize.append("--quick")

dist_tar = subprocess.check_output([f'{BASE_DIR}/tools/make-dist'], text=True).strip()

if args.image == "fedora-coreos":
customize += build_install_coreos(dist_tar, args.image, args.verbose, args.quick)
elif args.image.startswith("rhel-8") or args.image.startswith("centos-8"):
Expand All @@ -233,11 +233,13 @@ def main():
if not args.quick:
customize += validate_packages()

# post build/install test preparation
customize += ["--script", os.path.join(TEST_DIR, "vm.install")]

if args.python:
customize += install_python_bridge()

# post build/install test preparation
customize += ["--script", os.path.join(TEST_DIR, "vm.install"), args.image]
customize.append(args.image)

# show final command for easy copy&paste reproduction/debugging
if args.verbose:
Expand Down

0 comments on commit fe33bf6

Please sign in to comment.