From 8a09a05ef094b4ab6ed2ce52f1ade6885c4bf4f6 Mon Sep 17 00:00:00 2001 From: Chris Sosa Date: Tue, 19 Jan 2010 16:05:36 -0800 Subject: [PATCH] Modifies archived build to include a test image in the zip file Review URL: http://codereview.chromium.org/542131 --- archive_build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/archive_build.sh b/archive_build.sh index 5881e0a755..3c2f20b014 100755 --- a/archive_build.sh +++ b/archive_build.sh @@ -27,6 +27,7 @@ DEFINE_string zipname "image.zip" "Name of zip file to create." DEFINE_boolean official_build $FLAGS_FALSE "Set CHROMEOS_OFFICIAL=1 for release builds." DEFINE_string build_number "" \ "The build-bot build number (when called by buildbot only)." "b" +DEFINE_boolean test_mod $FLAGS_TRUE "Modify image for testing purposes" # Parse command line FLAGS "$@" || exit 1 @@ -70,6 +71,15 @@ echo "archive to file: $ZIPFILE" rm -rf "$OUTDIR" mkdir -p "$OUTDIR" +# Modify image for test if flag set. +if [ $FLAGS_test_mod -eq $FLAGS_TRUE ] +then + echo "Modifying image for test" + cp "${DEFAULT_FROM}/rootfs.image" "${DEFAULT_FROM}/rootfs_test.image" + . "${SCRIPTS_DIR}/mod_image_for_test.sh" --image rootfs_test.image + cd - +fi + # Zip the build echo "Compressing and archiving build..." cd "$DEFAULT_FROM"