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 | GOBUILDEXTRA = -buildvcs=false |
Yuxuan 'fishy' Wang | 8045d82 | 2022-04-19 14:31:39 -0700 | [diff] [blame] | 21 | |
Yuxuan 'fishy' Wang | dae1437 | 2022-05-09 11:05:11 -0700 | [diff] [blame] | 22 | THRIFT_GO_ARGS_BASE = thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/lib/go/test/gopath/src/ |
| 23 | |
| 24 | THRIFTARGS = -out gopath/src/ --gen go:$(THRIFT_GO_ARGS_BASE)$(COMPILER_EXTRAFLAG) |
Yuxuan 'fishy' Wang | e8353cb | 2022-10-28 10:29:25 -0700 | [diff] [blame] | 25 | THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 26 | |
Yuxuan 'fishy' Wang | dae1437 | 2022-05-09 11:05:11 -0700 | [diff] [blame] | 27 | THRIFTARGS_SKIP_REMOTE = -out gopath/src/ --gen go:skip_remote,$(THRIFT_GO_ARGS_BASE)$(COMPILER_EXTRAFLAG) |
| 28 | |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 29 | # Thrift for GO has problems with complex map keys: THRIFT-2063 |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 30 | gopath: $(THRIFT) $(THRIFTTEST) \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 31 | IncludesTest.thrift \ |
| 32 | NamespacedTest.thrift \ |
| 33 | MultiplexedProtocolTest.thrift \ |
| 34 | OnewayTest.thrift \ |
| 35 | OptionalFieldsTest.thrift \ |
Craig Wickesser | 5c1ecb6 | 2018-10-16 02:40:13 -0400 | [diff] [blame] | 36 | RequiredFieldTest.thrift \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 37 | ServicesTest.thrift \ |
| 38 | GoTagTest.thrift \ |
| 39 | TypedefFieldTest.thrift \ |
Jens Geyer | 527b6d9 | 2014-11-30 15:07:18 +0100 | [diff] [blame] | 40 | RefAnnotationFieldsTest.thrift \ |
Jens Geyer | 0f17e15 | 2015-09-15 21:22:42 +0200 | [diff] [blame] | 41 | UnionDefaultValueTest.thrift \ |
D. Can Celasun | 88591e3 | 2018-05-17 08:52:11 +0200 | [diff] [blame] | 42 | UnionBinaryTest.thrift \ |
Jens Geyer | 28c1c19 | 2015-03-07 14:18:01 +0100 | [diff] [blame] | 43 | ErrorTest.thrift \ |
Jens Geyer | 1d1bca2 | 2015-03-14 16:28:27 +0200 | [diff] [blame] | 44 | NamesTest.thrift \ |
Jens Geyer | 70219e1 | 2015-05-20 22:00:25 +0200 | [diff] [blame] | 45 | InitialismsTest.thrift \ |
| 46 | DontExportRWTest.thrift \ |
Jens Geyer | 86a51e7 | 2015-06-01 20:41:41 +0200 | [diff] [blame] | 47 | dontexportrwtest/compile_test.go \ |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 48 | IgnoreInitialismsTest.thrift \ |
| 49 | ConflictNamespaceTestA.thrift \ |
| 50 | ConflictNamespaceTestB.thrift \ |
| 51 | ConflictNamespaceTestC.thrift \ |
| 52 | ConflictNamespaceTestD.thrift \ |
Yuxuan 'fishy' Wang | 2c78047 | 2021-07-31 13:44:41 -0700 | [diff] [blame] | 53 | ConflictNamespaceTestE.thrift \ |
| 54 | ConflictNamespaceTestF.thrift \ |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 55 | ConflictNamespaceTestSuperThing.thrift \ |
Duru Can Celasun | f4475ff | 2019-11-20 15:31:35 +0000 | [diff] [blame] | 56 | ConflictNamespaceServiceTest.thrift \ |
Yuxuan 'fishy' Wang | b0b3531 | 2021-02-18 09:09:20 -0800 | [diff] [blame] | 57 | DuplicateImportsTest.thrift \ |
| 58 | EqualsTest.thrift \ |
Yuxuan 'fishy' Wang | f695535 | 2021-07-29 15:59:10 -0700 | [diff] [blame] | 59 | ConflictArgNamesTest.thrift \ |
| 60 | ConstOptionalFieldImport.thrift \ |
Yuxuan 'fishy' Wang | 9bee877 | 2022-02-22 18:48:17 -0800 | [diff] [blame] | 61 | ConstOptionalField.thrift \ |
Yuxuan 'fishy' Wang | 892b673 | 2022-08-01 12:47:12 -0700 | [diff] [blame] | 62 | ProcessorMiddlewareTest.thrift \ |
Simon Wang | d5927a9 | 2021-09-13 19:50:45 +0800 | [diff] [blame] | 63 | ClientMiddlewareExceptionTest.thrift \ |
Yuxuan 'fishy' Wang | b39370e | 2022-12-29 15:31:38 -0800 | [diff] [blame] | 64 | ValidateTest.thrift \ |
k-walton | a9b1463 | 2024-03-18 18:26:27 -0400 | [diff] [blame^] | 65 | ForwardType.thrift \ |
| 66 | StringParseAllocationTest.thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 67 | mkdir -p gopath/src |
| 68 | 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] | 69 | $(THRIFT) $(THRIFTARGS) -r IncludesTest.thrift |
| 70 | $(THRIFT) $(THRIFTARGS) BinaryKeyTest.thrift |
| 71 | $(THRIFT) $(THRIFTARGS) MultiplexedProtocolTest.thrift |
| 72 | $(THRIFT) $(THRIFTARGS) OnewayTest.thrift |
| 73 | $(THRIFT) $(THRIFTARGS) OptionalFieldsTest.thrift |
Craig Wickesser | 5c1ecb6 | 2018-10-16 02:40:13 -0400 | [diff] [blame] | 74 | $(THRIFT) $(THRIFTARGS) RequiredFieldTest.thrift |
Jens Geyer | 9f74f32 | 2015-04-17 23:33:48 +0200 | [diff] [blame] | 75 | $(THRIFT) $(THRIFTARGS) ServicesTest.thrift |
| 76 | $(THRIFT) $(THRIFTARGS) GoTagTest.thrift |
| 77 | $(THRIFT) $(THRIFTARGS) TypedefFieldTest.thrift |
| 78 | $(THRIFT) $(THRIFTARGS) RefAnnotationFieldsTest.thrift |
Jens Geyer | 0f17e15 | 2015-09-15 21:22:42 +0200 | [diff] [blame] | 79 | $(THRIFT) $(THRIFTARGS) UnionDefaultValueTest.thrift |
D. Can Celasun | 88591e3 | 2018-05-17 08:52:11 +0200 | [diff] [blame] | 80 | $(THRIFT) $(THRIFTARGS) UnionBinaryTest.thrift |
Jens Geyer | 9f74f32 | 2015-04-17 23:33:48 +0200 | [diff] [blame] | 81 | $(THRIFT) $(THRIFTARGS) ErrorTest.thrift |
| 82 | $(THRIFT) $(THRIFTARGS) NamesTest.thrift |
| 83 | $(THRIFT) $(THRIFTARGS) InitialismsTest.thrift |
Jens Geyer | 70219e1 | 2015-05-20 22:00:25 +0200 | [diff] [blame] | 84 | $(THRIFT) $(THRIFTARGS),read_write_private DontExportRWTest.thrift |
Jens Geyer | 86a51e7 | 2015-06-01 20:41:41 +0200 | [diff] [blame] | 85 | $(THRIFT) $(THRIFTARGS),ignore_initialisms IgnoreInitialismsTest.thrift |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 86 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestA.thrift |
| 87 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestB.thrift |
| 88 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestC.thrift |
| 89 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestD.thrift |
Yuxuan 'fishy' Wang | 2c78047 | 2021-07-31 13:44:41 -0700 | [diff] [blame] | 90 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestE.thrift |
| 91 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestF.thrift |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 92 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceTestSuperThing.thrift |
| 93 | $(THRIFT) $(THRIFTARGS) ConflictNamespaceServiceTest.thrift |
Duru Can Celasun | f4475ff | 2019-11-20 15:31:35 +0000 | [diff] [blame] | 94 | $(THRIFT) $(THRIFTARGS) -r DuplicateImportsTest.thrift |
wangtieju | 4aaef75 | 2021-02-04 11:26:44 +0800 | [diff] [blame] | 95 | $(THRIFT) $(THRIFTARGS) EqualsTest.thrift |
Yuxuan 'fishy' Wang | b0b3531 | 2021-02-18 09:09:20 -0800 | [diff] [blame] | 96 | $(THRIFT) $(THRIFTARGS) ConflictArgNamesTest.thrift |
Yuxuan 'fishy' Wang | f695535 | 2021-07-29 15:59:10 -0700 | [diff] [blame] | 97 | $(THRIFT) $(THRIFTARGS) -r ConstOptionalField.thrift |
Yuxuan 'fishy' Wang | dae1437 | 2022-05-09 11:05:11 -0700 | [diff] [blame] | 98 | $(THRIFT) $(THRIFTARGS_SKIP_REMOTE) ProcessorMiddlewareTest.thrift |
Yuxuan 'fishy' Wang | 892b673 | 2022-08-01 12:47:12 -0700 | [diff] [blame] | 99 | $(THRIFT) $(THRIFTARGS) ClientMiddlewareExceptionTest.thrift |
Simon Wang | d5927a9 | 2021-09-13 19:50:45 +0800 | [diff] [blame] | 100 | $(THRIFT) $(THRIFTARGS) ValidateTest.thrift |
Yuxuan 'fishy' Wang | dca42ab | 2023-02-15 12:19:44 -0800 | [diff] [blame] | 101 | $(THRIFT) $(THRIFTARGS) ForwardType.thrift |
k-walton | a9b1463 | 2024-03-18 18:26:27 -0400 | [diff] [blame^] | 102 | $(THRIFT) $(THRIFTARGS) StringParseAllocationTest.thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 103 | ln -nfs ../../tests gopath/src/tests |
Jens Geyer | 70219e1 | 2015-05-20 22:00:25 +0200 | [diff] [blame] | 104 | cp -r ./dontexportrwtest gopath/src |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 105 | touch gopath |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 106 | |
| 107 | check: gopath |
Yuxuan 'fishy' Wang | e8353cb | 2022-10-28 10:29:25 -0700 | [diff] [blame] | 108 | $(GO) build $(GOBUILDEXTRA) \ |
Yuxuan 'fishy' Wang | b71f11e | 2021-03-22 15:01:00 -0700 | [diff] [blame] | 109 | ./gopath/src/includestest \ |
| 110 | ./gopath/src/binarykeytest \ |
| 111 | ./gopath/src/servicestest \ |
| 112 | ./gopath/src/typedeffieldtest \ |
| 113 | ./gopath/src/refannotationfieldstest \ |
| 114 | ./gopath/src/errortest \ |
| 115 | ./gopath/src/namestest \ |
| 116 | ./gopath/src/initialismstest \ |
| 117 | ./gopath/src/dontexportrwtest \ |
| 118 | ./gopath/src/ignoreinitialismstest \ |
| 119 | ./gopath/src/unionbinarytest \ |
Yuxuan 'fishy' Wang | 2c78047 | 2021-07-31 13:44:41 -0700 | [diff] [blame] | 120 | ./gopath/src/conflict/super \ |
Yuxuan 'fishy' Wang | b71f11e | 2021-03-22 15:01:00 -0700 | [diff] [blame] | 121 | ./gopath/src/conflict/context/conflict_service-remote \ |
| 122 | ./gopath/src/servicestest/container_test-remote \ |
| 123 | ./gopath/src/duplicateimportstest \ |
| 124 | ./gopath/src/equalstest \ |
Yuxuan 'fishy' Wang | 9bee877 | 2022-02-22 18:48:17 -0800 | [diff] [blame] | 125 | ./gopath/src/conflictargnamestest \ |
Yuxuan 'fishy' Wang | 892b673 | 2022-08-01 12:47:12 -0700 | [diff] [blame] | 126 | ./gopath/src/processormiddlewaretest \ |
Simon Wang | d5927a9 | 2021-09-13 19:50:45 +0800 | [diff] [blame] | 127 | ./gopath/src/clientmiddlewareexceptiontest \ |
Yuxuan 'fishy' Wang | b39370e | 2022-12-29 15:31:38 -0800 | [diff] [blame] | 128 | ./gopath/src/validatetest \ |
Yuxuan 'fishy' Wang | dca42ab | 2023-02-15 12:19:44 -0800 | [diff] [blame] | 129 | ./gopath/src/forwardtypetest |
Yuxuan 'fishy' Wang | e8353cb | 2022-10-28 10:29:25 -0700 | [diff] [blame] | 130 | $(GO) test github.com/apache/thrift/lib/go/thrift |
| 131 | $(GO) test ./gopath/src/tests ./gopath/src/dontexportrwtest |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 132 | |
| 133 | clean-local: |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 134 | $(RM) -r gopath ThriftTest.thrift gen-go |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 135 | |
| 136 | client: stubs |
Yuxuan 'fishy' Wang | e8353cb | 2022-10-28 10:29:25 -0700 | [diff] [blame] | 137 | $(GO) run TestClient.go |
jfarrell | 32d323e | 2013-08-15 20:39:58 -0400 | [diff] [blame] | 138 | |
| 139 | EXTRA_DIST = \ |
jfarrell | f13e431 | 2015-08-25 00:39:29 -0400 | [diff] [blame] | 140 | dontexportrwtest \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 141 | tests \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 142 | common \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 143 | BinaryKeyTest.thrift \ |
Yuxuan 'fishy' Wang | 892b673 | 2022-08-01 12:47:12 -0700 | [diff] [blame] | 144 | ClientMiddlewareExceptionTest.thrift \ |
Yuxuan 'fishy' Wang | b0b3531 | 2021-02-18 09:09:20 -0800 | [diff] [blame] | 145 | ConflictArgNamesTest.thrift \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 146 | ConflictNamespaceServiceTest.thrift \ |
John Boiles | d9019fc | 2019-06-28 23:07:10 -0700 | [diff] [blame] | 147 | ConflictNamespaceTestA.thrift \ |
| 148 | ConflictNamespaceTestB.thrift \ |
| 149 | ConflictNamespaceTestC.thrift \ |
| 150 | ConflictNamespaceTestD.thrift \ |
Jens Geyer | a10d401 | 2022-02-02 22:57:46 +0100 | [diff] [blame] | 151 | ConflictNamespaceTestE.thrift \ |
| 152 | ConflictNamespaceTestF.thrift \ |
John Boiles | 59694a7 | 2019-11-09 11:22:26 -0800 | [diff] [blame] | 153 | ConflictNamespaceTestSuperThing.thrift \ |
Yuxuan 'fishy' Wang | f695535 | 2021-07-29 15:59:10 -0700 | [diff] [blame] | 154 | ConstOptionalField.thrift \ |
| 155 | ConstOptionalFieldImport.thrift \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 156 | DontExportRWTest.thrift \ |
| 157 | DuplicateImportsTest.thrift \ |
| 158 | ErrorTest.thrift \ |
| 159 | EqualsTest.thrift \ |
Yuxuan 'fishy' Wang | dca42ab | 2023-02-15 12:19:44 -0800 | [diff] [blame] | 160 | ForwardType.thrift \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 161 | GoTagTest.thrift \ |
| 162 | IgnoreInitialismsTest.thrift \ |
| 163 | IncludesTest.thrift \ |
| 164 | InitialismsTest.thrift \ |
| 165 | MultiplexedProtocolTest.thrift \ |
| 166 | NamespacedTest.thrift \ |
| 167 | NamesTest.thrift \ |
| 168 | OnewayTest.thrift \ |
| 169 | OptionalFieldsTest.thrift \ |
Yuxuan 'fishy' Wang | 9bee877 | 2022-02-22 18:48:17 -0800 | [diff] [blame] | 170 | ProcessorMiddlewareTest.thrift \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 171 | RefAnnotationFieldsTest.thrift \ |
| 172 | RequiredFieldTest.thrift \ |
| 173 | ServicesTest.thrift \ |
k-walton | a9b1463 | 2024-03-18 18:26:27 -0400 | [diff] [blame^] | 174 | StringParseAllocationTest.thrift \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 175 | TypedefFieldTest.thrift \ |
| 176 | UnionBinaryTest.thrift \ |
Simon Wang | d5927a9 | 2021-09-13 19:50:45 +0800 | [diff] [blame] | 177 | UnionDefaultValueTest.thrift \ |
| 178 | ValidateTest.thrift |