mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
examples: allow the engine name from the test script
Usage: all.sh [engine name] [interval] Example: $./all.sh gl 3
This commit is contained in:
parent
70f0ec9ff2
commit
4316498b8b
1 changed files with 3 additions and 2 deletions
|
@ -3,7 +3,8 @@ RED='\033[31m'
|
||||||
GREEN='\033[32m'
|
GREEN='\033[32m'
|
||||||
NC='\033[0m'
|
NC='\033[0m'
|
||||||
|
|
||||||
INTERVAL=${1:-2}
|
ENGINE=${1:-"sw"}
|
||||||
|
INTERVAL=${2:-2}
|
||||||
CHECK_OS="`uname -s`"
|
CHECK_OS="`uname -s`"
|
||||||
|
|
||||||
if [[ "$CHECK_OS" = "Darwin"* ]]; then
|
if [[ "$CHECK_OS" = "Darwin"* ]]; then
|
||||||
|
@ -19,7 +20,7 @@ do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "Execute: "${GREEN}$EXAMPLE${NC}" for "$INTERVAL" second(s)"
|
echo -e "Execute: "${GREEN}$EXAMPLE${NC}" for "$INTERVAL" second(s)"
|
||||||
$EXAMPLE &
|
$EXAMPLE $ENGINE &
|
||||||
EXAMPLE_PID=$!
|
EXAMPLE_PID=$!
|
||||||
sleep $INTERVAL
|
sleep $INTERVAL
|
||||||
kill -s SIGTERM $EXAMPLE_PID
|
kill -s SIGTERM $EXAMPLE_PID
|
||||||
|
|
Loading…
Add table
Reference in a new issue