mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
Enhance autotest run inside chroot.
Review URL: http://codereview.chromium.org/542068
This commit is contained in:
parent
88aaf818cb
commit
4ff32f64b9
@ -35,7 +35,9 @@ AUTOTEST_DEST="/usr/local/autotest"
|
||||
echo -n "Installing Autotest... "
|
||||
sudo mkdir -p ${AUTOTEST_DEST}
|
||||
sudo chmod 777 ${AUTOTEST_DEST}
|
||||
cp -rpf ${CHROOT_TRUNK_DIR}/src/third_party/autotest/files/{client,server,tko,utils,global_config.ini,shadow_config.ini} ${AUTOTEST_DEST}
|
||||
cd ${CHROOT_TRUNK_DIR}/src/third_party/autotest/files
|
||||
cp -fpru {client,conmux,server,tko,utils,global_config.ini,shadow_config.ini} \
|
||||
${AUTOTEST_DEST}
|
||||
|
||||
# Create python package init files for top level test case dirs.
|
||||
function touchInitPy() {
|
||||
|
||||
@ -27,7 +27,6 @@ set -e
|
||||
|
||||
AUTOTEST_CHROOT_DEST="/usr/local/autotest"
|
||||
AUTOTEST_SRC="${GCLIENT_ROOT}/src/third_party/autotest/files"
|
||||
echo $AUTOTEST_SRC
|
||||
|
||||
CHROOT_AUTHSOCK_PREFIX="/tmp/chromiumos_test_agent"
|
||||
|
||||
@ -50,27 +49,29 @@ then
|
||||
fi
|
||||
|
||||
# Install authkey for testing
|
||||
|
||||
chmod 400 $FLAGS_test_key
|
||||
/usr/bin/ssh-add $FLAGS_test_key 2> /dev/null
|
||||
/usr/bin/ssh-add $FLAGS_test_key
|
||||
|
||||
if [ -n "${FLAGS_machine}" ]
|
||||
then
|
||||
CLIENT_CONTROL_FILE=${FLAGS_client_control}
|
||||
# run only a specific test/suite if requested
|
||||
if [ ! -n "${CLIENT_CONTROL_FILE}" ]
|
||||
if [ ! -n "${FLAGS_client_control}" ]
|
||||
then
|
||||
# Generate meta-control file to run all existing site tests.
|
||||
CLIENT_CONTROL_FILE=\
|
||||
"${AUTOTEST_CHROOT_DEST}/client/site_tests/AllTests/control"
|
||||
"${AUTOTEST_CHROOT_DEST}/client/site_tests/accept_Suite/control"
|
||||
echo "No control file specified. Running all tests."
|
||||
else
|
||||
CLIENT_CONTROL_FILE=${AUTOTEST_CHROOT_DEST}/${FLAGS_client_control}
|
||||
fi
|
||||
# Kick off autosrv for specified test
|
||||
autoserv_cmd="${AUTOTEST_CHROOT_DEST}/server/autoserv \
|
||||
-m ${FLAGS_machine} \
|
||||
-c ${CLIENT_CONTROL_FILE}"
|
||||
echo "running autoserv: " ${autoserv_cmd}
|
||||
pushd ${AUTOTEST_CHROOT_DEST} 1> /dev/null
|
||||
${autoserv_cmd}
|
||||
popd 1> /dev/null
|
||||
else
|
||||
echo "To execute autotest manually:
|
||||
eval \$(ssh-agent) # start ssh-agent
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user