mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-24 10:13:41 -05:00
Log per-test durations during integration tests
To spot slow or anomalous tests across CI runs, record each test's run duration when LAZYGIT_TEST_TIMING is set (to a file path); run_integration_tests.sh prints them at the end, sorted by slowest first. CI sets it for all integration jobs. The harness appends to a file rather than writing to stdout/stderr because `go test` captures those and only surfaces them with -v, which would drown the signal in every test's verbose logs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
03a914c04c
commit
b6b5436d57
@@ -37,4 +37,12 @@ if test -f ~/.gitconfig.lazygit.bak; then
|
||||
mv ~/.gitconfig.lazygit.bak ~/.gitconfig
|
||||
fi
|
||||
|
||||
# If per-test timings were collected (LAZYGIT_TEST_TIMING points at the file the
|
||||
# harness appends to), print them sorted by slowest first so they show up in the
|
||||
# CI log.
|
||||
if [ -n "$LAZYGIT_TEST_TIMING" ] && [ -f "$LAZYGIT_TEST_TIMING" ]; then
|
||||
echo "Test timings (seconds):"
|
||||
sort -rn "$LAZYGIT_TEST_TIMING"
|
||||
fi
|
||||
|
||||
exit $EXITCODE
|
||||
|
||||
Reference in New Issue
Block a user