aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Wagner <wagi@monom.org>2024-03-21 16:34:54 +0100
committerAnders Roxell <anders.roxell@gmail.com>2024-03-25 08:53:01 +0100
commiteb22b4c670c7ae4e7ebb5fb5fd4a7b96e31e3d01 (patch)
tree53fd951d67ade2a9c4f8d2c40752106fd11349f3
parent69eabfb366da41c7f4f5c1f617be7e08c6b1a241 (diff)
signaltest: add support to run a thread per cpuHEADmaster
Add the feature to run a thread per CPU automatically. This simplifies setups with many different boards where the test should run a thread per available CPU. Signed-off-by: Daniel Wagner <wagi@monom.org>
-rwxr-xr-xautomated/linux/signaltest/signaltest.sh4
-rw-r--r--automated/linux/signaltest/signaltest.yaml2
2 files changed, 6 insertions, 0 deletions
diff --git a/automated/linux/signaltest/signaltest.sh b/automated/linux/signaltest/signaltest.sh
index cb5478cb..e7db4f3a 100755
--- a/automated/linux/signaltest/signaltest.sh
+++ b/automated/linux/signaltest/signaltest.sh
@@ -31,6 +31,10 @@ done
! check_root && error_msg "Please run this script as root."
create_out_dir "${OUTPUT}"
+if [ "${THREADS}" -eq "0" ]; then
+ THREADS=$(nproc)
+fi
+
# Run signaltest.
if ! binary=$(command -v signaltest); then
detect_abi
diff --git a/automated/linux/signaltest/signaltest.yaml b/automated/linux/signaltest/signaltest.yaml
index 53949e9a..98bc808d 100644
--- a/automated/linux/signaltest/signaltest.yaml
+++ b/automated/linux/signaltest/signaltest.yaml
@@ -29,7 +29,9 @@ params:
# Priority of highest prio thread.
PRIORITY: "98"
# Number of threads.
+ # A value of "0" will run a thread per available CPU.
THREADS: "2"
+ # Execute cyclictest for given time
DURATION: "1m"
# Background workload to be run during the meassurement
BACKGROUND_CMD: ""