From 21194b7fde6029f0d2879622bf0dbba859f7ba45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Tue, 5 Dec 2023 14:25:36 +0100 Subject: [PATCH] fix the benchmarker script by testing for the correct amount of parameters and obtaining the test name correctly --- benchmarks/benchmark-descriptors/benchmarker.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/benchmarks/benchmark-descriptors/benchmarker.sh b/benchmarks/benchmark-descriptors/benchmarker.sh index 2f8ef72..b7be76e 100644 --- a/benchmarks/benchmark-descriptors/benchmarker.sh +++ b/benchmarks/benchmark-descriptors/benchmarker.sh @@ -1,7 +1,7 @@ #!/bin/bash # Check if the correct number of arguments is provided -if [ "$#" -ne 3 ]; then +if [ "$#" -ne 4 ]; then echo "Usage: $0 " exit 1 fi @@ -23,8 +23,9 @@ for json_file in "$json_directory"/*.json; do # Check if there are matching files if [ -e "$json_file" ]; then # Execute the program with the JSON file as parameters - name="${filename%.*}" + bn=$(basename $json_file) + name="${bn%.*}" echo "running test ${name} ..." - "$program_location" "$json_file" "${output-directory}/${name}${file_extender}.json" + "$program_location" "$json_file" "${output_dir}/${name}${file_extender}.json" fi done