[Fix] (IntegrationTest): reject skipped split control selections

This commit is contained in:
2026-09-16 09:31:39 -04:00
parent 68d8ef9f34
commit cc20de37da
5 changed files with 110 additions and 13 deletions
+11 -2
View File
@@ -7,7 +7,7 @@ trap 'rm -rf "${WORK}"' EXIT
cp "${HERE}/testdata/stub_ctest.sh" "${WORK}/ctest"
chmod +x "${WORK}/ctest"
passes=0
for mode in missing-fatal stdout-fatal stale-fatal evidence e3-unrelated; do
for mode in missing-fatal stdout-fatal stale-fatal evidence e3-unrelated skipped-selection notrun-selection missing-selection partial-fatal wrong-fatal; do
mkdir -p "${WORK}/${mode}"
rc=0
STUB_MODE="${mode}" CTEST="${WORK}/ctest" CONTROL_TMPDIR="${WORK}/${mode}" \
@@ -22,7 +22,16 @@ for mode in missing-fatal stdout-fatal stale-fatal evidence e3-unrelated; do
else
message='E1 FAILED: selected private logs lack expected Fatal'
[ "${mode}" != e3-unrelated ] || message='FAILED: red lacks its persistent-map push diagnostic'
[ "${rc}" != 0 ] && grep -q "${message}" "${WORK}/${mode}.out" || {
case "${mode}" in
skipped-selection) message='SplitLogPaths FAILED: E1 control: the knob killed the pre-flight, not the entry - 1 selected entries skipped' ;;
notrun-selection|missing-selection) message='SplitLogPaths FAILED: E1 control: 1 selected entries did not run' ;;
esac
if [[ "${mode}" = *-selection ]]; then
match=(-qFx)
else
match=(-qF)
fi
[ "${rc}" != 0 ] && grep "${match[@]}" "${message}" "${WORK}/${mode}.out" || {
cat "${WORK}/${mode}.out"; echo "NOT OK ${mode}: control must report FAILED for its own reason"; exit 1;
}
fi