This is an automated email from the ASF dual-hosted git repository.

aleksraiden pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks-controller.git


The following commit(s) were added to refs/heads/unstable by this push:
     new 79e2659  Use gotestsum to beautify the test output (#326)
79e2659 is described below

commit 79e2659a297a8bec56acc22137f385d60102c544
Author: hulk <[email protected]>
AuthorDate: Sun Jul 20 17:33:39 2025 +0800

    Use gotestsum to beautify the test output (#326)
    
    * Use gotestsum to beautify the test output
    
    Currently, the test output is too long and hard to read. To mitigate
    this issue, we can use gotestsum to collapse the test output and make it
    clear and easy to find the failure tests.
    
    * Use atomic mode
---
 scripts/run-test.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/scripts/run-test.sh b/scripts/run-test.sh
index 89da99e..6a7a256 100755
--- a/scripts/run-test.sh
+++ b/scripts/run-test.sh
@@ -18,4 +18,14 @@
 
 set -e -x
 
-go test -v ./... -covermode=atomic -coverprofile=coverage.out -race -p 1
\ No newline at end of file
+if ! command -v gotestsum > /dev/null 2>&1
+then
+    go install gotest.tools/gotestsum@latest
+fi
+
+FORMAT="testname"
+if [ "$GITHUB_ACTIONS" == "true" ]; then
+  FORMAT="github-actions"
+fi
+
+gotestsum --format "$FORMAT" -- -covermode=atomic -coverprofile=coverage.out 
-race -p 1 ./...

Reply via email to