This is an automated email from the ASF dual-hosted git repository.

yuxuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 022d0278e Github Actions: Remove --disable-tests
022d0278e is described below

commit 022d0278ebdbc049f77fbda6b97a3d835fdd3ad3
Author: Yuxuan 'fishy' Wang <[email protected]>
AuthorDate: Wed Nov 22 09:09:57 2023 -0800

    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).
---
 .github/workflows/build.yml  |  1 -
 lib/go/test/fuzz/Makefile.am |  9 +++------
 lib/go/test/fuzz/fuzz.go     |  6 +++---
 lib/go/test/fuzz/go.mod      | 12 ++----------
 lib/go/test/fuzz/go.sum      | 13 -------------
 5 files changed, 8 insertions(+), 33 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8862b79a0..d963b0a9e 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 56f138a7e..9677f4f00 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 cd99d58de..069837998 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 @@ import (
        "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 41cccc3e2..4ff6c5d93 100644
--- a/lib/go/test/fuzz/go.mod
+++ b/lib/go/test/fuzz/go.mod
@@ -2,14 +2,6 @@ module github.com/apache/thrift/lib/go/test/fuzz
 
 go 1.20
 
-replace github.com/apache/thrift => ../../../../
-
-replace shared => ./gen-go/shared
+require github.com/apache/thrift v0.0.0-00010101000000-000000000000
 
-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
-)
+replace github.com/apache/thrift => ../../../../
diff --git a/lib/go/test/fuzz/go.sum b/lib/go/test/fuzz/go.sum
deleted file mode 100644
index 64682154d..000000000
--- 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=

Reply via email to