aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/build-packages.sh
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-08-09 14:18:05 +0200
committerMauro Sardara <msardara@cisco.com>2022-08-09 15:14:10 +0200
commit24a4dec7f91e9b6f0a8279f6eaeebbb35ba49c4f (patch)
tree37c5c4da37dac456c96b33da6ac80667a79705da /scripts/build-packages.sh
parent8d27045832427a0ea345f48bfb2c42f46a357af1 (diff)
ci: add functional tests to verification/merge jobs
Ref: ICN-732 Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: Iabfce26c446c502dc1d8f50da0d607791ce392e9
Diffstat (limited to 'scripts/build-packages.sh')
-rw-r--r--scripts/build-packages.sh22
1 files changed, 19 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