Files
Yann Autissier 35999574bd run the golden suite against the CLI too, and pin every delta
Both engines now go through the same 68 cases. 31 produce byte-identical
output; the rest have a recorded CLI expectation and a reason in DELTAS.md,
the bulk of it being that the CLI does not shell out to a recursive make and
calls compose once per project.

Fixed while comparing: the CLI was missing the COMPOSE_FILE_* defaults, so
overlays such as supabase.labels.yml would not have been loaded at all.
2026-09-03 18:39:23 +02:00

20 lines
807 B
Bash
Executable File

#!/bin/sh
# Record golden outputs of the LEGACY make engine into spec/golden/expected/.
# Usage: spec/golden/record.sh [case-name ...]
set -u
here=$(cd "$(dirname "$0")" && pwd)
# shellcheck source=spec/support/run.sh
. "$here/../support/run.sh"
MYOS_ROOT=${MYOS_ROOT:-$(cd "$here/../.." && pwd)}
only="$*"
grep -v '^#' "$here/cases.txt" | while IFS='|' read -r name fixture args; do
name=$(echo "$name" | tr -d ' '); fixture=$(echo "$fixture" | tr -d ' ')
[ -z "$name" ] && continue
if [ -n "$only" ]; then case " $only " in *" $name "*) ;; *) continue ;; esac; fi
sb=$(myos_sandbox "$fixture")
eval "set -- $args"
myos_run_engine legacy "$sb" "$@" > "$here/expected/$name.txt"
rm -rf "$sb"
printf 'recorded %s (%s lines)\n' "$name" "$(wc -l < "$here/expected/$name.txt" | tr -d ' ')"
done