mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-23 19:41:51 +01:00
Build factory test images using the new factorytest-init package.
This also deletes the code from mod_for_factory_scripts/200patchInitScript that created the files that now come from the new package. BUG=chromium-os:13258 TEST=Build and boot a factory test image Review URL: http://codereview.chromium.org/6665048 Change-Id: I115d1a2e3afe2fdefc0e07247b21b67e0cf9cc62
This commit is contained in:
parent
1649ba8c1b
commit
ce8384d7c6
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
@ -25,54 +25,6 @@ diff -Naur old/etc/init/boot-complete.conf new/etc/init/boot-complete.conf
|
|||||||
+start on started udev
|
+start on started udev
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >"${ROOT_FS_DIR}/etc/init/factory.conf" <<EOF
|
|
||||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
|
||||||
# found in the LICENSE file.
|
|
||||||
|
|
||||||
description "Chrome OS factory startup stub"
|
|
||||||
author "chromium-os-dev@chromium.org"
|
|
||||||
|
|
||||||
start on stopped udev-addon
|
|
||||||
stop on starting halt or starting reboot
|
|
||||||
|
|
||||||
script
|
|
||||||
/sbin/modprobe i2c-dev
|
|
||||||
cd /usr/local/autotest
|
|
||||||
eval \$(./site_tests/suite_Factory/startx.sh)
|
|
||||||
date >>/var/log/factory.log
|
|
||||||
if [ ! -e factory_started ]; then
|
|
||||||
touch factory_started
|
|
||||||
cp -f site_tests/suite_Factory/control .
|
|
||||||
./bin/autotest -t factory control >>/var/log/factory.log 2>&1
|
|
||||||
else
|
|
||||||
./bin/autotest -t factory -c control >>/var/log/factory.log 2>&1
|
|
||||||
fi
|
|
||||||
end script
|
|
||||||
|
|
||||||
pre-stop script
|
|
||||||
pkill python
|
|
||||||
pkill X
|
|
||||||
end script
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat >"${ROOT_FS_DIR}/etc/init/factorylog.conf" <<EOF
|
|
||||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
|
||||||
# found in the LICENSE file.
|
|
||||||
|
|
||||||
description "Print Chrome OS factory log to tty3"
|
|
||||||
author "chromium-os-dev@chromium.org"
|
|
||||||
|
|
||||||
start on started factory
|
|
||||||
stop on starting halt or starting reboot
|
|
||||||
|
|
||||||
respawn
|
|
||||||
script
|
|
||||||
tail -n 48 -F /var/log/factory.log >/dev/tty3
|
|
||||||
end script
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ -r "${ROOT_FS_DIR}/etc/init/chrontel.conf" ]; then
|
if [ -r "${ROOT_FS_DIR}/etc/init/chrontel.conf" ]; then
|
||||||
patch -d "${ROOT_FS_DIR}" -Np1 <<EOF
|
patch -d "${ROOT_FS_DIR}" -Np1 <<EOF
|
||||||
diff -Nau old/etc/init/chrontel.conf new/etc/init/
|
diff -Nau old/etc/init/chrontel.conf new/etc/init/
|
||||||
|
|||||||
@ -231,6 +231,10 @@ sudo GCLIENT_ROOT="$GCLIENT_ROOT" ROOT_FS_DIR="$ROOT_FS_DIR" \
|
|||||||
STATEFUL_DIR="$STATEFUL_DIR" ARCH="$ARCH" "$MOD_TEST_SCRIPT"
|
STATEFUL_DIR="$STATEFUL_DIR" ARCH="$ARCH" "$MOD_TEST_SCRIPT"
|
||||||
|
|
||||||
if [ $FLAGS_factory -eq $FLAGS_TRUE ]; then
|
if [ $FLAGS_factory -eq $FLAGS_TRUE ]; then
|
||||||
|
sudo INSTALL_MASK="$INSTALL_MASK" $EMERGE_BOARD_CMD \
|
||||||
|
--root="$ROOT_FS_DIR" --root-deps=rdeps \
|
||||||
|
factorytest-init $EMERGE_JOBS
|
||||||
|
|
||||||
install_autotest
|
install_autotest
|
||||||
|
|
||||||
MOD_FACTORY_SCRIPT="$SCRIPTS_DIR/mod_for_factory_scripts/factory_setup.sh"
|
MOD_FACTORY_SCRIPT="$SCRIPTS_DIR/mod_for_factory_scripts/factory_setup.sh"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user