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