Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 33 additions & 12 deletions smoke/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,39 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2024 Robin Jarry

set -eu

here=$(dirname $0)
if [ "$1" = "--coredump" ]; then
coredump=true
ulimit -c unlimited
trap "sysctl -qw 'kernel.core_pattern=$(sysctl -n kernel.core_pattern)'" EXIT
sysctl -qw kernel.core_pattern=/tmp/grout-core.%e.%p
shift
fi
builddir=${1-}
skip_patterns=()
log=$(mktemp)
result=0

run() {
local script="$1"
local res=0
return $res
while [ $# -gt 0 ]; do
case "$1" in
-s|--skip)
shift
skip_patterns+=("$1")
;;
-*)
echo "error: invalid option: $1" >&2
exit 1
;;
*)
builddir="$1"
esac
shift
done

skip_test() {
local name=$1
for pattern in "${skip_patterns[@]}"; do
case "$name" in
$pattern)
return 0
;;
esac
done
return 1
}

test_frr=false
Expand All @@ -37,6 +54,10 @@ for script in $here/*_test.sh; do
esac

printf "%s ... " "$name"
if skip_test "$name"; then
echo "SKIPPED"
continue
fi
start=$(date +%s)
res=OK

Expand Down