run.sh (714B)
1 #!/bin/sh 2 # Driver-level `kit strip` test harness. Shared loop/reporting in 3 # test/lib/kit_sh_report.sh; per case: run cases/<name>.sh in a sandbox and 4 # diff stdout+stderr against cases/<name>.expected. 5 6 set -u 7 8 script_dir=$(cd "$(dirname "$0")" && pwd) 9 repo_root=$(cd "$script_dir/../.." && pwd) 10 cases_dir="$script_dir/cases" 11 KIT_KIT_DIR="$repo_root/test/lib" 12 . "$repo_root/test/lib/kit_sh_kit.sh" 13 14 KIT="${KIT:-$repo_root/build/kit}" 15 export KIT 16 kit_require_kit strip-driver 17 18 kit_workdir strip 19 kit_report_init 20 for sh in "$cases_dir"/*.sh; do 21 [ -e "$sh" ] || continue 22 name=$(basename "${sh%.sh}") 23 kit_scenario_case "$name" "$sh" "${sh%.sh}.expected" "$cases_dir" 24 done 25 kit_summary strip-driver 26 kit_exit