From 13961777067765794bffa417f4f6eefefdc1576a Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 29 Jun 2025 11:59:46 +0200 Subject: [PATCH] test: expand with command line options for increased usability Signed-off-by: Joachim Wiberg --- check.sh | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/check.sh b/check.sh index 56c32bb2..3c091323 100755 --- a/check.sh +++ b/check.sh @@ -1,8 +1,33 @@ #!/bin/sh # Run test suite with the correct configure params +run_make=1 +jobs=17 -make distclean -./configure --prefix=/usr --exec-prefix= --sysconfdir=/etc --localstatedir=/var \ - --enable-x11-common-plugin --with-watchdog --with-keventd \ +while [ $# -gt 0 ]; do + case "$1" in + -n|--no-make) + run_make=0 + ;; + -j|--jobs) + shift + jobs="$1" + ;; + *) + echo "Usage: $0 [--no-make] [-j N]" + exit 1 + ;; + esac + shift +done + +if [ "$run_make" -eq 1 ]; then + make distclean +fi + +./configure --prefix=/usr --exec-prefix= --sysconfdir=/etc --localstatedir=/var \ + --enable-x11-common-plugin --with-watchdog --with-keventd \ CFLAGS='-fsanitize=address -ggdb' -make -j17 clean check + +if [ "$run_make" -eq 1 ]; then + make -j"$jobs" clean check +fi