Support an action table that shows longest running actions
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
diff --git a/ui/terminal/status_test.go b/ui/terminal/status_test.go
index 106d651..81aa238 100644
--- a/ui/terminal/status_test.go
+++ b/ui/terminal/status_test.go
@@ -17,6 +17,7 @@
import (
"bytes"
"fmt"
+ "os"
"syscall"
"testing"
@@ -86,8 +87,11 @@
},
}
+ os.Setenv(tableHeightEnVar, "")
+
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
+
t.Run("smart", func(t *testing.T) {
smart := &fakeSmartTerminal{termWidth: 40}
stat := NewStatusOutput(smart, "", false)
@@ -251,6 +255,8 @@
}
func TestSmartStatusOutputWidthChange(t *testing.T) {
+ os.Setenv(tableHeightEnVar, "")
+
smart := &fakeSmartTerminal{termWidth: 40}
stat := NewStatusOutput(smart, "", false)
smartStat := stat.(*smartStatusOutput)