• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3# Copyright (c) 2010 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# Author: ericli@google.com (Eric Li)
8#
9# This script copies needed files from the repo to allow Autotest CLI access
10# from /h/b/s.
11
12
13SCRIPT_DIR=$(cd $(dirname $0);pwd)
14AUTOTEST_TOOLS_DIR=$(cd ${SCRIPT_DIR}/../..;pwd)
15REPO_DIR=$(cd ${AUTOTEST_TOOLS_DIR}/../../..;pwd)
16AUTOTEST_DIR="${REPO_DIR}/src/third_party/autotest/files"
17
18DATESTAMP=$(date '+%Y%m%d')
19TARGET_DIR="/home/build/static/projects-rw/chromeos/autotest.${DATESTAMP}"
20
21cp -fpruv ${AUTOTEST_DIR}/cli ${TARGET_DIR}
22
23mkdir -p ${TARGET_DIR}/client
24touch ${TARGET_DIR}/client/__init__.py
25cp -uv ${AUTOTEST_DIR}/client/setup_modules.py ${TARGET_DIR}/client
26cp -uv ${AUTOTEST_TOOLS_DIR}/autotest/global_config.ini ${TARGET_DIR}/client
27cp -fpruv ${AUTOTEST_DIR}/client/common_lib ${TARGET_DIR}/client
28
29mkdir -p ${TARGET_DIR}/frontend/afe
30touch ${TARGET_DIR}/frontend/__init__.py
31touch ${TARGET_DIR}/frontend/afe/__init__.py
32cp -uv ${AUTOTEST_DIR}/frontend/common.py \
33    ${TARGET_DIR}/frontend
34cp -fpruv ${AUTOTEST_DIR}/frontend/afe/json_rpc \
35    ${TARGET_DIR}/frontend/afe
36cp -uv ${AUTOTEST_DIR}/frontend/afe/rpc_client_lib.py \
37    ${TARGET_DIR}/frontend/afe
38cp -uv \
39    ${AUTOTEST_TOOLS_DIR}/autotest/syncfiles/frontend/afe/site_rpc_client_lib.py \
40    ${TARGET_DIR}/frontend/afe
41
42# update autotest symlink
43cd $(dirname ${TARGET_DIR})
44unlink autotest
45ln -s $(basename ${TARGET_DIR}) autotest
46