mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
Support multiple chroots
this is necessary for portage-based builds which change the chroot. You must pass --chroot to the run_remote_tests in this case. Review URL: http://codereview.chromium.org/588010
This commit is contained in:
parent
fdda89f49f
commit
d00425ef50
@ -8,11 +8,12 @@
|
||||
# the given source directory.
|
||||
# args:
|
||||
# $1 - original source directory
|
||||
# $2 - target directory
|
||||
function update_chroot_autotest() {
|
||||
local original=$1
|
||||
echo "Updating chroot Autotest from ${original}..."
|
||||
local autotest_dir="${DEFAULT_CHROOT_DIR}/usr/local/autotest"
|
||||
sudo mkdir -p "${autotest_dir}"
|
||||
sudo chmod 777 "${autotest_dir}"
|
||||
cp -fpru ${original}/{client,conmux,server,tko,utils,global_config.ini,shadow_config.ini} ${autotest_dir}
|
||||
local target=$2
|
||||
echo "Updating chroot Autotest from ${original} to ${target}..."
|
||||
sudo mkdir -p "${target}"
|
||||
sudo chmod 777 "${target}"
|
||||
cp -fpru ${original}/{client,conmux,server,tko,utils,global_config.ini,shadow_config.ini} ${target}
|
||||
}
|
||||
|
@ -38,7 +38,8 @@ AUTOTEST_DEST="/usr/local/autotest"
|
||||
|
||||
# Copy a local "installation" of autotest into the chroot, to avoid
|
||||
# polluting the src dir with tmp files, results, etc.
|
||||
update_chroot_autotest "${CHROOT_TRUNK_DIR}/src/third_party/autotest/files"
|
||||
update_chroot_autotest "${CHROOT_TRUNK_DIR}/src/third_party/autotest/files" \
|
||||
"${AUTOTEST_DEST}"
|
||||
|
||||
# Create python package init files for top level test case dirs.
|
||||
function touchInitPy() {
|
||||
|
@ -22,7 +22,7 @@ DEFINE_boolean verbose ${FLAGS_FALSE} "Show verbose autoserv output" v
|
||||
DEFINE_boolean update_db ${FLAGS_FALSE} "Put results in autotest database" u
|
||||
DEFINE_string machine_desc "" "Machine description used in database"
|
||||
DEFINE_string build_desc "" "Build description used in database"
|
||||
DEFINE_string chroot_dir "${DEFAULT_CHROOT_DIR}" "alternate chroot location" c
|
||||
DEFINE_string chroot "${DEFAULT_CHROOT_DIR}" "alternate chroot location" c
|
||||
DEFINE_string results_dir_root "" "alternate root results directory"
|
||||
|
||||
function cleanup() {
|
||||
@ -104,8 +104,6 @@ function main() {
|
||||
|
||||
set -e
|
||||
|
||||
local autotest_dir="${DEFAULT_CHROOT_DIR}/usr/local/autotest"
|
||||
|
||||
# Set global TMP for remote_access.sh's sake
|
||||
TMP=$(mktemp -d /tmp/run_remote_tests.XXXX)
|
||||
|
||||
@ -117,7 +115,8 @@ function main() {
|
||||
# is just modifying scripts, they take effect without having to wait
|
||||
# for the laborious build_autotest.sh command.
|
||||
local original="${GCLIENT_ROOT}/src/third_party/autotest/files"
|
||||
update_chroot_autotest "${original}"
|
||||
local autotest_dir="${FLAGS_chroot}/usr/local/autotest"
|
||||
update_chroot_autotest "${original}" "${autotest_dir}"
|
||||
|
||||
local autoserv="${autotest_dir}/server/autoserv"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user