Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 1 | # |
| 2 | # Licensed to the Apache Software Foundation (ASF) under one |
| 3 | # or more contributor license agreements. See the NOTICE file |
| 4 | # distributed with this work for additional information |
| 5 | # regarding copyright ownership. The ASF licenses this file |
| 6 | # to you under the Apache License, Version 2.0 (the |
| 7 | # "License"); you may not use this file except in compliance |
| 8 | # with the License. You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, |
| 13 | # software distributed under the License is distributed on an |
| 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | # KIND, either express or implied. See the License for the |
| 16 | # specific language governing permissions and limitations |
| 17 | # under the License. |
| 18 | # |
| 19 | |
Yuxuan 'fishy' Wang | 8045d82 | 2022-04-19 14:31:39 -0700 | [diff] [blame] | 20 | if GOVERSION_GE_118 |
| 21 | GOBUILDEXTRA = -buildvcs=false |
| 22 | else |
| 23 | GOBUILDEXTRA = |
| 24 | endif |
| 25 | |
Yuxuan 'fishy' Wang | dae1437 | 2022-05-09 11:05:11 -0700 | [diff] [blame] | 26 | THRIFT_GO_ARGS_BASE = thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/lib/go/test/gopath/src/ |
| 27 | |
| 28 | THRIFTARGS = -out gopath/src/ --gen go:$(THRIFT_GO_ARGS_BASE)$(COMPILER_EXTRAFLAG) |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 29 | THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift |
| 30 | |
Yuxuan 'fishy' Wang | dae1437 | 2022-05-09 11:05:11 -0700 | [diff] [blame] | 31 | THRIFTARGS_SKIP_REMOTE = -out gopath/src/ --gen go:skip_remote,$(THRIFT_GO_ARGS_BASE)$(COMPILER_EXTRAFLAG) |
| 32 | |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 33 | # Thrift for GO has problems with complex map keys: THRIFT-2063 |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 34 | gopath: $(THRIFT) $(THRIFTTEST) \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 35 | IncludesTest.thrift \ |
| 36 | NamespacedTest.thrift \ |
| 37 | MultiplexedProtocolTest.thrift \ |
| 38 | OnewayTest.thrift \ |
| 39 | OptionalFieldsTest.thrift \ |
Craig Wickesser | 5c1ecb6 | 2018-10-16 02:40:13 -0400 | [diff] [blame] | 40 | RequiredFieldTest.thrift \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 41 | ServicesTest.thrift \ |
| 42 | GoTagTest.thrift \ |
| 43 | TypedefFieldTest.thrift \ |
Jens Geyer | 527b6d9 | 2014-11-30 15:07:18 +0100 | [diff] [blame] | 44 | RefAnnotationFieldsTest.thrift \ |
Jens Geyer | 0f17e15 | 2015-09-15 21:22:42 +0200 | [diff] [blame] | 45 | UnionDefaultValueTest.thrift \ |
D. Can Celasun | 88591e3 | 2018-05-17 08:52:11 +0200 | [diff] [blame] | 46 | UnionBinaryTest.thrift \ |
Jens Geyer | 28c1c19 | 2015-03-07 14:18:01 +0100 | [diff] [blame] | 47 | ErrorTest.thrift \ |
Jens Geyer | 1d1bca2 | 2015-03-14 16:28:27 +0200 | [diff] [blame] | 48 | NamesTest.thrift \ |
Jens Geyer | 70219e1 | 2015-05-20 22:00:25 +0200 | [diff] [blame] | 49 | InitialismsTest.thrift \ |
| 50 | DontExportRWTest.thrift \ |
Jens Geyer | 86a51e7 | 2015-06-01 20:41:41 +0200 | [diff] [blame] | 51 | dontexportrwtest/compile_test.go \ |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 52 | IgnoreInitialismsTest.thrift \ |
| 53 | ConflictNamespaceTestA.thrift \ |
| 54 | ConflictNamespaceTestB.thrift \ |
| 55 | ConflictNamespaceTestC.thrift \ |
| 56 | ConflictNamespaceTestD.thrift \ |
Yuxuan 'fishy' Wang | 2c78047 | 2021-07-31 13:44:41 -0700 | [diff] [blame] | 57 | ConflictNamespaceTestE.thrift \ |
| 58 | ConflictNamespaceTestF.thrift \ |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 59 | ConflictNamespaceTestSuperThing.thrift \ |
Duru Can Celasun | f4475ff | 2019-11-20 15:31:35 +0000 | [diff] [blame] | 60 | ConflictNamespaceServiceTest.thrift \ |
Yuxuan 'fishy' Wang | b0b3531 | 2021-02-18 09:09:20 -0800 | [diff] [blame] | 61 | DuplicateImportsTest.thrift \ |
| 62 | EqualsTest.thrift \ |
Yuxuan 'fishy' Wang | f695535 | 2021-07-29 15:59:10 -0700 | [diff] [blame] | 63 | ConflictArgNamesTest.thrift \ |
| 64 | ConstOptionalFieldImport.thrift \ |
Yuxuan 'fishy' Wang | 9bee877 | 2022-02-22 18:48:17 -0800 | [diff] [blame] | 65 | ConstOptionalField.thrift \ |
Yuxuan 'fishy' Wang | 892b673 | 2022-08-01 12:47:12 -0700 | [diff] [blame^] | 66 | ProcessorMiddlewareTest.thrift \ |
| 67 | ClientMiddlewareExceptionTest.thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 68 | mkdir -p gopath/src |
| 69 | grep -v list.*map.*list.*map $(THRIFTTEST) | grep -v 'set<Insanity>' > ThriftTest.thrift |
Jens Geyer | 9f74f32 | 2015-04-17 23:33:48 +0200 | [diff] [blame] | 70 | $(THRIFT) $(THRIFTARGS) -r IncludesTest.thrift |
| 71 | $(THRIFT) $(THRIFTARGS) BinaryKeyTest.thrift |
| 72 | $(THRIFT) $(THRIFTARGS) MultiplexedProtocolTest.thrift |
| 73 | $(THRIFT) $(THRIFTARGS) OnewayTest.thrift |
| 74 | $(THRIFT) $(THRIFTARGS) OptionalFieldsTest.thrift |
Craig Wickesser | 5c1ecb6 | 2018-10-16 02:40:13 -0400 | [diff] [blame] | 75 | $(THRIFT) $(THRIFTARGS) RequiredFieldTest.thrift |
Jens Geyer | 9f74f32 | 2015-04-17 23:33:48 +0200 | [diff] [blame] | 76 | $(THRIFT) $(THRIFTARGS) ServicesTest.thrift |
| 77 | $(THRIFT) $(THRIFTARGS) GoTagTest.thrift |
| 78 | $(THRIFT) $(THRIFTARGS) TypedefFieldTest.thrift |
| 79 | $(THRIFT) $(THRIFTARGS) RefAnnotationFieldsTest.thrift |
Jens Geyer | 0f17e15 | 2015-09-15 21:22:42 +0200 | [diff] [blame] | 80 | $(THRIFT) $(THRIFTARGS) UnionDefaultValueTest.thrift |
D. Can Celasun | 88591e3 | 2018-05-17 08:52:11 +0200 | [diff] [blame] | 81 | $(THRIFT) $(THRIFTARGS) UnionBinaryTest.thrift |
Jens Geyer | 9f74f32 | 2015-04-17 23:33:48 +0200 | [diff] [blame] | 82 | $(THRIFT) $(THRIFTARGS) ErrorTest.thrift |
| 83 | $(THRIFT) $(THRIFTARGS) NamesTest.thrift |
| 84 | $(THRIFT) $(THRIFTARGS) InitialismsTest.thrift |
Jens Geyer | 70219e1 | 2015-05-20 22:00:25 +0200 | [diff] [blame] | 85 | $(THRIFT) $(THRIFTARGS),read_write_private DontExportRWTest.thrift |
Jens Geyer | 86a51e7 | 2015-06-01 20:41:41 +0200 | [diff] [blame] | 86 | $(THRIFT) $(THRIFTARGS),ignore_initialisms IgnoreInitialismsTest.thrift |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 87 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestA.thrift |
| 88 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestB.thrift |
| 89 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestC.thrift |
| 90 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestD.thrift |
Yuxuan 'fishy' Wang | 2c78047 | 2021-07-31 13:44:41 -0700 | [diff] [blame] | 91 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestE.thrift |
| 92 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestF.thrift |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 93 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestSuperThing.thrift |
| 94 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceServiceTest.thrift |
Duru Can Celasun | f4475ff | 2019-11-20 15:31:35 +0000 | [diff] [blame] | 95 | $(THRIFT) $(THRIFTARGS) -r DuplicateImportsTest.thrift |
wangtieju | 4aaef75 | 2021-02-04 11:26:44 +0800 | [diff] [blame] | 96 | $(THRIFT) $(THRIFTARGS) EqualsTest.thrift |
Yuxuan 'fishy' Wang | b0b3531 | 2021-02-18 09:09:20 -0800 | [diff] [blame] | 97 | $(THRIFT) $(THRIFTARGS) ConflictArgNamesTest.thrift |
Yuxuan 'fishy' Wang | f695535 | 2021-07-29 15:59:10 -0700 | [diff] [blame] | 98 | $(THRIFT) $(THRIFTARGS) -r ConstOptionalField.thrift |
Yuxuan 'fishy' Wang | dae1437 | 2022-05-09 11:05:11 -0700 | [diff] [blame] | 99 | $(THRIFT) $(THRIFTARGS_SKIP_REMOTE) ProcessorMiddlewareTest.thrift |
Yuxuan 'fishy' Wang | 892b673 | 2022-08-01 12:47:12 -0700 | [diff] [blame^] | 100 | $(THRIFT) $(THRIFTARGS) ClientMiddlewareExceptionTest.thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 101 | ln -nfs ../../tests gopath/src/tests |
Jens Geyer | 70219e1 | 2015-05-20 22:00:25 +0200 | [diff] [blame] | 102 | cp -r ./dontexportrwtest gopath/src |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 103 | touch gopath |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 104 | |
| 105 | check: gopath |
Yuxuan 'fishy' Wang | 8045d82 | 2022-04-19 14:31:39 -0700 | [diff] [blame] | 106 | $(GO) build $(GOBUILDEXTRA) -mod=mod \ |
Yuxuan 'fishy' Wang | b71f11e | 2021-03-22 15:01:00 -0700 | [diff] [blame] | 107 | ./gopath/src/includestest \ |
| 108 | ./gopath/src/binarykeytest \ |
| 109 | ./gopath/src/servicestest \ |
| 110 | ./gopath/src/typedeffieldtest \ |
| 111 | ./gopath/src/refannotationfieldstest \ |
| 112 | ./gopath/src/errortest \ |
| 113 | ./gopath/src/namestest \ |
| 114 | ./gopath/src/initialismstest \ |
| 115 | ./gopath/src/dontexportrwtest \ |
| 116 | ./gopath/src/ignoreinitialismstest \ |
| 117 | ./gopath/src/unionbinarytest \ |
Yuxuan 'fishy' Wang | 2c78047 | 2021-07-31 13:44:41 -0700 | [diff] [blame] | 118 | ./gopath/src/conflict/super \ |
Yuxuan 'fishy' Wang | b71f11e | 2021-03-22 15:01:00 -0700 | [diff] [blame] | 119 | ./gopath/src/conflict/context/conflict_service-remote \ |
| 120 | ./gopath/src/servicestest/container_test-remote \ |
| 121 | ./gopath/src/duplicateimportstest \ |
| 122 | ./gopath/src/equalstest \ |
Yuxuan 'fishy' Wang | 9bee877 | 2022-02-22 18:48:17 -0800 | [diff] [blame] | 123 | ./gopath/src/conflictargnamestest \ |
Yuxuan 'fishy' Wang | 892b673 | 2022-08-01 12:47:12 -0700 | [diff] [blame^] | 124 | ./gopath/src/processormiddlewaretest \ |
| 125 | ./gopath/src/clientmiddlewareexceptiontest |
Yuxuan 'fishy' Wang | b71f11e | 2021-03-22 15:01:00 -0700 | [diff] [blame] | 126 | $(GO) test -mod=mod github.com/apache/thrift/lib/go/thrift |
| 127 | $(GO) test -mod=mod ./gopath/src/tests ./gopath/src/dontexportrwtest |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 128 | |
| 129 | clean-local: |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 130 | $(RM) -r gopath ThriftTest.thrift gen-go |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 131 | |
| 132 | client: stubs |
Yuxuan 'fishy' Wang | b71f11e | 2021-03-22 15:01:00 -0700 | [diff] [blame] | 133 | $(GO) run -mod=mod TestClient.go |
jfarrell | 32d323e | 2013-08-15 20:39:58 -0400 | [diff] [blame] | 134 | |
| 135 | EXTRA_DIST = \ |
jfarrell | f13e431 | 2015-08-25 00:39:29 -0400 | [diff] [blame] | 136 | dontexportrwtest \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 137 | tests \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 138 | common \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 139 | BinaryKeyTest.thrift \ |
Yuxuan 'fishy' Wang | 892b673 | 2022-08-01 12:47:12 -0700 | [diff] [blame^] | 140 | ClientMiddlewareExceptionTest.thrift \ |
Yuxuan 'fishy' Wang | b0b3531 | 2021-02-18 09:09:20 -0800 | [diff] [blame] | 141 | ConflictArgNamesTest.thrift \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 142 | ConflictNamespaceServiceTest.thrift \ |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 143 | ConflictNamespaceTestA.thrift \ |
| 144 | ConflictNamespaceTestB.thrift \ |
| 145 | ConflictNamespaceTestC.thrift \ |
| 146 | ConflictNamespaceTestD.thrift \ |
Jens Geyer | a10d401 | 2022-02-02 22:57:46 +0100 | [diff] [blame] | 147 | ConflictNamespaceTestE.thrift \ |
| 148 | ConflictNamespaceTestF.thrift \ |
John Boiles | 59694a7 | 2019-11-09 11:22:26 -0800 | [diff] [blame] | 149 | ConflictNamespaceTestSuperThing.thrift \ |
Yuxuan 'fishy' Wang | f695535 | 2021-07-29 15:59:10 -0700 | [diff] [blame] | 150 | ConstOptionalField.thrift \ |
| 151 | ConstOptionalFieldImport.thrift \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 152 | DontExportRWTest.thrift \ |
| 153 | DuplicateImportsTest.thrift \ |
| 154 | ErrorTest.thrift \ |
| 155 | EqualsTest.thrift \ |
| 156 | GoTagTest.thrift \ |
| 157 | IgnoreInitialismsTest.thrift \ |
| 158 | IncludesTest.thrift \ |
| 159 | InitialismsTest.thrift \ |
| 160 | MultiplexedProtocolTest.thrift \ |
| 161 | NamespacedTest.thrift \ |
| 162 | NamesTest.thrift \ |
| 163 | OnewayTest.thrift \ |
| 164 | OptionalFieldsTest.thrift \ |
Yuxuan 'fishy' Wang | 9bee877 | 2022-02-22 18:48:17 -0800 | [diff] [blame] | 165 | ProcessorMiddlewareTest.thrift \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 166 | RefAnnotationFieldsTest.thrift \ |
| 167 | RequiredFieldTest.thrift \ |
| 168 | ServicesTest.thrift \ |
| 169 | TypedefFieldTest.thrift \ |
| 170 | UnionBinaryTest.thrift \ |
| 171 | UnionDefaultValueTest.thrift |