aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLuca Muscariello <muscariello@ieee.org>2022-08-10 18:25:53 +0000
committerGerrit Code Review <gerrit@fd.io>2022-08-10 18:25:53 +0000
commit86b55b5095488b4ade662a03234e6d084c170458 (patch)
tree33a65a68548458a5101f206be183feefbf64fa67 /scripts
parentc7d2d5d49f79c49614ec154199708f6488ba7ad6 (diff)
parent24a4dec7f91e9b6f0a8279f6eaeebbb35ba49c4f (diff)
Merge "ci: add functional tests to verification/merge jobs"
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build-packages.sh22
-rw-r--r--scripts/functions.sh2
-rw-r--r--scripts/install-vpp.sh3
3 files changed, 24 insertions, 3 deletions
diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh
index d7684e400..a17e180f7 100644
--- a/scripts/build-packages.sh
+++ b/scripts/build-packages.sh
@@ -1,4 +1,4 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
+# Copyright (c) 2017-2022 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -28,9 +28,9 @@ function build_package() {
echo "*******************************************************************"
# Make the package
- make -C ${SCRIPT_PATH}/.. INSTALL_PREFIX=/usr test package-release
+ make -C "${SCRIPT_PATH}/.." BUILD_PATH="${SCRIPT_PATH}/../packages" INSTALL_PREFIX=/usr test package-release
- pushd ${SCRIPT_PATH}/../build-release-${ID}
+ pushd ${SCRIPT_PATH}/../packages
find . -not -name '*.deb' -not -name '*.rpm' -print0 | xargs -0 rm -rf -- || true
rm *Unspecified* *Development* *development* || true
popd
@@ -40,6 +40,21 @@ function build_package() {
echo "*******************************************************************"
}
+function functional_test() {
+ echo "*******************************************************************"
+ echo "********************* STARTING FUNCTIONAL TESTS *******************"
+ echo "*******************************************************************"
+
+ # Run functional tests
+ pushd ${SCRIPT_PATH}/..
+ BUILD_SOFTWARE=0 DOCKERFILE="tests/Dockerfile.ci" bash ./tests/run-functional.sh
+ popd
+
+ echo "*******************************************************************"
+ echo "********** FUNCTIONAL TESTS COMPLETED SUCCESSFULLY ***************"
+ echo "*******************************************************************"
+}
+
build_sphinx() {
setup
@@ -69,6 +84,7 @@ case "${1}" in
;;
packages)
build_package
+ functional_test
;;
*)
usage
diff --git a/scripts/functions.sh b/scripts/functions.sh
index e416ee274..147f6669c 100644
--- a/scripts/functions.sh
+++ b/scripts/functions.sh
@@ -56,6 +56,8 @@ function call_once() {
# Install dependencies
function install_deps() {
+ curl -fsSL https://get.docker.com -o get-docker.sh
+ sudo sh get-docker.sh
make -C ${SCRIPT_PATH}/.. deps
}
diff --git a/scripts/install-vpp.sh b/scripts/install-vpp.sh
index 855587a2e..3c2d2104b 100644
--- a/scripts/install-vpp.sh
+++ b/scripts/install-vpp.sh
@@ -31,6 +31,9 @@ fi
# Prevent vpp to set sysctl
export VPP_INSTALL_SKIP_SYSCTL=1
+apt-get update
+apt-get install -y curl
+
curl -s https://packagecloud.io/install/repositories/fdio/${VPP_VERSION}/script.deb.sh | bash
curl -L https://packagecloud.io/fdio/${VPP_VERSION}/gpgkey | apt-key add -
sed -E -i 's/(deb.*)(\[.*\])(.*)/\1\3/g' /etc/apt/sources.list.d/fdio_"${VPP_VERSION}".list