hs-test: display vpp version in the summary 62/42062/1
authorMatus Fabian <[email protected]>
Sat, 21 Dec 2024 19:54:01 +0000 (20:54 +0100)
committerMatus Fabian <[email protected]>
Sat, 21 Dec 2024 19:54:01 +0000 (20:54 +0100)
Display output of 'show version verbose' from vpp in the summary report
at the end of a test run.

Type: test

Change-Id: Iae3d886dd4106678b60389ec42ba42a159940403
Signed-off-by: Matus Fabian <[email protected]>
extras/hs-test/framework_test.go
extras/hs-test/infra/vppinstance.go

index a578fb1..f3bf1be 100644 (file)
@@ -12,6 +12,19 @@ import (
        . "github.com/onsi/gomega"
 )
 
+var _ = ReportAfterSuite("VPP version under test", func(report Report) {
+       for i := range report.SpecReports {
+               specReport := report.SpecReports[i]
+               for j := range specReport.ReportEntries {
+                       reportEntry := specReport.ReportEntries[j]
+                       if reportEntry.Name == "VPP version" {
+                               fmt.Println(reportEntry.Value)
+                               return
+                       }
+               }
+       }
+})
+
 func TestHst(t *testing.T) {
        if *IsVppDebug {
                // 30 minute timeout so that the framework won't timeout while debugging
index 8d4d694..d9aa418 100644 (file)
@@ -237,6 +237,8 @@ func (vpp *VppInstance) Start() error {
        }
        vpp.ApiStream = ch
 
+       AddReportEntry("VPP version", vpp.Vppctl("show version verbose"), ReportEntryVisibilityNever)
+
        return nil
 }