Files
relay_chn/scripts/run_tests_all_cfgs.sh
ismail 96bb139751 Add new utility script and update test tags
- Added new utility script run_tests_all_cfgs.sh to run tests for all configurations and with test tag support.
- Updated run_tests.sh to add the new test tag for NVS unit tests.
2025-08-19 17:40:26 +03:00

31 lines
888 B
Bash
Executable File

#!/usr/bin/env bash
set -e
# Check tag argument
arg_tag=$1
if [[ -z "$arg_tag" ]]; then
arg_tag="all"
fi
# Resolve Paths and Switch to Working Directory
script_dir=$(dirname "$(readlink -f "$0")")
project_root=$(dirname "$script_dir")
echo "Script dir: ${script_dir}"
echo "Project root: ${project_root}"
echo "🔍 Searching for 'test_apps' directory in '$project_root'..."
test_apps_dir=$(find "$project_root" -type d -name "test_apps" | head -n 1)
echo "test_apps dir: ${test_apps_dir}"
# Execute tests for all configs
mapfile -t sdkcfg_files < <(find "$test_apps_dir" -maxdepth 1 -type f -name "sdkconfig.defaults*")
for sdkcfg_file in "${sdkcfg_files[@]}"; do
echo "🔧 Running tests with config: $sdkcfg_file"
"${script_dir}"/run_tests.sh -c -f "$sdkcfg_file" -t "$arg_tag" || {
echo "❌ Tests failed with config: $sdkcfg_file"
exit 1
}
done