#!/bin/bash
set -euo pipefail

# The name of the package where this script (and its siblings) are located.
pkg_name="lidar/metrics/v2"

# Run the test metrics #
#############################
output_directory="/tmp/run_metrics"
mkdir --parents ${output_directory}
rostask/rostask ${pkg_name}/run_metrics_suite_standalone --suite ${pkg_name}/data/test.pbtxt --report_dir ${output_directory} --work_directory ${output_directory} --command tracking
rostask/rostask ${pkg_name}/run_metrics_suite_standalone --suite ${pkg_name}/data/test.pbtxt --report_dir ${output_directory} --work_directory ${output_directory} --command timing
rostask/rostask ${pkg_name}/run_metrics_suite_standalone --suite ${pkg_name}/data/test.pbtxt --report_dir ${output_directory} --work_directory ${output_directory} --command aggregate
rm --recursive --force ${output_directory}
