Problem
load_test_files sources each file as:
source"$test_file"2>"$_BASHUNIT_RUN_OUTPUT_DIR/source_err"
If the run's scratch directory is missing, the redirect fails. Bash reports
that as the command failing, so the runner sees exit 1 with nothing written to
the capture file and reports:
✗ Error: Source
Failed to source 'b_test.sh' (exit 1, 52 bytes, no stderr)
against a file that is complete and valid. The message names the test file,
which is the one thing that is not at fault — it sent three separate
investigations at the fixture in #1137.
Fix
Restore the directory before sourcing, and fall back to /dev/null if even
that is refused. Losing one file's stderr capture is worth far less than
failing the file for a reason that is not its own.
Scope
This is a robustness fix, not a fix for #1137. I could not reproduce that
flake in twelve isolated Bash 3.0 runs (six with this change, six without), so
whether this mechanism is what hits CI there is unproven. Filed separately for
that reason.
Problem
load_test_filessources each file as:If the run's scratch directory is missing, the redirect fails. Bash reports
that as the command failing, so the runner sees exit 1 with nothing written to
the capture file and reports:
against a file that is complete and valid. The message names the test file,
which is the one thing that is not at fault — it sent three separate
investigations at the fixture in #1137.
Fix
Restore the directory before sourcing, and fall back to
/dev/nullif eventhat is refused. Losing one file's stderr capture is worth far less than
failing the file for a reason that is not its own.
Scope
This is a robustness fix, not a fix for #1137. I could not reproduce that
flake in twelve isolated Bash 3.0 runs (six with this change, six without), so
whether this mechanism is what hits CI there is unproven. Filed separately for
that reason.