You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
708 B
24 lines
708 B
#!/bin/bash
|
|
|
|
# Assign arguments to variables
|
|
program_location="cmake-build-release/dml-benchmark"
|
|
json_directory="$1"
|
|
output_dir="benchmark-results/"
|
|
|
|
# Check if the specified directory exists
|
|
if [ ! -d "$json_directory" ]; then
|
|
echo "Error: Directory $json_directory not found."
|
|
exit 1
|
|
fi
|
|
|
|
# Iterate over all JSON files in the directory
|
|
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
|
|
bn=$(basename $json_file)
|
|
name="${bn%.*}"
|
|
echo "running test ${name} ..."
|
|
"$program_location" "$json_file" "${output_dir}/${name}.json"
|
|
fi
|
|
done
|