From 75b66fd129d6c5f07bef74e2fde321764cc33ed3 Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Sat, 21 Dec 2024 20:54:01 +0100 Subject: hs-test: display vpp version in the summary 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 --- extras/hs-test/framework_test.go | 13 +++++++++++++ extras/hs-test/infra/vppinstance.go | 2 ++ 2 files changed, 15 insertions(+) (limited to 'extras') diff --git a/extras/hs-test/framework_test.go b/extras/hs-test/framework_test.go index a578fb15573..f3bf1be56a8 100644 --- a/extras/hs-test/framework_test.go +++ b/extras/hs-test/framework_test.go @@ -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 diff --git a/extras/hs-test/infra/vppinstance.go b/extras/hs-test/infra/vppinstance.go index 8d4d694cbb9..d9aa418c5ec 100644 --- a/extras/hs-test/infra/vppinstance.go +++ b/extras/hs-test/infra/vppinstance.go @@ -237,6 +237,8 @@ func (vpp *VppInstance) Start() error { } vpp.ApiStream = ch + AddReportEntry("VPP version", vpp.Vppctl("show version verbose"), ReportEntryVisibilityNever) + return nil } -- cgit