From 4316498b8b3f94adb1ea98e3af28444cc562cbca Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 25 Feb 2025 12:45:27 +0900 Subject: [PATCH] examples: allow the engine name from the test script Usage: all.sh [engine name] [interval] Example: $./all.sh gl 3 --- examples/all.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/all.sh b/examples/all.sh index 799609e5..4ec6b2f8 100755 --- a/examples/all.sh +++ b/examples/all.sh @@ -3,7 +3,8 @@ RED='\033[31m' GREEN='\033[32m' NC='\033[0m' -INTERVAL=${1:-2} +ENGINE=${1:-"sw"} +INTERVAL=${2:-2} CHECK_OS="`uname -s`" if [[ "$CHECK_OS" = "Darwin"* ]]; then @@ -19,7 +20,7 @@ do fi echo -e "Execute: "${GREEN}$EXAMPLE${NC}" for "$INTERVAL" second(s)" - $EXAMPLE & + $EXAMPLE $ENGINE & EXAMPLE_PID=$! sleep $INTERVAL kill -s SIGTERM $EXAMPLE_PID