+++ /dev/null
-csit_sut-ubuntu2404:local
--- /dev/null
+64a4e8d7cde13eeb0034bc2d835defef88d8f345
\ No newline at end of file
- name: "Restart Docker Daemon"
ansible.builtin.systemd:
name: "docker"
- state: "restarted"
-
-- name: "Kill LXC Containers"
- block:
- - name: "Get Running LXC Containers"
- ansible.builtin.shell: "lxc-ls"
- register: running_containers
- changed_when: false
- tags:
- - kill-containers
-
- - name: "Remove All LXC Containers"
- ansible.builtin.shell: "lxc-destroy --force -n {{ item }}"
- with_items: "{{ running_containers.stdout_lines }}"
- tags:
- - kill-containers
-
- rescue:
- - fail:
- msg: "Kill LXC containers failed!"
+ state: "restarted"
\ No newline at end of file
#!/usr/bin/env bash
-# Copyright (c) 2023 Cisco and/or its affiliates.
+# Copyright (c) 2025 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:
source "${BASH_FUNCTION_DIR}/ansible.sh" || die "Source failed."
common_dirs || die
check_prerequisites || die
+get_test_code "${1-}" || die
+get_test_tag_string || die
set_perpatch_vpp_dir || die
git status || die
git describe || die
build_vpp_ubuntu "PARENT" || die
set_aside_build_artifacts "parent" || die
initialize_csit_dirs "parent" "current" || die
-get_test_code "${1-}" || die
-get_test_tag_string || die
set_perpatch_dut || die
select_topology || die
select_arch_os || die
--- /dev/null
+# Copyright (c) 2025 Cisco and/or its affiliates.
+# Copyright (c) 2025 PANTHEON.tech 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:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -exuo pipefail
+
+# This library defines functions used mainly by "bootstrap" entry scripts.
+# Generally, the functions assume "common.sh" library has been sourced already.
+
+# Keep functions ordered alphabetically, please.
+
+function build_vpp () {
+
+ # Variables read:
+ # - BASH_FUNCTION_DIR - Bash directory with functions.
+ # - TEST_CODE - The test selection string from environment or argument.
+ # - DOWNLOAD_DIR - Path to directory robot takes the build to test from.
+ # - CSIT_DIR - Path to existing root of local CSIT git repository.
+ # Variables set:
+ # - VPP_VERSION - VPP stable version under test.
+ # Files read:
+ # - ${CSIT_DIR}/${VPP_COMMIT_FILE} - VPP commit to use.
+ # Directories updated:
+ # - ${DOWNLOAD_DIR}, vpp-*.deb files are copied here for testing.
+ # Functions called:
+ # - die - Print to stderr and exit, defined in common.sh
+
+ set -exuo pipefail
+
+ case "${TEST_CODE}" in
+ "csit-"*)
+ # Use downloaded packages with specific version.
+ if [[ "${TEST_CODE}" == *"daily"* ]] || \
+ { [[ "${TEST_CODE}" == *"weekly"* ]] && \
+ [[ "${TEST_CODE}" != *"device"* ]]; } || \
+ [[ "${TEST_CODE}" == *"semiweekly"* ]] || \
+ [[ "${TEST_CODE}" == *"hourly"* ]];
+ then
+ warn "Cloning latest commit from VPP repository."
+ else
+ warn "Cloning stable commit from VPP repository."
+ VPP_VERSION="$(<"${CSIT_DIR}/${VPP_COMMIT_FILE}")" || {
+ die "Read VPP stable version failed."
+ }
+ fi
+ source "${BASH_FUNCTION_DIR}/per_patch.sh" || die "Source failed."
+ clone_vpp_repo || die
+ set_csit_vpp_dir || die
+ build_vpp_ubuntu "CURRENT" || die
+ select_build "build-root" || die
+ remove_vpp_repo || die
+ ;;
+ *)
+ die "Unsupported job type from: ${TEST_CODE}"
+ ;;
+ esac
+}
# - TEST_CODE - The test selection string from environment or argument.
# - NODENESS - Node multiplicity of desired testbed.
# - FLAVOR - Node flavor string, usually describing the processor.
+ # - VPP_PLATFORM - VPP build optimisation string.
set -exuo pipefail
*"3n-oct")
NODENESS="3n"
FLAVOR="oct"
+ VPP_PLATFORM="octeon10"
;;
*"-x-2n"*)
TESTBED="${TEST_CODE#${TEST_CODE%2n*}}"
# Set variables affected by local CPU architecture and operating system.
#
# Variables set:
- # - VPP_VER_FILE - Name of file in CSIT dir containing vpp stable version.
# - IMAGE_VER_FILE - Name of file in CSIT dir containing the image name.
+ # - VPP_COMMIT_FILE - Name of file in CSIT dir containing vpp commit
+ # version.
+ # - VPP_VER_FILE - Name of file in CSIT dir containing vpp stable version.
# - PKG_SUFFIX - Suffix of OS package file name, "rpm" or "deb."
set -exuo pipefail
case "${VERSION}" in
*"LTS (Jammy Jellyfish)"*)
IMAGE_VER_FILE="VPP_DEVICE_IMAGE_UBUNTU_JAMMY"
+ VPP_COMMIT_FILE="VPP_STABLE_COMMIT"
VPP_VER_FILE="VPP_STABLE_VER_UBUNTU_JAMMY"
PKG_SUFFIX="deb"
;;
*"LTS (Noble Numbat)"*)
IMAGE_VER_FILE="VPP_DEVICE_IMAGE_UBUNTU_NOBLE"
+ VPP_COMMIT_FILE="VPP_STABLE_COMMIT"
VPP_VER_FILE="VPP_STABLE_VER_UBUNTU_NOBLE"
PKG_SUFFIX="deb"
;;
-# Copyright (c) 2024 Cisco and/or its affiliates.
-# Copyright (c) 2024 PANTHEON.tech and/or its affiliates.
+# Copyright (c) 2025 Cisco and/or its affiliates.
+# Copyright (c) 2025 PANTHEON.tech 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:
# - ${DOWNLOAD_DIR} - Files needed by tests are gathered here.
# Functions called:
# - die - Print to stderr and exit, defined in common.sh
- # - gather_os - Parse os parameter for OS/distro name.
# - gather_dpdk, gather_vpp - See their definitions.
+ # - build_vpp - See their definitions.
# Multiple other side effects are possible,
# see functions called from here for their current description.
pushd "${DOWNLOAD_DIR}" || die "Pushd failed."
case "${TEST_CODE}" in
+ *"vpp"*"3n-oct")
+ DUT="vpp"
+ source "${BASH_FUNCTION_DIR}/build_${DUT}.sh" || die "Source fail."
+ build_vpp || die "The function should have died on error."
+ ;;
*"vpp"*)
DUT="vpp"
source "${BASH_FUNCTION_DIR}/gather_${DUT}.sh" || die "Source fail."
-# Copyright (c) 2023 Cisco and/or its affiliates.
-# Copyright (c) 2023 PANTHEON.tech s.r.o.
+# Copyright (c) 2025 Cisco and/or its affiliates.
+# Copyright (c) 2025 PANTHEON.tech s.r.o.
# 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:
# - MAKE_PARALLEL_FLAGS - Make flags when building VPP.
# - MAKE_PARALLEL_JOBS - Number of cores to use when building VPP.
# - VPP_DIR - Path to existing directory, parent to accessed directories.
+ # - VPP_PLATFORM - Platform optiomizaion string.
# Directories updated:
# - ${VPP_DIR} - Whole subtree, many files (re)created by the build process.
# Functions called:
"using build default ($(grep -c ^processor /proc/cpuinfo))."
fi
- make UNATTENDED=y pkg-verify || die "VPP build with make pkg-verify failed."
+ if [ -z "${VPP_PLATFORM-}" ]; then
+ make_params="UNATTENDED=y"
+ else
+ make_params="UNATTENDED=y VPP_PLATFORM=${VPP_PLATFORM}"
+ fi
+ make ${make_params} pkg-verify || die "VPP build failed."
echo "* VPP ${1-} BUILD SUCCESSFULLY COMPLETED" || {
die "Argument not found."
}
}
+function clone_vpp_repo () {
+
+ # Clones VPP repository into CSIT directory. In case VPP_VERSION is set,
+ # it checks out the specific commit id. Otherwise use the latest HEAD.
+ #
+ # Variables read:
+ # - CSIT_DIR - Path to existing root of local CSIT git repository.
+ # - GIT_URL - FD.io gerrit URL.
+ # - VPP_VERSION - VPP stable version under test.
+
+ set -exuo pipefail
+
+ pushd "${CSIT_DIR}/" || die "Pushd failed."
+ git clone "${GIT_URL}/vpp" --depth=1 --no-single-branch --no-checkout || \
+ die "Failed to clone VPP repository."
+ pushd "${CSIT_DIR}/vpp" || die "Pushd failed."
+ if [[ -n "${VPP_VERSION-}" ]]; then
+ git fetch "${GIT_URL}/vpp" "${VPP_VERSION}" || \
+ die "Failed to fetch specific commit id."
+ git checkout FETCH_HEAD || die "Checkout FETCH_HEAD failed."
+ else
+ git checkout HEAD || die "Checkout HEAD failed."
+ fi
+ popd || die "Popd failed."
+}
+
+
function compare_test_results () {
# Variables read:
}
+function remove_vpp_repo () {
+
+ # Removes directory with cloned VPP repository to save the space.
+ #
+ # Variables read:
+ # - VPP_DIR - Path to existing root of local VPP git repository.
+
+ set -exuo pipefail
+
+ popd || die "Popd failed."
+ rm -rf "${VPP_DIR}" || die "Directory deletion failed."
+}
+
function select_build () {
# Arguments:
# In perpatch, CSIT is cloned inside VPP clone.
VPP_DIR="$(readlink -e "${CSIT_DIR}/..")" || die "Readlink failed."
}
+
+
+function set_csit_vpp_dir () {
+
+ # Variables read:
+ # - CSIT_DIR - Path to existing root of local CSIT git repository.
+ # Variables set:
+ # - VPP_DIR - Path to existing root of local VPP git repository.
+ # Functions called:
+ # - die - Print to stderr and exit, defined in common.sh
+
+ set -exuo pipefail
+
+ # In verify, VPP is cloned within CSIT dir.
+ VPP_DIR="$(readlink -e "${CSIT_DIR}/vpp")" || die "Readlink failed."
+}
\ No newline at end of file
model: Cavium-A063-100G
port2:
# s95-t215-sut1-c2/p1 - 100GE port2 Cavium A063 2p100GE.
- mac_address: "1a:cc:6a:50:05:2a"
+ mac_address: "1a:cc:6a:50:05:2b"
pci_address: "0002:03:00.0"
ip4_address: 172.16.30.1
driver: rvu_nicpf