kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

run.sh (1152B)


      1 #!/bin/sh
      2 # Driver-level golden tests for linked-image inspection. Mostly `kit
      3 # objdump`, plus inherited tools (e.g. `size`) that read the same image view;
      4 # each case script picks its own subcommand.
      5 #
      6 # Per-arch subdirectories test/objdump/<arch>/cases/ hold <name>.sh +
      7 # <name>.expected. A case whose first output line begins with "SKIP" opts out
      8 # (e.g. missing llvm-mingw to build a PE fixture). Shared loop/reporting lives
      9 # in test/lib/kit_sh_report.sh.
     10 
     11 set -u
     12 
     13 script_dir=$(cd "$(dirname "$0")" && pwd)
     14 repo_root=$(cd "$script_dir/../.." && pwd)
     15 KIT_KIT_DIR="$repo_root/test/lib"
     16 . "$repo_root/test/lib/kit_sh_kit.sh"
     17 
     18 KIT="${KIT:-$repo_root/build/kit}"
     19 export KIT
     20 kit_require_kit objdump-driver
     21 
     22 kit_workdir objdump
     23 KIT_SCENARIO_SKIP=1          # honor leading "SKIP" lines from cases
     24 kit_report_init
     25 for arch_dir in "$script_dir"/*/; do
     26     [ -d "$arch_dir/cases" ] || continue
     27     arch=$(basename "$arch_dir")
     28     for sh in "$arch_dir/cases"/*.sh; do
     29         [ -e "$sh" ] || continue
     30         name=$(basename "${sh%.sh}")
     31         kit_scenario_case "$arch/$name" "$sh" "${sh%.sh}.expected"
     32     done
     33 done
     34 kit_summary objdump-driver
     35 kit_exit