Add a release pipeline including tests for Bird2 and VPP

This commit is contained in:
2026-04-05 17:34:30 +02:00
parent a7fb7db978
commit 9fc41679fd
20 changed files with 806 additions and 160 deletions

45
tests/rf-run.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
# Run Robot Framework tests for vpp-containerlab.
# Arguments:
# $1 - container runtime: [docker, podman]
# $2 - test suite path (directory or .robot file)
#
# Environment variables:
# CLAB_BIN - path to containerlab binary (default: containerlab)
# IMAGE - docker image to use in topology (must be set)
set -e
if [ -z "${CLAB_BIN}" ]; then
CLAB_BIN=containerlab
fi
if [ -z "${IMAGE}" ]; then
echo "ERROR: IMAGE environment variable must be set" >&2
exit 1
fi
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
mkdir -p "${SCRIPT_DIR}/out"
source "${SCRIPT_DIR}/.venv/bin/activate"
function get_logname() {
path=$1
filename=$(basename "$path")
if [[ "$filename" == *.* ]]; then
dirname=$(dirname "$path")
basename=$(basename "$path" | cut -d. -f1)
echo "${dirname##*/}-${basename}"
else
echo "${filename}"
fi
}
robot --consolecolors on -r none \
--variable CLAB_BIN:"${CLAB_BIN}" \
--variable runtime:"$1" \
-l "${SCRIPT_DIR}/out/$(get_logname $2)-$1-log" \
--output "${SCRIPT_DIR}/out/$(get_logname $2)-$1-out.xml" \
"$2"