From 433cbd52543dccdad9806b8d44fd5d054ed559f1 Mon Sep 17 00:00:00 2001 From: baude Date: Sat, 28 Jul 2018 11:11:31 -0500 Subject: Show duration for each ginkgo test and test speed improvements Because our tests are getting so long, we want to be able to audit which tests are taking the longest to complete. This may indicate a bad test, bad CI, bad code, etc and therefore should be auditable. Also, make speed improvements to tests by making sure we only unpack caches images that actually get used. Signed-off-by: baude Closes: #1178 Approved by: mheon --- test/e2e/top_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/e2e/top_test.go') diff --git a/test/e2e/top_test.go b/test/e2e/top_test.go index d26a19ba4..9537c2f50 100644 --- a/test/e2e/top_test.go +++ b/test/e2e/top_test.go @@ -1,6 +1,7 @@ package integration import ( + "fmt" "os" . "github.com/onsi/ginkgo" @@ -25,7 +26,9 @@ var _ = Describe("Podman top", func() { AfterEach(func() { podmanTest.Cleanup() - + f := CurrentGinkgoTestDescription() + timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) + GinkgoWriter.Write([]byte(timedResult)) }) It("podman top without container name or id", func() { -- cgit v1.2.3-54-g00ecf