2 ##############################################################################
3 ## Copyright (c) 2015 Intel Corp.
5 ## All rights reserved. This program and the accompanying materials
6 ## are made available under the terms of the Apache License, Version 2.0
7 ## which accompanies this distribution, and is available at
8 ## http://www.apache.org/licenses/LICENSE-2.0
9 ###############################################################################
12 echo "update_yardstick.sh container_id rpmdir imagedir"
16 if [ $# -ne 3 ] || [ ! -d $2 ] || [ ! -d $3 ]
23 ROOTDIR=$(cd $(dirname "$0")/.. && pwd)
24 ENVDIR=${ROOTDIR}/ci/envs/
30 docker exec ${CID} sh -c "mkdir -p ${DBASE_DIR}/scripts/"
31 docker exec ${CID} sh -c "mkdir -p ${DBASE_DIR}/rpm/"
32 docker exec ${CID} sh -c "mkdir -p ${DBASE_DIR}/image/"
35 docker cp $1 "${CID}:${DBASE_DIR}/$2"
38 echo "Failed to copy $2"
43 # Copy the environment setup scripts to the docker image
44 copyfile ${ENVDIR}/host-setup0.sh 'scripts/'
45 copyfile ${ENVDIR}/host-setup1.sh 'scripts/'
46 copyfile ${ENVDIR}/host-config 'scripts/'
47 copyfile ${ENVDIR}/guest-setup0.sh 'scripts/'
48 copyfile ${ENVDIR}/guest-setup1.sh 'scripts/'
49 copyfile ${ENVDIR}/host-run-qemu.sh 'scripts/'
50 copyfile ${ENVDIR}/kvm4nfv_key 'yardstick_key'
52 copyfile "${ROOTDIR}/tests/testexec.sh" 'testexec.sh'
54 # Copy the test yaml definition to the docker image
55 copyfile "${ROOTDIR}/tests/pod.yaml" 'pod.yaml'
56 copyfile "${IMGDIR}/guest.img" 'image/'
58 docker cp "${ROOTDIR}/tests/cyclictest-node-context.yaml" ${CID}:${DBASE_DIR}
61 for f in ${RPMDIR}/*.rpm
63 docker cp $f ${CID}:${DBASE_DIR}/rpm/
66 # If we have any yardstick patch for workaround, copy it
67 if [ -e "${ROOTDIR}/tests/yardstick.patch" ]
69 docker cp ${ROOTDIR}/tests/yardstick.patch ${CID}:${DBASE_DIR}/