Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1216)

Unified Diff: mod_image_for_test.sh

Issue 6688015: mod_image_for_test: remove --factory_install flag (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mod_image_for_test.sh
diff --git a/mod_image_for_test.sh b/mod_image_for_test.sh
index 769941850bf33581c5d6ea999c08581ca68270e4..25c2fb72b2504c9d20ef5e82b54ab922a321bbdd 100755
--- a/mod_image_for_test.sh
+++ b/mod_image_for_test.sh
@@ -39,8 +39,6 @@ get_default_board
DEFINE_string board "$DEFAULT_BOARD" "Board for which the image was built" b
DEFINE_boolean factory $FLAGS_FALSE \
"Modify the image for manufacturing testing" f
-DEFINE_boolean factory_install $FLAGS_FALSE \
- "Modify the image for factory install shim"
DEFINE_string image "" "Location of the rootfs raw image file" i
DEFINE_boolean installmask $FLAGS_TRUE \
"Use INSTALL_MASK to shrink the resulting image." m
@@ -228,38 +226,21 @@ trap cleanup EXIT
"$SCRIPTS_DIR/mount_gpt_image.sh" -i "$IMAGE_NAME" -f "$IMAGE_DIR" \
-r "$ROOT_FS_DIR" -s "$STATEFUL_DIR"
-if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]; then
- # We don't want to emerge test packages on factory install, otherwise we run
- # out of space.
+emerge_chromeos_test
- # Run factory setup script to modify the image.
- sudo $EMERGE_BOARD_CMD --root=$ROOT_FS_DIR --usepkgonly \
- --root-deps=rdeps --nodeps chromeos-factoryinstall
+MOD_TEST_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
+# Run test setup script to modify the image
+sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
+ STATEFUL_DIR="${STATEFUL_DIR}" ARCH="${ARCH}" "${MOD_TEST_ROOT}/test_setup.sh"
- # Set factory server if necessary.
- if [ "${FACTORY_SERVER}" != "" ]; then
- sudo sed -i \
- "s/CHROMEOS_AUSERVER=.*$/CHROMEOS_AUSERVER=\
-http:\/\/${FACTORY_SERVER}:8080\/update/" \
- ${ROOT_FS_DIR}/etc/lsb-release
- fi
-else
- emerge_chromeos_test
+if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then
+ install_autotest
- MOD_TEST_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
- # Run test setup script to modify the image
+ MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts"
+ # Run factory setup script to modify the image
sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
- STATEFUL_DIR="${STATEFUL_DIR}" ARCH="${ARCH}" "${MOD_TEST_ROOT}/test_setup.sh"
-
- if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then
- install_autotest
-
- MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts"
- # Run factory setup script to modify the image
- sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
- QUALDB="${FLAGS_qualdb}" BOARD=${FLAGS_board} \
- "${MOD_FACTORY_ROOT}/factory_setup.sh"
- fi
+ QUALDB="${FLAGS_qualdb}" BOARD=${FLAGS_board} \
+ "${MOD_FACTORY_ROOT}/factory_setup.sh"
fi
# Re-run ldconfig to fix /etc/ldconfig.so.cache.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698