You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: correct several bugs and robustness issues in coverage.sh.in
- SIGINT trap: replace `trap postrun_cleanup SIGINT` with
`trap 'exit 130' SIGINT` so that Ctrl+C actually stops the script
(the old handler ran cleanup but then resumed execution); the EXIT
trap already handles cleanup on exit.
- Silent unit test failures: run_unit_test now captures the exit code
and calls log_file_contents when non-zero, making test failures
visible in the terminal instead of silently discarded.
- Missing D-Bus name: the final sd_start "stafd" call was missing the
second argument, causing systemd-run to be invoked with an empty
BusName= under Type=dbus; fixed to pass @STAFD_DBUS_NAME@.
- Fragile argument passing in run_unit_test: replaced the args=$@/
"${args}" pattern with a proper array (local -a cov_cmd) and "$@",
which correctly handles arguments with spaces.
- Conditional __pycache__ chown: replaced unconditional chown of
__pycache__ directories (which fails silently on first run before
they exist) with `find -maxdepth 0 -type d | xargs -r chown`.
- Scratch file: replaced all hardcoded /tmp/output.txt references with
a SCRATCH_FILE variable for consistency and easier customisation.
Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments