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

Side by Side Diff: src/scripts/mod_image_for_test.sh

Issue 537009: Remove debian package built inside mod_image_for_test script. (Closed)
Patch Set: Remove debian package built inside mod_image_for_test script. Created 10 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/scripts/mod_for_test_scripts/b500patch ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Script to modify a keyfob-based chromeos system image for testability. 7 # Script to modify a keyfob-based chromeos system image for testability.
8 8
9 # Load common constants. This should be the first executable line. 9 # Load common constants. This should be the first executable line.
10 # The path to common.sh should be relative to your script's location. 10 # The path to common.sh should be relative to your script's location.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 ROOT_FS_DIR="`dirname ${FLAGS_image}`/rootfs" 59 ROOT_FS_DIR="`dirname ${FLAGS_image}`/rootfs"
60 mkdir -p "${ROOT_FS_DIR}" 60 mkdir -p "${ROOT_FS_DIR}"
61 61
62 LOOP_DEV=`sudo losetup -f` 62 LOOP_DEV=`sudo losetup -f`
63 sudo losetup "${LOOP_DEV}" "${FLAGS_image}" 63 sudo losetup "${LOOP_DEV}" "${FLAGS_image}"
64 sudo mount "${LOOP_DEV}" "${ROOT_FS_DIR}" 64 sudo mount "${LOOP_DEV}" "${ROOT_FS_DIR}"
65 65
66 echo "Modifying image ${FLAGS_image} for test..." 66 echo "Modifying image ${FLAGS_image} for test..."
67 67
68 # Run build steps for modify for test
69 sudo mkdir -p "${ROOT_FS_DIR}/modify_build"
70 scripts_dir="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
71 for script in "${scripts_dir}"/b[0-9][0-9][0-9]*[!$~]; do
72 . ${script}
73 done
74
75 MOD_SCRIPTS_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts" 68 MOD_SCRIPTS_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
76 sudo mkdir -p "${ROOT_FS_DIR}/modify_scripts" 69 sudo mkdir -p "${ROOT_FS_DIR}/modify_scripts"
77 sudo mount --bind "${MOD_SCRIPTS_ROOT}" "${ROOT_FS_DIR}/modify_scripts" 70 sudo mount --bind "${MOD_SCRIPTS_ROOT}" "${ROOT_FS_DIR}/modify_scripts"
78 71
79 # Run test setup script inside chroot jail to modify the image 72 # Run test setup script inside chroot jail to modify the image
80 sudo chroot "${ROOT_FS_DIR}" "/modify_scripts/test_setup.sh" 73 sudo chroot "${ROOT_FS_DIR}" "/modify_scripts/test_setup.sh"
81 74
82 sudo umount "${ROOT_FS_DIR}/modify_scripts" 75 sudo umount "${ROOT_FS_DIR}/modify_scripts"
83 sudo rmdir "${ROOT_FS_DIR}/modify_scripts" 76 sudo rmdir "${ROOT_FS_DIR}/modify_scripts"
84 sudo rm -rf "${ROOT_FS_DIR}/modify_build"
85 77
86 cleanup 78 cleanup
87 trap - EXIT 79 trap - EXIT
88 80
OLDNEW
« no previous file with comments | « src/scripts/mod_for_test_scripts/b500patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698