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

Unified Diff: mod_image_for_test.sh

Issue 2878033: Generate fake root certs for autotest via qemu (Closed) Base URL: git://git.chromium.org/crosutils.git
Patch Set: Fix script error Created 10 years, 5 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
Index: mod_image_for_test.sh
diff --git a/mod_image_for_test.sh b/mod_image_for_test.sh
index 1ea312126b2f2e8f77595265f599e7648907bd9c..ca14d539145424abf3feb3ffd3916dbdec35d492 100755
--- a/mod_image_for_test.sh
+++ b/mod_image_for_test.sh
@@ -68,6 +68,23 @@ if [ ! -f $FLAGS_image ] ; then
exit 1
fi
+# What cross-build are we targeting?
+. "${FLAGS_build_root}/${FLAGS_board}/etc/make.conf.board_setup"
+# Figure out ARCH from the given toolchain.
+# TODO: Move to common.sh as a function after scripts are switched over.
+TC_ARCH=$(echo "${CHOST}" | awk -F'-' '{ print $1 }')
+case "${TC_ARCH}" in
+ arm*)
+ ARCH="arm"
+ ;;
+ *86)
+ ARCH="x86"
+ ;;
+ *)
+ error "Unable to determine ARCH from toolchain: ${CHOST}"
+ exit 1
+esac
+
# Make sure anything mounted in the rootfs/stateful is cleaned up ok on exit.
cleanup_mounts() {
# Occasionally there are some daemons left hanging around that have our
@@ -185,7 +202,7 @@ else
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}" "${MOD_TEST_ROOT}/test_setup.sh"
+ STATEFUL_DIR="${STATEFUL_DIR}" ARCH="${ARCH}" "${MOD_TEST_ROOT}/test_setup.sh"
if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then
install_autotest
« mod_for_test_scripts/710enableAuthTesting ('K') | « mod_for_test_scripts/710enableAuthTesting ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698