From 58cb6ba81833a79a877448aa60d7d68604ad6c4e Mon Sep 17 00:00:00 2001 From: Adrian Villin Date: Tue, 20 Aug 2024 14:36:12 +0200 Subject: hs-test: fix vppinstance logs and disable trace - fixed a bug where vppinstance logs would concatenate -> each test now has its own bind mount - removed "--trace" flag to avoid skipped tests printing a full stack trace. They are now only printed in the summary. Type: test Change-Id: Ib7f4254717cc798e456b9fca6f81685c8153ee2d Signed-off-by: Adrian Villin --- extras/hs-test/hs_test.sh | 2 +- extras/hs-test/infra/container.go | 3 +-- extras/hs-test/script/compress.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'extras/hs-test') diff --git a/extras/hs-test/hs_test.sh b/extras/hs-test/hs_test.sh index 04b546c8e59..c53c5a9de88 100644 --- a/extras/hs-test/hs_test.sh +++ b/extras/hs-test/hs_test.sh @@ -122,7 +122,7 @@ fi mkdir -p summary # shellcheck disable=SC2086 -sudo -E go run github.com/onsi/ginkgo/v2/ginkgo --trace --json-report=summary/report.json $ginkgo_args -- $args +sudo -E go run github.com/onsi/ginkgo/v2/ginkgo --json-report=summary/report.json $ginkgo_args -- $args jq -r '.[0] | .SpecReports[] | select((.State == "failed") or (.State == "timedout") or (.State == "panicked")) | select(.Failure != null) | "TestName: \(.LeafNodeText)\nSuite:\n\(.Failure.FailureNodeLocation.FileName)\nMessage:\n\(.Failure.Message)\n Full Stack Trace:\n\(.Failure.Location.FullStackTrace)\n"' summary/report.json > summary/failed-summary.log \ && echo "Summary generated -> summary/failed-summary.log" diff --git a/extras/hs-test/infra/container.go b/extras/hs-test/infra/container.go index 195f889f237..a9069d756c4 100644 --- a/extras/hs-test/infra/container.go +++ b/extras/hs-test/infra/container.go @@ -313,7 +313,7 @@ func (c *Container) Run() { func (c *Container) addVolume(hostDir string, containerDir string, isDefaultWorkDir bool) { var volume Volume - volume.HostDir = hostDir + volume.HostDir = strings.Replace(hostDir, "volumes", c.Suite.GetTestId() + "/" + "volumes", 1) volume.ContainerDir = containerDir volume.IsDefaultWorkDir = isDefaultWorkDir c.Volumes[hostDir] = volume @@ -340,7 +340,6 @@ func (c *Container) getVolumesAsSlice() []string { volumeSlice = append(volumeSlice, fmt.Sprintf("%s:%s", volume.HostDir, volume.ContainerDir)) } } - return volumeSlice } diff --git a/extras/hs-test/script/compress.sh b/extras/hs-test/script/compress.sh index 0e153a3b47b..654774842a3 100755 --- a/extras/hs-test/script/compress.sh +++ b/extras/hs-test/script/compress.sh @@ -11,7 +11,7 @@ then logDir=/tmp/hs-test/$dirName if [ -d "$logDir" ]; then mkdir -p ${WORKSPACE}/archives/summary - cp -r $logDir ${WORKSPACE}/archives/summary/ + rsync -a --exclude 'volumes' $logDir ${WORKSPACE}/archives/summary/ fi done echo "Done." -- cgit