-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Thrift stable integration test case.
This new test case tests the merge process for thrift4go into the latest Thrift stable release (presently 0.8.0). It does not perform any end-to-end runnings of the tools but rather just verifies that the generator C++ code as well as the autotools infrastructure are correct.
- Loading branch information
1 parent
d8488da
commit 666dd84
Showing
9 changed files
with
251 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
./cleanup.sh | ||
if test -d lib/php/src/ext/thrift_protocol ; then | ||
if phpize -v >/dev/null 2>/dev/null ; then | ||
(cd lib/php/src/ext/thrift_protocol && phpize) | ||
fi | ||
fi | ||
|
||
set -e | ||
|
||
# libtoolize is called "glibtoolize" on OSX. | ||
if libtoolize --version 1 >/dev/null 2>/dev/null; then | ||
LIBTOOLIZE=libtoolize | ||
elif glibtoolize --version 1 >/dev/null 2>/dev/null; then | ||
LIBTOOLIZE=glibtoolize | ||
else | ||
echo >&2 "Couldn't find libtoolize!" | ||
exit 1 | ||
fi | ||
|
||
autoscan | ||
$LIBTOOLIZE --copy --automake | ||
aclocal -I ./aclocal | ||
autoheader | ||
autoconf | ||
automake --copy --add-missing --foreign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
topsrcdir="`dirname $0`" | ||
cd "$topsrcdir" | ||
|
||
make -k clean >/dev/null 2>&1 | ||
make -k distclean >/dev/null 2>&1 | ||
find . -name Makefile.in -exec rm -f {} \; | ||
rm -rf \ | ||
AUTHORS \ | ||
ChangeLog \ | ||
INSTALL \ | ||
Makefile \ | ||
Makefile.in \ | ||
Makefile.orig \ | ||
aclocal/libtool.m4 \ | ||
aclocal/ltoptions.m4 \ | ||
aclocal/ltsugar.m4 \ | ||
aclocal/ltversion.m4 \ | ||
aclocal/lt~obsolete.m4 \ | ||
aclocal.m4 \ | ||
autom4te.cache \ | ||
autoscan.log \ | ||
config.guess \ | ||
config.h \ | ||
config.hin \ | ||
config.hin~ \ | ||
config.log \ | ||
config.status \ | ||
config.status.lineno \ | ||
config.sub \ | ||
configure \ | ||
configure.lineno \ | ||
configure.scan \ | ||
depcomp \ | ||
.deps \ | ||
install-sh \ | ||
.libs \ | ||
libtool \ | ||
ltmain.sh \ | ||
missing \ | ||
ylwrap \ | ||
if/gen-* \ | ||
test/gen-* \ | ||
lib/php/src/ext/thrift_protocol/.deps \ | ||
lib/php/src/ext/thrift_protocol/Makefile \ | ||
lib/php/src/ext/thrift_protocol/Makefile.fragments \ | ||
lib/php/src/ext/thrift_protocol/Makefile.global \ | ||
lib/php/src/ext/thrift_protocol/Makefile.objects \ | ||
lib/php/src/ext/thrift_protocol/acinclude.m4 \ | ||
lib/php/src/ext/thrift_protocol/aclocal.m4 \ | ||
lib/php/src/ext/thrift_protocol/autom4te.cache \ | ||
lib/php/src/ext/thrift_protocol/build \ | ||
lib/php/src/ext/thrift_protocol/config.guess \ | ||
lib/php/src/ext/thrift_protocol/config.h \ | ||
lib/php/src/ext/thrift_protocol/config.h.in \ | ||
lib/php/src/ext/thrift_protocol/config.log \ | ||
lib/php/src/ext/thrift_protocol/config.nice \ | ||
lib/php/src/ext/thrift_protocol/config.status \ | ||
lib/php/src/ext/thrift_protocol/config.sub \ | ||
lib/php/src/ext/thrift_protocol/configure \ | ||
lib/php/src/ext/thrift_protocol/configure.in \ | ||
lib/php/src/ext/thrift_protocol/include \ | ||
lib/php/src/ext/thrift_protocol/install-sh \ | ||
lib/php/src/ext/thrift_protocol/libtool \ | ||
lib/php/src/ext/thrift_protocol/ltmain.sh \ | ||
lib/php/src/ext/thrift_protocol/missing \ | ||
lib/php/src/ext/thrift_protocol/mkinstalldirs \ | ||
lib/php/src/ext/thrift_protocol/modules \ | ||
lib/php/src/ext/thrift_protocol/run-tests.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
SUB_DIRECTORIES = merge | ||
CLEAN_DIRECTORIES = $(SUB_DIRECTORIES:%=clean-%) | ||
TEST_DIRECTORIES = $(SUB_DIRECTORIES:%=test-%) | ||
|
||
all: test | ||
|
||
test: $(TEST_DIRECTORIES) | ||
|
||
$(TEST_DIRECTORIES): | ||
$(MAKE) -C $(@:test-%=%) test | ||
|
||
clean: $(CLEAN_DIRECTORIES) | ||
|
||
$(CLEAN_DIRECTORIES): | ||
$(MAKE) -C $(@:clean-%=%) clean | ||
|
||
.PHONY: test $(TEST_DIRECTORIES) $(CLEAN_DIRECTORIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This directory contains test cases for thrift4go. Each test case should exist | ||
in its own directory with a Makefile that properly handles the two cases: | ||
|
||
- clean: Destroy any test artifacts and return the environment to a pristine | ||
condition. | ||
|
||
- test: Setup the test environment and run the tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
THRIFT_ARCHIVE_URL = https://dist.apache.org/repos/dist/release/thrift/0.8.0/thrift-0.8.0.tar.gz | ||
TEST_ARTIFACTS = \ | ||
test-merge-stamp \ | ||
test-stamp \ | ||
thrift-0.8.0 \ | ||
thrift-0.8.0.tar.gz \ | ||
thrift-extraction-stamp \ | ||
tree \ | ||
tree-stamp | ||
|
||
export THRIFT=$(CURDIR)/thrift-0.8.0 | ||
export THRIFT4GO=$(CURDIR)/../.. | ||
|
||
all: test | ||
|
||
test: test-stamp | ||
|
||
test-stamp: test-merge | ||
touch $@ | ||
|
||
test-merge: test-merge-stamp | ||
|
||
test-merge-stamp: thrift-extraction tree-stamp | ||
cd $(THRIFT4GO) && bash ./scripts/merge_and_build.sh -b | ||
cd $(THRIFT) && ./configure \ | ||
--prefix=$(CURDIR)/tree \ | ||
--with-go \ | ||
--without-{c_glib,java,haskell,php,erlang,perl,python,ruby} | ||
cd $(THRIFT) && make | ||
touch $@ | ||
|
||
tree-stamp: | ||
mkdir -vp tree | ||
touch $@ | ||
|
||
thrift-extraction: thrift-extraction-stamp | ||
|
||
thrift-0.8.0.tar.gz: | ||
wget https://dist.apache.org/repos/dist/release/thrift/0.8.0/thrift-0.8.0.tar.gz | ||
|
||
thrift-extraction-stamp: thrift-0.8.0.tar.gz | ||
tar xzvf thrift-0.8.0.tar.gz | ||
touch $@ | ||
|
||
clean: | ||
rm -rf $(TEST_ARTIFACTS) | ||
|
||
.PHONY: test test-merge thrift-extraction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This test case is designed to test the integration of thrift4go into the Thrift | ||
stable release (presently 0.8.0). Specifically, this purely verifies that it | ||
can be merged and that the resultant Thrift package can be compiled. |