summaryrefslogtreecommitdiff
path: root/ui/terminal/status_test.go
AgeCommit message (Collapse)Author
2024-07-16Highlight build failures in soong output cherokeeMeta
Summary: When build failures occur, it can be hard to find where the error message begins. We now highlight "FAILURE" in red to make it easier to see what exactly has failed in the output. Test: execute automated tests with m nothing --no-skip-soong-tests, can also manually test with a build failure and observe red text in the output Change-Id: Iad3b94cc1c385f0afdebdf12c44843db04ff2bdc Signed-off-by: Cherokee Toole <cherokee@meta.com>
2023-06-24After a build action fails, stop printing more output. Joe Onorato
Often the slow commands (errorprone happens to be particularly bad) print a lot, so this should make it easier to find the error without lots of scrolling. This doesn't attempt to parse the output and re-display errors, so if a command prints a thousand warnings with one error in the middle, it'll still be hard to find the error. Bug: 277114612 Test: cd build/soong/ui/terminal ; go test Change-Id: I6c8285fc2c6e4fc345de57b2c15bc5e7d46b1d1f
2022-06-09Strip ANSI codes for messages on simple terminals Dan Willemsen
We had been doing this for actions, but not messages. Test: m nothing && TERM=dumb m nothing Bug: 235414673 Change-Id: I5c6c009490abe1d02a4ae2272bd1831bd7ca9f7f
2021-09-21Add environment variable to force keeping ANSI codes Colin Cross
If SOONG_UI_ANSI_OUTPUT is set to a true value force the simple status output to keep ANSI codes. This will allow buildbots to collect logs with ANSI codes in them. Smart status output is not affected as it always keeps ANSI codes. Bug: 147310922 Test: manual Change-Id: I0b78ceebb65125b8e8dafb4787816fb679d3eb3e
2020-10-09Revert "Make lots of tests run in parallel" Colin Cross
This reverts commit 323dc60712491c71ccdc5363c42df61f0a192487. Reason for revert: Possible cause of test instability Bug: 170513220 Test: soong tests Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
2020-10-06Make lots of tests run in parallel Colin Cross
Putting t.Parallel() in each test makes them run in parallel. Additional t.Parallel() could be added to each subtest, although that requires making a local copy of the loop variable for table driven tests. Test: m checkbuild Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
2020-07-28Inclusive fix: renaming dumb terminal to simple terminal. Patrice Arruda
Bug: b/161896447 Test: "lunch 1" and "m nothing" Change-Id: Ifb228c0f0f634477932c9240e57170f7390201f7
2019-09-23Force dumpvars into dumb terminal mode and move log files Colin Cross
Force soong_ui in dumpvars mode to use a dumb terminal so that it doesn't print an empty status table. Also move the logs to files that are prefixed with "dumpvars-" so that they don't rotate the real build logs. Fixes: 139307849 Test: lunch Change-Id: If92421af07731fedc9ca42670f309e95922a2224
2019-06-13Support an action table that shows longest running actions Colin Cross
If SOONG_UI_TABLE_HEIGHT is set, enable a new smart terminal display that prints the normal scrolling build history in the top region of the screen and an action table of the longest currently running actions in the bottom region of the screen. This provides better visibility into which are the longest running actions and when the build parallelism is very low. Test: manual Change-Id: I677d7b6b008699febd259110d7f9e0f98d80c535
2019-06-13Use SIGWINCH to update terminal size Colin Cross
Instead of reading the terminal size on every status update, register for SIGWINCH to read and store the size when it changes. This reapplies I555ad21a31a2c924ab0ca681e0c8f00df42a370a with a fix for a race condition in TestSmartStatusOutputWidthChange. Test: status_test.go Change-Id: If342cb4cc8e4ed57af9e3bb417758348c9c41247
2019-06-13Revert "Use SIGWINCH to update terminal size" Colin Cross
This reverts commit 49036be4076851c4ef2003339ffd1bf022dfc844. Reason for revert: TestSmartStatusOutputWidthChange is flaky Change-Id: Ie5231dbbab2887ce4c4697f3fe6e52cfd6f4dd17
2019-06-12Use SIGWINCH to update terminal size Colin Cross
Instead of reading the terminal size on every status update, register for SIGWINCH to read and store the size when it changes. Test: status_test.go Change-Id: I555ad21a31a2c924ab0ca681e0c8f00df42a370a
2019-06-12Make status line bold Colin Cross
Bolding the status line provides differentiation between output of each command. Test: status_test.go Change-Id: I9d46761e69c5af0a0aa86c7921e121cfd2a3fc82
2019-06-12Remove terminal.Writer Colin Cross
terminal.Writer is now just a wrapper around stdio.Stdout() without any useful functionality. Replace it with stdio.Stdout() as an io.Writer. Test: ui/terminal/status_test.go Change-Id: I5bc5476afdca950b505642f0135a3af9d37fbe24
2019-06-12Add tests for status output Colin Cross
Test: status_test.go Change-Id: If3febd8fdacb0e70716d0520a41c982bd6474720