From 034e94e7f059308d58b4430888fceb624356f752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Thu, 22 Aug 2024 19:06:19 +0200 Subject: [PATCH] Remove macro and tidy up After enabling support for ppc64le, the package began failing due to the gopkginstall macro not properly handling the new architecture tag. Added additional lines to ensure the tests execute, as the macro also creates several temporary folders. Resolves: RHEL-39099 --- delve.spec | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/delve.spec b/delve.spec index 5c726de..0f84977 100644 --- a/delve.spec +++ b/delve.spec @@ -42,8 +42,7 @@ Provides: bundled(golang(github.com/cosiner/argv)) = 0.1.0 Provides: bundled(golang(github.com/cpuguy83/go.md2man/v2)) = 2.0.2 Provides: bundled(golang(github.com/creack/pty)) = 1.1.20 Provides: bundled(golang(github.com/derekparker/trie)) = 0.0.0.20230829180723.39f4de51ef7d -Provides: bundled(golang(github.com/go.delve/gore)) = 0.11.6 -Provides: bundled(golang(github.com/go.delve/liner)) = 1.2.3.0.20220127212407.d32d89dd2a5d +Provides: bundled(golang(github.com/go.delve/liner)) = 1.2.3.0.20231231155935.4726ab1d7f62 Provides: bundled(golang(github.com/google/go.dap)) = 0.11.0 Provides: bundled(golang(github.com/hashicorp/golang.lru)) = 1.0.2 Provides: bundled(golang(github.com/inconshreveable/mousetrap)) = 1.1.0 @@ -55,6 +54,7 @@ Provides: bundled(golang(github.com/russross/blackfriday/v2)) = 2.1.0 Provides: bundled(golang(github.com/sirupsen/logrus)) = 1.9.3 Provides: bundled(golang(github.com/spf13/cobra)) = 1.7.0 Provides: bundled(golang(github.com/spf13/pflag)) = 1.0.5 +Provides: bundled(golang(github.com/stretchr/testify)) = 1.8.4 Provides: bundled(golang(golang.org/x/arch)) = 0.6.0 Provides: bundled(golang(golang.org/x/exp)) = 0.0.0.20230224173230.c95f2b4c22f2 Provides: bundled(golang(golang.org/x/mod)) = 0.14.0 @@ -78,12 +78,9 @@ tar c -C vendor/ . | tar x -C %{gobuilddir}/src %autopatch -v -p1 %build -echo "=== Start build ===" -%gobuild -o %{gobuilddir}/bin/dlv %{goipath}/cmd/dlv -echo "=== End build ===" +%gobuild %{?exp} -o %{gobuilddir}/bin/dlv %{goipath}/cmd/dlv %install -%gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ @@ -92,14 +89,18 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ export GO111MODULE=off export GOPATH=%{buildroot}/%{gopath}:%{gobuilddir}:%{gopath} delvepath=%{buildroot}/%{gopath}/src/%{goipath} +mkdir -p $delvepath +mkdir -p $delvepath/pkg/dwarf/line +mkdir -p $delvepath/pkg/proc/internal cp -r _fixtures $delvepath +cp -r pkg/dwarf $delvepath/pkg/ cp -r pkg/dwarf/line/_testdata $delvepath/pkg/dwarf/line cp -r pkg/proc/internal/ebpf $delvepath/pkg/proc/internal/ pushd $delvepath -echo "=== Start tests ===" -%gotest %{?exp} $(go list ./... | awk '!/(cmd|scripts)/ {print $1}') -echo "=== End tests ===" +for d in $(go list %{?exp} ./... | grep -v cmd | grep -v scripts); do + go test %{?exp} ${d} +done rm -rf $delvepath popd %endif