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/version_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/e2e/version_test.go') diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go index c6b71bec1..4670c6e1e 100644 --- a/test/e2e/version_test.go +++ b/test/e2e/version_test.go @@ -1,6 +1,7 @@ package integration import ( + "fmt" "os" . "github.com/onsi/ginkgo" @@ -20,13 +21,13 @@ var _ = Describe("Podman version", func() { os.Exit(1) } podmanTest = PodmanCreate(tempdir) - podmanTest.RestoreAllArtifacts() - podmanTest.RestoreArtifact(fedoraMinimal) }) 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 version", func() { -- cgit v1.2.3-54-g00ecf