factory.conf: update new startup program path.
The new goofy location is autotest/cros/factory/goofy.py
Startup logic is also moved to there.
This CL depends on https://gerrit.chromium.org/gerrit/15486
BUG=chromium-os:26048
TEST=manually: stop factory; start factory
CQ-DEPEND=Ib470acd6ba29b7457e71d60e854d5b5a7d56ea10
Change-Id: Ic69eb40ecab354d58206515bebe19ba50242d453
Reviewed-on: https://gerrit.chromium.org/gerrit/15485
Reviewed-by: Jon Salz <[email protected]>
Commit-Ready: Hung-Te Lin <[email protected]>
Tested-by: Hung-Te Lin <[email protected]>
diff --git a/factory.conf b/factory.conf
index e17dfae..6c2194f 100644
--- a/factory.conf
+++ b/factory.conf
@@ -9,33 +9,19 @@
stop on stopping system-services
script
- SUITE_FACTORY=/usr/local/autotest/site_tests/suite_Factory
- FACTORY_LOG_FILE=/var/log/factory.log
- modprobe i2c-dev
- cd /usr/local/autotest
- eval $($SUITE_FACTORY/startx.sh)
- ./bin/goofy.py >> $FACTORY_LOG_FILE 2>&1 || true
+ FACTORY_BASE=/usr/local/autotest/cros/factory
+ TTY_VT=4
+ TTY="/dev/tty$TTY_VT"
+
+ (tput clear; echo -n "--- Starting Factory --- "; date) >$TTY
+ chvt $TTY_VT
+ sleep .3
+ "$FACTORY_BASE/client" start >$TTY || true
# This should never happen, since goofy never returns. Kill X
- # and display an error on tty4.
-
- # Try to kill X, and any other Python scripts, five times.
- for i in $(seq 5); do
- pkill 'X|python' || break
- sleep 1
- done
- chvt 4
- (
- tail -50 $FACTORY_LOG_FILE
- echo "
-
-
-
-Factory tests terminated.
-To restart, press Ctrl-Alt-F2, log in, and type:
-
- $SUITE_FACTORY/restart.sh"
- ) > /dev/tty4
+ # and display an error on $TTY
+ (echo -n "--- Factory Aborted --- "; date; "$FACTORY_BASE/client" stop) >$TTY
+ chvt $TTY_VT
end script
pre-stop script