add shellspec golden harness for the legacy make engine

- spec/golden/cases.txt: 69 black-box cases (CLI wrapper mode and make
  include mode) run in a hermetic sandbox with a mocked docker
- spec/golden/expected/*.txt recorded from this engine (baseline)
- make test / test-golden / golden-record / lint dev targets
This commit is contained in:
Yann Autissier
2026-09-03 14:35:58 +02:00
parent e2e34d813e
commit 1d44a2ff32
102 changed files with 632 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
# Mock docker for myos tests: logs every call, answers a few read-only queries deterministically.
[ -n "${MYOS_DOCKER_LOG:-}" ] && printf 'docker %s\n' "$*" >> "$MYOS_DOCKER_LOG"
case "$1 $2" in
"compose version") echo "${MOCK_COMPOSE_VERSION:-2.29.0}" ;;
"compose config") echo "# mock compose config" ;;
"compose ps") : ;;
"compose "*) : ;;
"info --format") echo "${MOCK_SWARM_STATE:-inactive}" ;;
"run --rm") case "$*" in *"uname -m"*) echo x86_64 ;; *"uname -s"*) echo Linux ;; *) : ;; esac ;;
"images -q") : ;;
"ps -q") : ;;
"network ls") : ;;
"volume ls") : ;;
"version --format") echo 29.0.0 ;;
*) : ;;
esac
exit 0