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 | |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame^] | 20 | THRIFT = $(top_builddir)/compiler/cpp/thrift |
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 \ |
| 30 | ServicesTest.thrift \ |
| 31 | GoTagTest.thrift \ |
| 32 | TypedefFieldTest.thrift \ |
Jens Geyer | 527b6d9 | 2014-11-30 15:07:18 +0100 | [diff] [blame] | 33 | RefAnnotationFieldsTest.thrift \ |
Jens Geyer | 28c1c19 | 2015-03-07 14:18:01 +0100 | [diff] [blame] | 34 | ErrorTest.thrift \ |
Jens Geyer | 1d1bca2 | 2015-03-14 16:28:27 +0200 | [diff] [blame] | 35 | NamesTest.thrift \ |
| 36 | InitialismsTest.thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 37 | mkdir -p gopath/src |
| 38 | grep -v list.*map.*list.*map $(THRIFTTEST) | grep -v 'set<Insanity>' > ThriftTest.thrift |
| 39 | $(THRIFT) -r IncludesTest.thrift |
| 40 | $(THRIFT) BinaryKeyTest.thrift |
| 41 | $(THRIFT) MultiplexedProtocolTest.thrift |
| 42 | $(THRIFT) OnewayTest.thrift |
| 43 | $(THRIFT) OptionalFieldsTest.thrift |
| 44 | $(THRIFT) ServicesTest.thrift |
| 45 | $(THRIFT) GoTagTest.thrift |
| 46 | $(THRIFT) TypedefFieldTest.thrift |
| 47 | $(THRIFT) RefAnnotationFieldsTest.thrift |
Jens Geyer | 527b6d9 | 2014-11-30 15:07:18 +0100 | [diff] [blame] | 48 | $(THRIFT) ErrorTest.thrift |
Jens Geyer | 28c1c19 | 2015-03-07 14:18:01 +0100 | [diff] [blame] | 49 | $(THRIFT) NamesTest.thrift |
Jens Geyer | 1d1bca2 | 2015-03-14 16:28:27 +0200 | [diff] [blame] | 50 | $(THRIFT) InitialismsTest.thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 51 | GOPATH=`pwd`/gopath $(GO) get code.google.com/p/gomock/gomock |
| 52 | ln -nfs ../../../thrift gopath/src/thrift |
| 53 | ln -nfs ../../tests gopath/src/tests |
| 54 | touch gopath |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 55 | |
| 56 | check: gopath |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 57 | GOPATH=`pwd`/gopath $(GO) build \ |
| 58 | includestest \ |
| 59 | binarykeytest \ |
| 60 | servicestest \ |
| 61 | typedeffieldtest \ |
Jens Geyer | 527b6d9 | 2014-11-30 15:07:18 +0100 | [diff] [blame] | 62 | refannotationfieldstest \ |
Jens Geyer | 28c1c19 | 2015-03-07 14:18:01 +0100 | [diff] [blame] | 63 | errortest \ |
Jens Geyer | 1d1bca2 | 2015-03-14 16:28:27 +0200 | [diff] [blame] | 64 | namestest \ |
| 65 | initialismstest |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 66 | GOPATH=`pwd`/gopath $(GO) test thrift tests |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 67 | |
| 68 | clean-local: |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 69 | $(RM) -r gopath ThriftTest.thrift gen-go |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 70 | |
| 71 | client: stubs |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 72 | $(GO) run TestClient.go |
jfarrell | 32d323e | 2013-08-15 20:39:58 -0400 | [diff] [blame] | 73 | |
| 74 | EXTRA_DIST = \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 75 | tests \ |
| 76 | BinaryKeyTest.thrift \ |
| 77 | GoTagTest.thrift \ |
| 78 | IncludesTest.thrift \ |
| 79 | MultiplexedProtocolTest.thrift \ |
| 80 | NamespacedTest.thrift \ |
| 81 | OnewayTest.thrift \ |
| 82 | OptionalFieldsTest.thrift \ |
| 83 | RefAnnotationFieldsTest.thrift \ |
| 84 | ServicesTest.thrift \ |
Jens Geyer | 527b6d9 | 2014-11-30 15:07:18 +0100 | [diff] [blame] | 85 | TypedefFieldTest.thrift \ |
Jens Geyer | 28c1c19 | 2015-03-07 14:18:01 +0100 | [diff] [blame] | 86 | ErrorTest.thrift \ |
Jens Geyer | 1d1bca2 | 2015-03-14 16:28:27 +0200 | [diff] [blame] | 87 | NamesTest.thrift \ |
| 88 | InitialismsTest.thrift |