Skip to content

Commit

Permalink
dev-go/go-protobuf: fix unit tests (bug 623474)
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/623474
Package-Manager: Portage-2.3.50, Repoman-2.3.11
Signed-off-by: Zac Medico <[email protected]>
  • Loading branch information
zmedico committed Oct 7, 2018
1 parent 75e230b commit 7eb8b44
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dev-go/go-protobuf/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DIST github.com-golang-net-aaf60122140d3fcf75376d319f0554393160eb50.tar.gz 965206 BLAKE2B 018ab877bfa7208bb0ca9b4ede85077ed37c8ee3c7065569646e6c9704715d6810b0286276ea0fa9a271f12ffbe964b41f55ec762711c8a43ccea564607f3265 SHA512 d56f5608e64e8d883a782f0c460f08da20e7d01a97330fad35c8757420ac82fb84b657c3f64e3c4d90a08cc4d8905ab37225d6fab8472e8f1fd3d7be212df8b9
DIST github.com-golang-sync-1d60e4601c6fd243af51cc01ddf169918a5407ca.tar.gz 16326 BLAKE2B d214c190a03006b726b4e5daa8320aa2f664572db46ac6a57545ccd3e98529c63fd5d9296e2afe0af0b781fcced4af52127d8079e72d116e0310688465e1882e SHA512 dc67de045513305edb3239b412b9154b44b6f408eace3cbbcf400c08d68322cec7090b9e6b22d63bcfaaec459e221d0e3f2c057aa19ae9b35a4a134dd72475c5
DIST github.com-google-go-genproto-af9cb2a35e7f169ec875002c1829c9b315cddc04.tar.gz 2323831 BLAKE2B a614c74b60f8e347b47c8686807228ea76b021a918fc732b69293c8b59c1bc5396e320cbce6db87ab43b9a4fd649d19779874934bdd667f7cabf03165439c54a SHA512 a6524f31e8c4775195c245ffbe54c7f770591d46663ea86b8120ffd8efb3cf9269569fbf457b0d0272dc47177ccf3b413e858c2b437ee9892b5ac6698d07ed4d
DIST go-protobuf-0_pre20150809.tar.gz 151982 BLAKE2B dc7722108d09f94395c204a3adb8cce46978daa73319012964863536e8e4d3eaaff1878097dab0a96cc94ebc66c1b2f8cc0f49e931c104392bd7d083f2f1af8f SHA512 04802b8d74ccaa17f9fc030badd0e74b6e47233ca5f1faab7c49f25bef2f06efd97aa4bf3f4783a7815958354744ddb9fee96d183aebbb03864069b0cc569564
DIST go-protobuf-0_pre20160216.tar.gz 198638 BLAKE2B 21b1780d9e792263eaa1babbefff855fc506177b56d907650968ae96e13c6624982511cbeb3b2bf002ad724ab454e4450f6d7649b55297fb2756b528f9789283 SHA512 d7f446ce7b3f78d646abccdbcb92c423fcca99a51275b55f2a357b5e44c2a6b6d7ea59a39b654daa36e59aa39d3b094ed3fb3d6f53c789a4396fceaecbd5ace5
Expand Down
21 changes: 20 additions & 1 deletion dev-go/go-protobuf/go-protobuf-1.2.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ EGO_SRC="github.com/golang/protobuf"
EGO_PN=${EGO_SRC}/...
EGO_VENDOR=(
"google.golang.org/genproto af9cb2a35e7f169ec875002c1829c9b315cddc04 github.com/google/go-genproto"
"golang.org/x/net aaf60122140d3fcf75376d319f0554393160eb50 github.com/golang/net"
"golang.org/x/sync 1d60e4601c6fd243af51cc01ddf169918a5407ca github.com/golang/sync"
)

inherit golang-build golang-vcs-snapshot
Expand All @@ -22,9 +24,26 @@ IUSE=""
DEPEND=""
RDEPEND=""

src_prepare() {
default
# golden_test.go:113: golden file differs: deprecated/deprecated.pb.go
sed -e 's:^\(func \)\(TestGolden\):\1_\2:' \
-i src/${EGO_SRC}/protoc-gen-go/golden_test.go || die
}

src_compile() {
env GOPATH="${S}" \
go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die
}

src_test() {
GOPATH="${S}" \
go test -v -work -x "${EGO_PN}" || die
}

src_install() {
rm -rf src/${EGO_SRC}/.git* || die
golang-build_src_install
golang_install_pkgs
rm -rf "${D%/}$(get_golibdir_gopath)/src/${EGO_SRC}/vendor" || die

dobin bin/*
Expand Down

0 comments on commit 7eb8b44

Please sign in to comment.