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

Side by Side Diff: src/scripts/run_autotest.sh

Issue 546137: Cleanup and merge autotest wrappers. (Closed)
Patch Set: Addressed comments from ericli and kmixter Created 10 years, 11 months 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
OLDNEW
(Empty)
1 #!/bin/bash
2
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
5 # found in the LICENSE file.
6
7 # Script to install and launch autotest.
8
9 . "$(dirname "$0")/common.sh"
10
11 # Script must be run inside the chroot
12 assert_inside_chroot
13
14 set -e
15
16 TEST_RSA_KEY="${GCLIENT_ROOT}/src/platform/testing/testing_rsa"
17 CHROOT_AUTHSOCK_PREFIX="/tmp/chromiumos_test_agent"
18
19 function cleanup {
20 if [ "${TEST_AUTH_SOCKET:0:26}" == ${CHROOT_AUTHSOCK_PREFIX} ]
21 then
22 echo "cleaning up chrooted ssh-agent."
23 kill ${SSH_AGENT_PID}
24 fi
25 }
26
27 trap cleanup EXIT
28
29 # If ssh-agent isn't already running, start one (possibly inside the chroot)
30 if [ ! -n "${SSH_AGENT_PID}" ]
31 then
32 echo "Setting up ssh-agent in chroot for testing."
33 TEST_AUTH_SOCKET=$(mktemp -u ${CHROOT_AUTHSOCK_PREFIX}.XXXX)
34 eval $(/usr/bin/ssh-agent -a ${TEST_AUTH_SOCKET})
35 fi
36
37 # Install authkey for testing
38 chmod 400 $TEST_RSA_KEY
39 /usr/bin/ssh-add $TEST_RSA_KEY
40
41 autoserv_cmd="./server/autoserv $@"
42 echo "running: " ${autoserv_cmd}
43 AUTOTEST_ROOT="/usr/local/autotest"
44 pushd ${AUTOTEST_ROOT} 1> /dev/null
45 ${autoserv_cmd}
46 popd 1> /dev/null
47
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698