Commit 5b8f2f7a authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: cases.list -> data root (repo keeps template + code only)

Andrey's rulings 07/13/2026: data directories are not git-controlled; the
repo is shared across computers with different data sets, so it carries
code, generators and a heavily-commented TEMPLATE (linux-config style) -
everything data-specific lives under the data root:

- cases.list -> cases.list.tmpl (tracked; install by copying to
  <dataRoot>/lists/cases.list next to the scene lists; SET listFile may
  then be a bare filename - resolved relative to the manifest's directory).
- /cases.list gitignored: optional repo-local symlink into the data root
  so a bare ./run_cases.sh works.
- run_cases.sh: manifest lookup order -c arg -> ./cases.list link ->
  via -x/-l through the scene list's rootDirectory (<root>/lists/,
  <root>/, next to the scene list). -x corr-xml alone now finds
  everything (list, version, manifest) from the entries the Java run uses.

Verified live: installed at /home/elphel/lwir16-proc/LV/lists/cases.list;
bare run ALL PASS via the symlink; -x corr-xml discovery ALL resolved with
the symlink removed.
Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
parent 72e2caf1
......@@ -7,6 +7,7 @@
/launches
*.kate-swp
attic
/cases.list
/core
/Debug
/Release
......
# cases.list - top-level test-case manifest for the per-kernel GPU tests.
# cases.list.tmpl - TEMPLATE of the top-level test-case manifest for the
# per-kernel GPU tests. The LIVE cases.list is DATA-SPECIFIC and lives under
# the data root, NOT in this repo (Andrey's ruling 07/13/2026: the repo carries
# code + generators only; data directories are not git-controlled, and
# different computers share this repo against different data sets). Install:
#
# cp cases.list.tmpl <dataRoot>/lists/cases.list # then edit SET lines
# ln -s <dataRoot>/lists/cases.list cases.list # optional repo-local link
# # (gitignored) so a bare
# # ./run_cases.sh finds it
#
# SAME CONVENTION as the scene-sequence .list files (lv_*.list): the header is
# SET lines, the main body SELECTS cases by uncommenting them. Run with:
#
# ./run_cases.sh # every uncommented case below
# ./run_cases.sh pose_corr peak # named cases (even if commented out here)
# ./run_cases.sh -c <cases.list> ... # explicit manifest path
# ./run_cases.sh -x <file>.corr-xml pose_corr # list+version from the corr-xml
# # (also finds the manifest via the
# # scene list's rootDirectory)
# ./run_cases.sh -v v013-MB2x pose_corr # version override
#
# ${MODEL} in a data template resolves through the SAME two sources that drive
......@@ -25,10 +38,18 @@
#
# By Claude on 07/13/2026, from Andrey's design (manifest-like tests top).
SET listFile /home/elphel/lwir16-proc/LV/lists/lv_0310_26.list
# listFile: absolute, or relative to THIS file's directory (the installed copy
# sits next to the scene lists, so a bare filename is the usual form).
SET listFile lv_0310_26.list
#SET listFile /home/elphel/lwir16-proc/LV/lists/lv_0310_26.list # absolute form
# version: the model version under <scene>-CENTER/ - deliberately NOT in the
# scene list (same rule as CORRECTION_PARAMETERS.x3dModelVersion) so the same
# sequences re-run against different settings by changing this one value.
SET version v013
SET srcDir src # NVRTC kernel source, relative to this file
#SET version v013-MB2x # e.g. the synthetic/model variants
SET srcDir src # NVRTC kernel source, relative to the REPO
SET devrt /usr/local/cuda-12.8/lib64/libcudadevrt.a
#SET devrt /usr/local/cuda/lib64/libcudadevrt.a # only if /usr/local/cuda >= 12.8 (Blackwell sm_120)
# case <name> <binary> <data template> <extra args>
# --- real-scene cases (data exported by curt.kernel_test on the model below) ---
......
......@@ -4,9 +4,15 @@
# selects cases by uncommenting. ${MODEL} resolves through the SAME two sources
# the Java runs use: the scene-sequence .list file + the model version (kept
# out of the scene list, mirroring CORRECTION_PARAMETERS.x3dModelVersion).
# The LIVE manifest is DATA-SPECIFIC and lives under the data root (data dirs
# are not git-controlled; this repo tracks only cases.list.tmpl + generators).
# Manifest lookup order: -c arg; ./cases.list (gitignored local copy/symlink);
# via -x/-l: the scene list's rootDirectory (<root>/lists/cases.list,
# <root>/cases.list, or next to the scene list itself).
#
# ./run_cases.sh # all uncommented cases
# ./run_cases.sh pose_corr peak # named cases (commented ones too)
# ./run_cases.sh -c <cases.list> ... # explicit manifest
# ./run_cases.sh -x <file>.corr-xml ... # listFile+version from the corr-xml
# ./run_cases.sh -l <scene.list> -v v013-MB2x ... # explicit overrides
# ./run_cases.sh --model <dir> ... # pin ${MODEL} directly
......@@ -14,25 +20,57 @@
#
# By Claude on 07/13/2026, from Andrey's design.
set -u
cd "$(dirname "$0")" # repo root = where cases.list lives
cd "$(dirname "$0")" # repo root
REPO="$PWD"
CASES="$REPO/cases.list"
CASES=""
list_file=""; version=""; model=""; corr_xml=""; show_only=0
declare -a want=()
while [ $# -gt 0 ]; do
case "$1" in
-c) CASES="$2"; shift 2;;
-x) corr_xml="$2"; shift 2;;
-l) list_file="$2"; shift 2;;
-v) version="$2"; shift 2;;
--model) model="$2"; shift 2;;
--list) show_only=1; shift;;
-h|--help) sed -n '2,15p' "$0"; exit 0;;
-h|--help) sed -n '2,21p' "$0"; exit 0;;
*) want+=("$1"); shift;;
esac
done
# ---- header SET values from cases.list (command line wins) ----
# ---- corr-xml: listFile+version from the exact entries the Java run uses ----
if [ -n "$corr_xml" ]; then
xml_get() { sed -n "s/.*<entry key=\"CORRECTION_PARAMETERS.$1\">\([^<]*\)<.*/\1/p" "$corr_xml" | tail -1; }
v="$(xml_get sourceSequencesList)"; [ -n "$v" ] && [ -z "$list_file" ] && list_file="$v"
v="$(xml_get x3dModelVersion)"; [ -n "$v" ] && [ -z "$version" ] && version="$v"
fi
# ---- locate the manifest (data-specific, lives under the data root) ----
scene_list_root() { # rootDirectory from a scene list
sed -n "s/^SET[[:space:]]\+rootDirectory[[:space:]]\+\([^#]*\).*/\1/p" "$1" | tail -1 | sed 's/[[:space:]]*$//;s|/$||'
}
if [ -z "$CASES" ]; then
if [ -f "$REPO/cases.list" ]; then
CASES="$REPO/cases.list" # local copy or symlink into the data root
elif [ -n "$list_file" ] && [ -f "$list_file" ]; then
root="$(scene_list_root "$list_file")"
for c in "$root/lists/cases.list" "$root/cases.list" "$(dirname "$list_file")/cases.list"; do
[ -f "$c" ] && { CASES="$c"; break; }
done
fi
fi
if [ -z "$CASES" ] || [ ! -f "$CASES" ]; then
echo "run_cases.sh: no cases.list found. Install one under your data root:" >&2
echo " cp $REPO/cases.list.tmpl <dataRoot>/lists/cases.list (then edit SET lines)" >&2
echo " ln -s <dataRoot>/lists/cases.list $REPO/cases.list (optional local link)" >&2
echo "or pass -c <cases.list> / -x <file>.corr-xml." >&2
exit 1
fi
CASES="$(readlink -f "$CASES")"
CASES_DIR="$(dirname "$CASES")"
# ---- header SET values from the manifest (command line / corr-xml win) ----
get_set() { # $1 = key
sed -n "s/^SET[[:space:]]\+$1[[:space:]]\+\([^#]*\).*/\1/p" "$CASES" | tail -1 | sed 's/[[:space:]]*$//'
}
......@@ -40,13 +78,9 @@ get_set() { # $1 = key
[ -n "$version" ] || version="$(get_set version)"
src_dir="$(get_set srcDir)"; src_dir="${src_dir:-src}"
devrt="$(get_set devrt)"
# ---- corr-xml overrides both (the single-source mode) ----
if [ -n "$corr_xml" ]; then
xml_get() { sed -n "s/.*<entry key=\"CORRECTION_PARAMETERS.$1\">\([^<]*\)<.*/\1/p" "$corr_xml" | tail -1; }
v="$(xml_get sourceSequencesList)"; [ -n "$v" ] && list_file="$v"
v="$(xml_get x3dModelVersion)"; [ -n "$v" ] && version="$v"
fi
# listFile relative -> relative to the manifest's own directory (it is
# installed next to the scene lists, so a bare filename is the usual form)
case "$list_file" in /*|"") : ;; *) list_file="$CASES_DIR/$list_file";; esac
# ---- resolve ${MODEL} from the scene list + version (unless pinned) ----
# scene list: SET rootDirectory/x3dDirectory in its header; UNCOMMENTED body
......@@ -84,10 +118,6 @@ resolve_model() {
}
models="$model"
if [ -z "$models" ] && grep -qE '^case[[:space:]]' "$CASES"; then
# resolve lazily only if some selected case actually uses ${MODEL} (below)
:
fi
# ---- collect selected cases ----
# case line: case <name> <binary> <data template> <extra args...>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment