Github Actions: Remove --disable-tests
With --disable-tests, for example for Go the `make check` under `lib/go`
would only run unit tests under `lib/go/thrift` but not the unit tests
under `lib/go/test`.
Also some changes in lib/go/test/fuzz/Makefile.am so it works in both go
1.20 and 1.21 (The current state breaks in 1.21 but because of
`--disable-tests` we never noticed that).
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8862b79..d963b0a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,7 +10,6 @@
BUILD_DEPS: automake bison flex git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config
CONFIG_ARGS_FOR_LIBS: >
--disable-debug
- --disable-tests
--disable-dependency-tracking
--without-cpp
--without-c_glib
diff --git a/lib/go/test/fuzz/Makefile.am b/lib/go/test/fuzz/Makefile.am
index 56f138a..9677f4f 100644
--- a/lib/go/test/fuzz/Makefile.am
+++ b/lib/go/test/fuzz/Makefile.am
@@ -18,19 +18,16 @@
#
gopathfuzz: $(THRIFT) fuzz.go
- $(THRIFT) -r --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift$(COMPILER_EXTRAFLAG) ../../../../tutorial/tutorial.thrift
- cd gen-go/shared && go mod init shared
- cd gen-go/tutorial && go mod init tutorial
+ $(THRIFT) -r --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/lib/go/test/fuzz/gen-go/$(COMPILER_EXTRAFLAG) ../../../../tutorial/tutorial.thrift
touch gopathfuzz
check: gopathfuzz
go test -tags gofuzz
clean-local:
- $(RM) -r gopathfuzz gen-go
+ $(RM) -rf gopathfuzz gen-go
EXTRA_DIST = \
fuzz.go \
fuzz_test.go \
- go.mod \
- go.sum
+ go.mod
diff --git a/lib/go/test/fuzz/fuzz.go b/lib/go/test/fuzz/fuzz.go
index cd99d58d..0698379 100644
--- a/lib/go/test/fuzz/fuzz.go
+++ b/lib/go/test/fuzz/fuzz.go
@@ -1,3 +1,4 @@
+//go:build gofuzz
// +build gofuzz
/*
@@ -26,9 +27,8 @@
"fmt"
"strconv"
- "shared"
- "tutorial"
-
+ "github.com/apache/thrift/lib/go/test/fuzz/gen-go/shared"
+ "github.com/apache/thrift/lib/go/test/fuzz/gen-go/tutorial"
"github.com/apache/thrift/lib/go/thrift"
)
diff --git a/lib/go/test/fuzz/go.mod b/lib/go/test/fuzz/go.mod
index 41cccc3..4ff6c5d 100644
--- a/lib/go/test/fuzz/go.mod
+++ b/lib/go/test/fuzz/go.mod
@@ -2,14 +2,6 @@
go 1.20
+require github.com/apache/thrift v0.0.0-00010101000000-000000000000
+
replace github.com/apache/thrift => ../../../../
-
-replace shared => ./gen-go/shared
-
-replace tutorial => ./gen-go/tutorial
-
-require (
- github.com/apache/thrift v0.0.0-00010101000000-000000000000
- shared v0.0.0-00010101000000-000000000000
- tutorial v0.0.0-00010101000000-000000000000
-)
diff --git a/lib/go/test/fuzz/go.sum b/lib/go/test/fuzz/go.sum
deleted file mode 100644
index 6468215..0000000
--- a/lib/go/test/fuzz/go.sum
+++ /dev/null
@@ -1,13 +0,0 @@
-github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=