From da69e1fa4c01df0da0358a241aa645f6a4a1a954 Mon Sep 17 00:00:00 2001 From: Yuxuan 'fishy' Wang Date: Wed, 22 Nov 2023 09:09:57 -0800 Subject: [PATCH] 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`. --- .github/workflows/build.yml | 1 - lib/go/test/fuzz/Makefile.am | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7dfc14feb3b..c828149d853 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,6 @@ env: 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 56f138a7e2f..cf451061580 100644 --- a/lib/go/test/fuzz/Makefile.am +++ b/lib/go/test/fuzz/Makefile.am @@ -17,10 +17,15 @@ # under the License. # + +# Starting from go 1.21 `go mod init` will generate the go line as: +# go 1.21.4 +# which will require the go.mod at this directory to have a matching version, +# so use sed to get rid of the patch version. 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 + cd gen-go/shared && go mod init shared && sed 's/^go 1\.\([0-9]*\).*$$/go 1.\1/g' go.mod > go.mod.new && mv go.mod.new go.mod + cd gen-go/tutorial && go mod init tutorial && sed 's/^go 1\.\([0-9]*\).*$$/go 1.\1/g' go.mod > go.mod.new && mv go.mod.new go.mod touch gopathfuzz check: gopathfuzz