ugorji/go

bench_test is failing on Fedora

pemensik opened this issue · 2 comments

I understand Go very little, but it seems to me bench_test.go should import helper_test.go. I used go2rpm script to prepare Fedora Go package, but it fails on all releases on check stage.

+ cd go-1.2.6
+ LDFLAGS=' -X github.com/ugorji/go/version=1.2.6'
+ GO_TEST_FLAGS='-buildmode pie -compiler gc'
+ GO_TEST_EXT_LD_FLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  '
+ go-rpm-integration check -i github.com/ugorji/go -b /builddir/build/BUILD/go-1.2.6/_build/bin -s /builddir/build/BUILD/go-1.2.6/_build -V 1.2.6-1.fc35 -p /builddir/build/BUILDROOT/golang-github-ugorji-1.2.6-1.fc35.x86_64 -g /usr/share/gocode -r '.*example.*'
Testing    in: /builddir/build/BUILD/go-1.2.6/_build/src
         PATH: /builddir/build/BUILD/go-1.2.6/_build/bin:/builddir/.local/bin:/builddir/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/go-1.2.6/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags " -X github.com/ugorji/go/version=1.2.6 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  '"
      testing: github.com/ugorji/go
github.com/ugorji/go/codec
PASS
ok  	github.com/ugorji/go/codec	0.451s
github.com/ugorji/go/codec/bench
# github.com/ugorji/go/codec/bench [github.com/ugorji/go/codec/bench.test]
./bench_test.go:76:15: undefined: approxDataSize
./bench_test.go:198:9: undefined: deepEqual
FAIL	github.com/ugorji/go/codec/bench [build failed]

More on rawhide log or my copr build

RPM spec file used is at my fork

approxDataSize and deepEqual are included, but you will need to make necessary adjustments in your RPM spec file for it all to work.