summaryrefslogtreecommitdiffstats
path: root/tests/ci
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ci')
-rwxr-xr-xtests/ci/load_images.sh44
-rw-r--r--tests/ci/report_config.yaml8
-rwxr-xr-xtests/ci/yardstick-verify9
3 files changed, 42 insertions, 19 deletions
diff --git a/tests/ci/load_images.sh b/tests/ci/load_images.sh
index 6f950ec72..e5a7ae034 100755
--- a/tests/ci/load_images.sh
+++ b/tests/ci/load_images.sh
@@ -15,6 +15,12 @@ set -e
YARD_IMG_ARCH=amd64
export YARD_IMG_ARCH
+HW_FW_TYPE=""
+if [ "${YARD_IMG_ARCH}" = "arm64" ]; then
+ HW_FW_TYPE=uefi
+fi
+export HW_FW_TYPE
+
if ! grep -q "Defaults env_keep += \"YARD_IMG_ARCH\"" "/etc/sudoers"; then
sudo echo "Defaults env_keep += \"YARD_IMG_ARCH YARDSTICK_REPO_DIR\"" >> /etc/sudoers
fi
@@ -25,10 +31,10 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then
fi
UCA_HOST="cloud-images.ubuntu.com"
-if [ $YARD_IMG_ARCH = "arm64" ]; then
- export VIVID_IMG_URL="http://${UCA_HOST}/vivid/current/vivid-server-cloudimg-arm64.tar.gz"
- if ! grep -q "Defaults env_keep += \"VIVID_IMG_URL\"" "/etc/sudoers"; then
- sudo echo "Defaults env_keep += \"VIVID_IMG_URL\"" >> /etc/sudoers
+if [ "${YARD_IMG_ARCH}"= "arm64" ]; then
+ export CLOUD_IMG_URL="http://${UCA_HOST}/${release}/current/${release}-server-cloudimg-${YARD_IMG_ARCH}.tar.gz"
+ if ! grep -q "Defaults env_keep += \"CLOUD_IMG_URL\"" "/etc/sudoers"; then
+ sudo echo "Defaults env_keep += \"CLOUD_IMG_URL\"" >> /etc/sudoers
fi
fi
@@ -65,24 +71,24 @@ load_yardstick_image()
echo
echo "========== Loading yardstick cloud image =========="
EXTRA_PARAMS=""
- if [ $YARD_IMG_ARCH = "arm64" ]; then
- VIVID_IMAGE="/tmp/vivid-server-cloudimg-arm64.tar.gz"
- VIVID_KERNEL="/tmp/vivid-server-cloudimg-arm64-vmlinuz-generic"
+ if [[ "${YARD_IMG_ARCH}" = "arm64" && "${YARD_IMG_AKI}" = "true" ]]; then
+ CLOUD_IMAGE="/tmp/${release}-server-cloudimg-${YARD_IMG_ARCH}.tar.gz"
+ CLOUD_KERNEL="/tmp/${release}-server-cloudimg-${YARD_IMG_ARCH}-vmlinuz-generic"
cd /tmp
- if [ ! -f $VIVID_IMAGE ]; then
- wget $VIVID_IMG_URL
+ if [ ! -f "${CLOUD_IMAGE}" ]; then
+ wget $CLOUD_IMG_URL
fi
- if [ ! -f $VIVID_KERNEL ]; then
- tar zxf $VIVID_IMAGE $(basename $VIVID_KERNEL)
+ if [ ! -f "${CLOUD_KERNEL}" ]; then
+ tar zxf $CLOUD_IMAGE $(basename $CLOUD_KERNEL)
fi
- create_vivid_kernel=$(openstack image create \
+ create_kernel=$(openstack image create \
--public \
--disk-format qcow2 \
--container-format bare \
- --file $VIVID_KERNEL \
- yardstick-vivid-kernel)
+ --file $CLOUD_KERNEL \
+ yardstick-${release}-kernel)
- GLANCE_KERNEL_ID=$(echo "$create_vivid_kernel" | grep " id " | awk '{print $(NF-1)}')
+ GLANCE_KERNEL_ID=$(echo "$create_kernel" | grep " id " | awk '{print $(NF-1)}')
if [ -z "$GLANCE_KERNEL_ID" ]; then
echo 'Failed uploading kernel to cloud'.
exit 1
@@ -92,7 +98,7 @@ load_yardstick_image()
EXTRA_PARAMS="--property kernel_id=$GLANCE_KERNEL_ID --property os_command_line=\"$command_line\""
- rm -f $VIVID_KERNEL $VIVID_IMAGE
+ rm -f $CLOUD_KERNEL $CLOUD_IMAGE
cd $YARDSTICK_REPO_DIR
fi
@@ -101,6 +107,10 @@ load_yardstick_image()
EXTRA_PARAMS=$EXTRA_PARAMS" --property hw_mem_page_size=large"
fi
+ if [[ -n "${HW_FW_TYPE}" ]]; then
+ EXTRA_PARAMS=$EXTRA_PARAMS" --property hw_firmware_type=${HW_FW_TYPE}"
+ fi
+
if [[ "$DEPLOY_SCENARIO" == *"-lxd-"* ]]; then
output=$(eval openstack image create \
--public \
@@ -223,7 +233,7 @@ main()
build_yardstick_image
load_yardstick_image
- if [ $YARD_IMG_ARCH = "arm64" ]; then
+ if [ "${YARD_IMG_ARCH}" = "arm64" ]; then
sed -i 's/image: cirros-0.3.3/image: TestVM/g' tests/opnfv/test_cases/opnfv_yardstick_tc002.yaml \
samples/ping.yaml
#We have overlapping IP with the real network
diff --git a/tests/ci/report_config.yaml b/tests/ci/report_config.yaml
index 5346e608b..c8918bd0b 100644
--- a/tests/ci/report_config.yaml
+++ b/tests/ci/report_config.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
reporting:
-
name: apex
diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify
index 575bdc821..2986c9f2f 100755
--- a/tests/ci/yardstick-verify
+++ b/tests/ci/yardstick-verify
@@ -34,6 +34,7 @@ OPTIONS:
-h Show this message
-r Http target (example: -r 213.77.62.197/results)
-i Influxdb target (example: -i 127.0.0.1:8086)
+ -m Reporting target (example: -m 213.77.62.197/results)
Default target is dump to file ($DISPATCHER_FILE_NAME)
@@ -44,8 +45,9 @@ DISPATCHER_TYPE=file
DISPATCHER_FILE_NAME="/tmp/yardstick.out"
DISPATCHER_HTTP_TARGET="http://testresults.opnfv.org/test/api/v1/results"
DISPATCHER_INFLUXDB_TARGET=
+REPORTING_TARGET="${DISPATCHER_HTTP_TARGET}"
-while getopts "r:i:h" OPTION; do
+while getopts "r:i:m:h" OPTION; do
case $OPTION in
h)
usage
@@ -61,6 +63,9 @@ while getopts "r:i:h" OPTION; do
DISPATCHER_INFLUXDB_TARGET=http://${OPTARG}
DISPATCHER_FILE_NAME=
;;
+ m)
+ REPORTING_TARGET=http://${OPTARG}
+ ;;
*)
echo "${OPTION} is not a valid argument"
exit 1
@@ -150,7 +155,7 @@ report(){
\"start_date\":\"${2}\",
\"stop_date\":\"${3}\",
\"details\":\"\"}" \
- "${DISPATCHER_HTTP_TARGET}"
+ "${REPORTING_TARGET}"
}
run_test()