Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: run_remote_tests.sh

Issue 5212003: Remove the dependency to autotest_run.sh so I can get rid of it in next CL. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: patch Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « autotest_run.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Script to run client or server tests on a live remote image. 7 # Script to run client or server tests on a live remote image.
8 8
9 # Load common constants. This should be the first executable line. 9 # Load common constants. This should be the first executable line.
10 # The path to common.sh should be relative to your script's location. 10 # The path to common.sh should be relative to your script's location.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 RAN_ANY_TESTS=${FLAGS_TRUE} 265 RAN_ANY_TESTS=${FLAGS_TRUE}
266 266
267 # Remove chrome autotest location prefix from control_file if needed 267 # Remove chrome autotest location prefix from control_file if needed
268 if [[ ${control_file:0:${#chrome_autotests}} == \ 268 if [[ ${control_file:0:${#chrome_autotests}} == \
269 "${chrome_autotests}" ]]; then 269 "${chrome_autotests}" ]]; then
270 control_file="${control_file:${#chrome_autotests}+1}" 270 control_file="${control_file:${#chrome_autotests}+1}"
271 info "Running chrome autotest ${control_file}" 271 info "Running chrome autotest ${control_file}"
272 fi 272 fi
273 273
274 export AUTOSERV_TEST_ARGS="${FLAGS_args}" 274 local autoserv_test_args="${FLAGS_args}"
275 export AUTOSERV_ARGS="-m ${FLAGS_remote} \ 275 if [ -n "${autoserv_test_args}" ]; then
276 --ssh-port ${FLAGS_ssh_port} \ 276 autoserv_test_args="-a \"${autoserv_test_args}\""
277 fi
278 local autoserv_args="-m ${FLAGS_remote} --ssh-port ${FLAGS_ssh_port} \
277 ${option} ${control_file} -r ${results_dir} ${verbose}" 279 ${option} ${control_file} -r ${results_dir} ${verbose}"
278 if [ ${FLAGS_build} -eq ${FLAGS_FALSE} ]; then 280 if [ ${FLAGS_build} -eq ${FLAGS_FALSE} ]; then
279 cat > "${TMP}/run_test.sh" <<EOF 281 cat > "${TMP}/run_test.sh" <<EOF
kmixter1 2010/11/19 18:34:08 indent wrong
ericli 2010/11/19 18:42:21 Done.
280 export AUTOSERV_TEST_ARGS="${AUTOSERV_TEST_ARGS}" 282 cd /build/${FLAGS_board}/usr/local/autotest
kmixter1 2010/11/19 18:34:08 use ${autotest_dir}?
ericli 2010/11/19 18:42:21 when run outside of chroot, ${autotest_dir} is poi
281 export AUTOSERV_ARGS="${AUTOSERV_ARGS}" 283 sudo chmod a+w ./server/{tests,site_tests}
282 cd /home/${USER}/trunk/src/scripts 284 echo ./server/autoserv ${autoserv_args} ${autoserv_test_args}
283 ./autotest_run.sh --board "${FLAGS_board}" 285 ./server/autoserv ${autoserv_args} ${autoserv_test_args}
284 EOF 286 EOF
285 chmod a+rx "${TMP}/run_test.sh" 287 chmod a+rx "${TMP}/run_test.sh"
286 ${ENTER_CHROOT} ${TMP_INSIDE_CHROOT}/run_test.sh >&2 288 ${ENTER_CHROOT} ${TMP_INSIDE_CHROOT}/run_test.sh >&2
kmixter1 2010/11/19 18:34:08 extra space
ericli 2010/11/19 18:42:21 Done.
287 else 289 else
288 cp "${BUILD_DIR}/environment" "${TMP}/run_test.sh" 290 cp "${BUILD_DIR}/environment" "${TMP}/run_test.sh"
289 GRAPHICS_BACKEND=${GRAPHICS_BACKEND:-OPENGL} 291 GRAPHICS_BACKEND=${GRAPHICS_BACKEND:-OPENGL}
290 if [ -n "${AUTOSERV_TEST_ARGS}" ]; then
291 AUTOSERV_TEST_ARGS="-a \"${AUTOSERV_TEST_ARGS}\""
292 fi
293 cat >> "${TMP}/run_test.sh" <<EOF 292 cat >> "${TMP}/run_test.sh" <<EOF
294 export GCLIENT_ROOT=/home/${USER}/trunk 293 export GCLIENT_ROOT=/home/${USER}/trunk
295 export GRAPHICS_BACKEND=${GRAPHICS_BACKEND} 294 export GRAPHICS_BACKEND=${GRAPHICS_BACKEND}
296 export SSH_AUTH_SOCK=${SSH_AUTH_SOCK} TMPDIR=/tmp SSH_AGENT_PID=${SSH_AGENT_PID} 295 export SSH_AUTH_SOCK=${SSH_AUTH_SOCK} TMPDIR=/tmp SSH_AGENT_PID=${SSH_AGENT_PID}
297 export SYSROOT=/build/${FLAGS_board} 296 export SYSROOT=/build/${FLAGS_board}
298 tc-export CC CXX PKG_CONFIG 297 tc-export CC CXX PKG_CONFIG
299 cd ${INSIDE_BUILD_DIR} 298 cd ${INSIDE_BUILD_DIR}
300 ./server/autoserv ${AUTOSERV_ARGS} ${AUTOSERV_TEST_ARGS} 299 echo ./server/autoserv ${autoserv_args} ${autoserv_test_args}
300 ./server/autoserv ${autoserv_args} ${autoserv_test_args}
301 EOF 301 EOF
302 sudo cp "${TMP}/run_test.sh" "${BUILD_DIR}" 302 sudo cp "${TMP}/run_test.sh" "${BUILD_DIR}"
303 sudo chmod a+rx "${BUILD_DIR}/run_test.sh" 303 sudo chmod a+rx "${BUILD_DIR}/run_test.sh"
304 ${ENTER_CHROOT} sudo bash -c "${INSIDE_BUILD_DIR}/run_test.sh" >&2 304 ${ENTER_CHROOT} sudo bash -c "${INSIDE_BUILD_DIR}/run_test.sh" >&2
305 fi 305 fi
306 done 306 done
307 307
308 echo "" 308 echo ""
309 info "Test results:" 309 info "Test results:"
310 ./generate_test_report "${TMP}" --strip="${TMP}/" 310 ./generate_test_report "${TMP}" --strip="${TMP}/"
311 311
312 print_time_elapsed 312 print_time_elapsed
313 } 313 }
314 314
315 main "$@" 315 main "$@"
OLDNEW
« no previous file with comments | « autotest_run.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698