summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rwxr-xr-xconfigure.ac1
-rw-r--r--lib/erl/Makefile.am42
-rw-r--r--lib/erl/src/thrift.app.src43
-rwxr-xr-xtest/Makefile.am5
-rw-r--r--test/erl/Makefile.am37
-rw-r--r--test/erl/rebar.config5
-rw-r--r--test/erl/src/nameConflictTest_test.erl (renamed from lib/erl/test/nameConflictTest_test.erl)0
-rw-r--r--test/erl/src/thrift_test.app.src52
9 files changed, 144 insertions, 45 deletions
diff --git a/.gitignore b/.gitignore
index a2501657d..b0b5e6500 100644
--- a/.gitignore
+++ b/.gitignore
@@ -156,10 +156,6 @@ test-driver
/lib/erl/.eunit
/lib/erl/ebin
/lib/erl/deps/
-/lib/erl/src/thrift.app.src
-/lib/erl/test/*.erl
-/lib/erl/test/*.hrl
-/lib/erl/test/*.beam
/lib/hs/dist
/lib/java/build
/lib/js/test/build
diff --git a/configure.ac b/configure.ac
index bccfc69e3..d97e957f6 100755
--- a/configure.ac
+++ b/configure.ac
@@ -654,6 +654,7 @@ AC_CONFIG_FILES([
lib/lua/Makefile
test/Makefile
test/cpp/Makefile
+ test/erl/Makefile
test/go/Makefile
test/hs/Makefile
test/php/Makefile
diff --git a/lib/erl/Makefile.am b/lib/erl/Makefile.am
index c87f998f4..cdac92614 100644
--- a/lib/erl/Makefile.am
+++ b/lib/erl/Makefile.am
@@ -18,8 +18,8 @@
#
THRIFT = ../../compiler/cpp/thrift
-THRIFT_FILES = $(wildcard ../../test/*.thrift) \
- $(wildcard test/*.thrift)
+THRIFT_FILES = $(wildcard test/*.thrift) \
+ ../../test/ThriftTest.thrift
.generated: $(THRIFT_FILES)
for f in $(THRIFT_FILES) ; do \
@@ -47,32 +47,20 @@ uninstall:
rm -rf $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)
clean:
- ./rebar clean
rm -f .generated
- rm -f test/secondService_* \
- test/aService_* \
- test/serviceForExceptionWithAMap_* \
- test/annotationTest_* \
- test/service_* \
- test/constantsDemo_* \
- test/smallService_* \
- test/smallTest_* \
- test/debugProtoTest_* \
- test/srv_* \
- test/denseLinkingTest_* \
- test/stressTest_* \
- test/docTest_* \
- test/emptyService_* \
- test/inherited_* \
- test/javaBeansTest_* \
- test/thrift1151_* \
- test/javaBeansTest_* \
- test/manyTypedefs_* \
- test/thriftTest_* \
- test/optionalRequiredTest_* \
- test/yowza_* \
- test/reverseOrderService_* \
- test/manyOptionals_*
+ rm -f test/thrift1151_types.erl \
+ test/thrift1151_types.hrl \
+ test/thrift1151_constants.hrl \
+ test/thrift1475_types.erl \
+ test/thrift1475_types.hrl \
+ test/thrift1475_constants.hrl \
+ test/thriftTest_types.erl \
+ test/thriftTest_types.hrl \
+ test/thriftTest_constants.hrl \
+ test/thriftTest_thrift.erl \
+ test/thriftTest_thrift.hrl \
+ test/secondService_thrift.erl \
+ test/secondService_thrift.hrl
./rebar clean
maintainer-clean-local:
diff --git a/lib/erl/src/thrift.app.src b/lib/erl/src/thrift.app.src
index 90ebc62b4..28b8cb5ba 100644
--- a/lib/erl/src/thrift.app.src
+++ b/lib/erl/src/thrift.app.src
@@ -17,8 +17,7 @@
%% under the License.
%%
%%% -*- mode:erlang -*-
-{application, thrift,
- [
+{application, thrift, [
% A quick description of the application.
{description, "Thrift bindings"},
@@ -27,7 +26,28 @@
% All modules used by the application.
{modules, [
- ]},
+ thrift_base64_transport,
+ thrift_binary_protocol,
+ thrift_buffered_transport,
+ thrift_client_util,
+ thrift_client,
+ thrift_disk_log_transport,
+ thrift_file_transport,
+ thrift_framed_transport,
+ thrift_http_transport,
+ thrift_json_parser,
+ thrift_json_protocol,
+ thrift_memory_buffer,
+ thrift_processor,
+ thrift_protocol,
+ thrift_reconnecting_client,
+ thrift_server,
+ thrift_service,
+ thrift_socket_server,
+ thrift_socket_transport,
+ thrift_transport_state_test,
+ thrift_transport
+ ]},
% All of the registered names the application uses. This can be ignored.
{registered, []},
@@ -35,11 +55,7 @@
% Applications that are to be started prior to this one. This can be ignored
% leave it alone unless you understand it well and let the .rel files in
% your release handle this.
- {applications,
- [
- kernel,
- stdlib
- ]},
+ {applications, [kernel, stdlib]},
% OTP application loader will load, but not start, included apps. Again
% this can be ignored as well. To load but not start an application it
@@ -49,10 +65,9 @@
% configuration parameters similar to those in the config file specified
% on the command line. can be fetched with gas:get_env
{env, [
- % If an error/crash occurs during processing of a function,
- % should the TApplicationException serialized back to the client
- % include the erlang backtrace?
- {exceptions_include_traces, true}
+ % If an error/crash occurs during processing of a function,
+ % should the TApplicationException serialized back to the client
+ % include the erlang backtrace?
+ {exceptions_include_traces, true}
]}
- ]
-}.
+]}.
diff --git a/test/Makefile.am b/test/Makefile.am
index dddad1160..6f4bb0352 100755
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -49,6 +49,10 @@ if WITH_GO
SUBDIRS += go
endif
+if WITH_ERLANG
+SUBDIRS += erl
+endif
+
#
# generate html for ThriftTest.thrift
#
@@ -61,6 +65,7 @@ EXTRA_DIST = \
test.py \
tests.json \
cpp \
+ erl \
hs \
lua \
ocaml \
diff --git a/test/erl/Makefile.am b/test/erl/Makefile.am
new file mode 100644
index 000000000..911fceb60
--- /dev/null
+++ b/test/erl/Makefile.am
@@ -0,0 +1,37 @@
+#
+# 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.
+#
+
+THRIFT = $(top_srcdir)/compiler/cpp/thrift
+REBAR = $(top_srcdir)/lib/erl/rebar
+
+THRIFT_FILES = $(wildcard ../*.thrift)
+
+.generated: $(THRIFT_FILES)
+ for f in $(THRIFT_FILES) ; do \
+ $(THRIFT) --gen erl $$f ; \
+ done ; \
+ touch .generated
+
+check: .generated
+ $(REBAR) eunit
+
+clean:
+ rm -f .generated
+ rm -rf gen-erl
+ $(REBAR) clean
diff --git a/test/erl/rebar.config b/test/erl/rebar.config
new file mode 100644
index 000000000..6035849e5
--- /dev/null
+++ b/test/erl/rebar.config
@@ -0,0 +1,5 @@
+{erl_opts, [
+ debug_info,
+ {i, ["gen-erl"]},
+ {src_dirs, ["gen-erl"]}
+]}.
diff --git a/lib/erl/test/nameConflictTest_test.erl b/test/erl/src/nameConflictTest_test.erl
index 48a08be8a..48a08be8a 100644
--- a/lib/erl/test/nameConflictTest_test.erl
+++ b/test/erl/src/nameConflictTest_test.erl
diff --git a/test/erl/src/thrift_test.app.src b/test/erl/src/thrift_test.app.src
new file mode 100644
index 000000000..dd0492670
--- /dev/null
+++ b/test/erl/src/thrift_test.app.src
@@ -0,0 +1,52 @@
+%%
+%% 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.
+%%
+%%% -*- mode:erlang -*-
+{application, thrift_test, [
+ % A quick description of the application.
+ {description, "tests for thrift erlang compiler backend"},
+
+ % The version of the applicaton
+ {vsn, "1.0.0-dev"},
+
+ % All modules used by the application.
+ {modules, [
+ ]},
+
+ % All of the registered names the application uses. This can be ignored.
+ {registered, []},
+
+ % Applications that are to be started prior to this one. This can be ignored
+ % leave it alone unless you understand it well and let the .rel files in
+ % your release handle this.
+ {applications, [kernel, stdlib]},
+
+ % OTP application loader will load, but not start, included apps. Again
+ % this can be ignored as well. To load but not start an application it
+ % is easier to include it in the .rel file followed by the atom 'none'
+ {included_applications, []},
+
+ % configuration parameters similar to those in the config file specified
+ % on the command line. can be fetched with gas:get_env
+ {env, [
+ % If an error/crash occurs during processing of a function,
+ % should the TApplicationException serialized back to the client
+ % include the erlang backtrace?
+ {exceptions_include_traces, true}
+ ]}
+]}.