mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 05:56:58 +02:00
Port standard_backdoor to build_image --test
BUG=chromium-os:11744 TEST=Built test images with and without the standard backdoor. Could log in with it. Could not without. Change-Id: I23fa55cbb1287f9385b0589b04f4c006903b9eef Reviewed-on: http://gerrit.chromium.org/gerrit/3530 Tested-by: David Rochberg <rochberg@chromium.org> Reviewed-by: Chris Masone <cmasone@chromium.org>
This commit is contained in:
parent
54a83b774c
commit
cf93237b86
10
build_image
10
build_image
@ -107,6 +107,8 @@ DEFINE_integer verity_max_ios -1 \
|
||||
"Number of outstanding I/O operations dm-verity caps at. Default: -1"
|
||||
DEFINE_string verity_algorithm "sha1" \
|
||||
"Cryptographic hash algorithm used for kernel vboot. Default : sha1"
|
||||
DEFINE_boolean standard_backdoor ${FLAGS_TRUE} \
|
||||
"Install standard backdoor credentials for testing"
|
||||
|
||||
# Parse command line.
|
||||
FLAGS "$@" || exit 1
|
||||
@ -837,10 +839,16 @@ mod_image_for_test () {
|
||||
|
||||
emerge_chromeos_test
|
||||
|
||||
BACKDOOR=0
|
||||
if [ $FLAGS_standard_backdoor -eq $FLAGS_TRUE ]; then
|
||||
BACKDOOR=1
|
||||
fi
|
||||
|
||||
local mod_test_script="${SCRIPTS_DIR}/mod_for_test_scripts/test_setup.sh"
|
||||
# Run test setup script to modify the image
|
||||
sudo -E GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
|
||||
STATEFUL_DIR="${STATEFUL_FS_DIR}" ARCH="${ARCH}" "${mod_test_script}"
|
||||
STATEFUL_DIR="${STATEFUL_FS_DIR}" ARCH="${ARCH}" BACKDOOR="${BACKDOOR}" \
|
||||
"${mod_test_script}"
|
||||
|
||||
if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then
|
||||
emerge_to_image --root="${ROOT_FS_DIR}" factorytest-init
|
||||
|
Loading…
Reference in New Issue
Block a user