test: combined.ww freshness gate in phase-2 (#110)
This commit is contained in:
19
test/run
19
test/run
@@ -72,6 +72,25 @@ if [ "${UNIT:-0}" != "1" ]; then
|
|||||||
name=${t##*/}; name=${name%.c}
|
name=${t##*/}; name=${name%.c}
|
||||||
"$0" --one "$RESULTS/$name" "$t" || true
|
"$0" --one "$RESULTS/$name" "$t" || true
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# combined.ww freshness gate (#110): 990/995 above unconditionally
|
||||||
|
# regenerate every tracked combined.ww amalgamation, so a diff vs HEAD
|
||||||
|
# here means an embedded source changed without its derived artifact
|
||||||
|
# being regenerated + committed (the #28 staleness hole the per-file
|
||||||
|
# byte-id gates were blind to). git ls-files keeps new combined.ww
|
||||||
|
# auto-covered (rule-13 SSoT). Lives inside the UNIT guard because
|
||||||
|
# test-unit skips 990/995 and thus the regen.
|
||||||
|
name=combined_ww_fresh
|
||||||
|
if git diff --exit-code -- $(git ls-files '*.combined.ww') > /dev/null 2>&1; then
|
||||||
|
printf 'ok %s\n' "$name" > "$RESULTS/$name.status"
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf 'FAIL %s (stale; regen + commit the derived amalgamation)\n' "$name"
|
||||||
|
echo '--- stale combined.ww ---'
|
||||||
|
git diff --name-only -- $(git ls-files '*.combined.ww')
|
||||||
|
} > "$RESULTS/$name.status"
|
||||||
|
: > "$RESULTS/$name.fail"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fail=0
|
fail=0
|
||||||
|
|||||||
Reference in New Issue
Block a user