mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-07 09:40:44 +00:00
build: run_regression_tests.sh skip packages tests if asked
Co-Authored-By: Leonardo Grasso <me@leonardograsso.com> Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ set -u -o pipefail
|
||||
|
||||
BUILD_DIR=${BUILD_DIR:-/build}
|
||||
SOURCE_DIR=${SOURCE_DIR:-/source}
|
||||
SKIP_PACKAGES_TESTS=${SKIP_PACKAGES_TESTS:-false}
|
||||
|
||||
CMD=${1:-test}
|
||||
shift
|
||||
@@ -57,9 +58,11 @@ case "$CMD" in
|
||||
fi
|
||||
|
||||
# build docker images
|
||||
build_image "$BUILD_DIR" "$BUILD_TYPE" "$FALCO_VERSION" "deb"
|
||||
build_image "$BUILD_DIR" "$BUILD_TYPE" "$FALCO_VERSION" "rpm"
|
||||
build_image "$BUILD_DIR" "$BUILD_TYPE" "$FALCO_VERSION" "tar.gz"
|
||||
if [ "$SKIP_PACKAGES_TESTS" = false ] ; then
|
||||
build_image "$BUILD_DIR" "$BUILD_TYPE" "$FALCO_VERSION" "deb"
|
||||
build_image "$BUILD_DIR" "$BUILD_TYPE" "$FALCO_VERSION" "rpm"
|
||||
build_image "$BUILD_DIR" "$BUILD_TYPE" "$FALCO_VERSION" "tar.gz"
|
||||
fi
|
||||
|
||||
# check that source directory contains Falco
|
||||
if [ ! -d "$SOURCE_DIR/falco/test" ]; then
|
||||
@@ -70,12 +73,14 @@ case "$CMD" in
|
||||
# run tests
|
||||
echo "Running regression tests ..."
|
||||
cd "$SOURCE_DIR/falco/test"
|
||||
./run_regression_tests.sh -d "$BUILD_DIR/$BUILD_TYPE"
|
||||
SKIP_PACKAGES_TESTS=$SKIP_PACKAGES_TESTS ./run_regression_tests.sh -d "$BUILD_DIR/$BUILD_TYPE"
|
||||
|
||||
# clean docker images
|
||||
clean_image "deb"
|
||||
clean_image "rpm"
|
||||
clean_image "tar.gz"
|
||||
if [ "$SKIP_PACKAGES_TESTS" = false ] ; then
|
||||
clean_image "deb"
|
||||
clean_image "rpm"
|
||||
clean_image "tar.gz"
|
||||
fi
|
||||
;;
|
||||
"bash")
|
||||
CMD=/bin/bash
|
||||
|
Reference in New Issue
Block a user