You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2015/07/28 23:16:58 UTC

[1/3] thrift git commit: THRIFT-2917 "make clean" breaks test/c_glib Client: c_glib Patch: Simon South

Repository: thrift
Updated Branches:
  refs/heads/master 867771918 -> 1c1902788


THRIFT-2917 "make clean" breaks test/c_glib
Client: c_glib
Patch: Simon South


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/8c5fce9a
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/8c5fce9a
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/8c5fce9a

Branch: refs/heads/master
Commit: 8c5fce9afabb2476c134a702356bb1bad1eb43f4
Parents: 8677719
Author: Jens Geyer <je...@apache.org>
Authored: Tue Jul 28 22:59:16 2015 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Tue Jul 28 22:59:16 2015 +0200

----------------------------------------------------------------------
 lib/c_glib/test/Makefile.am | 2 +-
 test/c_glib/Makefile.am     | 2 +-
 tutorial/c_glib/Makefile.am | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/8c5fce9a/lib/c_glib/test/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/Makefile.am b/lib/c_glib/test/Makefile.am
index 0e8de86..dc9432e 100755
--- a/lib/c_glib/test/Makefile.am
+++ b/lib/c_glib/test/Makefile.am
@@ -237,7 +237,7 @@ leakcheck-%: %
 	    ${$<_VALGRIND_LEAK_OPTS}  ./$<
 
 clean-local:
-	$(RM) -r gen-c_glib gen-cpp
+	$(RM) gen-c_glib/* gen-cpp/*
 
 CLEANFILES =                            \
     *.bb                                \

http://git-wip-us.apache.org/repos/asf/thrift/blob/8c5fce9a/test/c_glib/Makefile.am
----------------------------------------------------------------------
diff --git a/test/c_glib/Makefile.am b/test/c_glib/Makefile.am
index 9412415..7559fd6 100755
--- a/test/c_glib/Makefile.am
+++ b/test/c_glib/Makefile.am
@@ -65,7 +65,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -Igen-c_glib
 AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) @GCOV_LDFLAGS@
 
 clean-local:
-	$(RM) -r gen-c_glib
+	$(RM) gen-c_glib/*
 
 EXTRA_DIST = \
 	src/test_client.c \

http://git-wip-us.apache.org/repos/asf/thrift/blob/8c5fce9a/tutorial/c_glib/Makefile.am
----------------------------------------------------------------------
diff --git a/tutorial/c_glib/Makefile.am b/tutorial/c_glib/Makefile.am
index 43748c0..1862f1b 100755
--- a/tutorial/c_glib/Makefile.am
+++ b/tutorial/c_glib/Makefile.am
@@ -70,7 +70,7 @@ gen-c_glib/calculator.c gen-c_glib/calculator.h gen-c_glib/shared_service.c gen-
 	$(THRIFT) --gen c_glib -r $<
 
 clean-local:
-	$(RM) -r gen-c_glib
+	$(RM) gen-c_glib/*
 
 tutorialserver: all
 	./tutorial_server


[3/3] thrift git commit: THRIFT-3266 c_glib: Multiple compiler warnings building unit tests Client: c_glib Patch: Simon South

Posted by je...@apache.org.
THRIFT-3266 c_glib: Multiple compiler warnings building unit tests
Client: c_glib
Patch: Simon South

This closes #570


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/1c190278
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/1c190278
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/1c190278

Branch: refs/heads/master
Commit: 1c1902788bef82c0dbf2b10b2d39767ce94a1c38
Parents: 57ac33e
Author: Jens Geyer <je...@apache.org>
Authored: Tue Jul 28 23:15:18 2015 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Tue Jul 28 23:15:18 2015 +0200

----------------------------------------------------------------------
 lib/c_glib/test/Makefile.am                | 1 +
 lib/c_glib/test/testapplicationexception.c | 4 ++--
 lib/c_glib/test/testbinaryprotocol.c       | 4 ++++
 lib/c_glib/test/testbufferedtransport.c    | 4 ++++
 lib/c_glib/test/testdebugproto.c           | 2 +-
 lib/c_glib/test/testframedtransport.c      | 4 ++++
 lib/c_glib/test/testmemorybuffer.c         | 3 +++
 lib/c_glib/test/testoptionalrequired.c     | 3 +++
 lib/c_glib/test/testsimpleserver.c         | 3 +++
 lib/c_glib/test/teststruct.c               | 3 +++
 lib/c_glib/test/testthrifttest.c           | 5 ++++-
 lib/c_glib/test/testthrifttestclient.cpp   | 2 ++
 lib/c_glib/test/testtransportsocket.c      | 3 +++
 13 files changed, 37 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/Makefile.am b/lib/c_glib/test/Makefile.am
index dc9432e..2a38878 100755
--- a/lib/c_glib/test/Makefile.am
+++ b/lib/c_glib/test/Makefile.am
@@ -160,6 +160,7 @@ nodist_libtestgenc_la_SOURCES = \
         gen-c_glib/t_test_thrift_test.h \
         gen-c_glib/t_test_thrift_test_types.h
 libtestgenc_la_LIBADD = $(top_builddir)/lib/c_glib/libthrift_c_glib.la
+libtestgenc_la_CPPFLAGS = $(AM_CPPFLAGS) -Wno-unused-function
 
 nodist_libtestgencpp_la_SOURCES = \
         gen-cpp/ThriftTest.cpp \

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testapplicationexception.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testapplicationexception.c b/lib/c_glib/test/testapplicationexception.c
index 2481340..89e39e2 100644
--- a/lib/c_glib/test/testapplicationexception.c
+++ b/lib/c_glib/test/testapplicationexception.c
@@ -99,7 +99,7 @@ test_properties_test (void)
 
 /* "g_test_expect_message" is required for the property range tests below but is
    not present in GLib before version 2.34 */
-#if (GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION >= 34)
+#if (GLIB_CHECK_VERSION (2, 34, 0))
   g_object_set (xception,
                 "type", THRIFT_APPLICATION_EXCEPTION_ERROR_UNKNOWN,
                 NULL);
@@ -161,7 +161,7 @@ test_properties_message (void)
 int
 main (int argc, char **argv)
 {
-#if (GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 36)
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init ();
 #endif
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testbinaryprotocol.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testbinaryprotocol.c b/lib/c_glib/test/testbinaryprotocol.c
index f75c796..c6de385 100755
--- a/lib/c_glib/test/testbinaryprotocol.c
+++ b/lib/c_glib/test/testbinaryprotocol.c
@@ -23,6 +23,7 @@
 #include <assert.h>
 #include <netdb.h>
 #include <string.h>
+#include <sys/wait.h>
 
 #include <thrift/c_glib/protocol/thrift_protocol.h>
 #include <thrift/c_glib/transport/thrift_socket.h>
@@ -660,7 +661,10 @@ thrift_server_complex_types (const int port)
 int
 main(int argc, char *argv[])
 {
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init();
+#endif
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/testbinaryprotocol/CreateAndDestroy", test_create_and_destroy);

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testbufferedtransport.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testbufferedtransport.c b/lib/c_glib/test/testbufferedtransport.c
index 7d9c46d..e4bee69 100755
--- a/lib/c_glib/test/testbufferedtransport.c
+++ b/lib/c_glib/test/testbufferedtransport.c
@@ -20,6 +20,7 @@
 #include <assert.h>
 #include <netdb.h>
 #include <signal.h>
+#include <sys/wait.h>
 
 #include <thrift/c_glib/transport/thrift_transport.h>
 #include <thrift/c_glib/transport/thrift_socket.h>
@@ -273,7 +274,10 @@ test_write_fail(void)
 int
 main(int argc, char *argv[])
 {
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init();
+#endif
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/testbufferedtransport/CreateAndDestroy", test_create_and_destroy);

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testdebugproto.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testdebugproto.c b/lib/c_glib/test/testdebugproto.c
index e343c1e..703dff0 100644
--- a/lib/c_glib/test/testdebugproto.c
+++ b/lib/c_glib/test/testdebugproto.c
@@ -864,7 +864,7 @@ test_services_inherited (void)
 int
 main(int argc, char *argv[])
 {
-#if (GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 36)
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init ();
 #endif
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testframedtransport.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testframedtransport.c b/lib/c_glib/test/testframedtransport.c
index 843ad93..7261ff5 100755
--- a/lib/c_glib/test/testframedtransport.c
+++ b/lib/c_glib/test/testframedtransport.c
@@ -19,6 +19,7 @@
 
 #include <assert.h>
 #include <netdb.h>
+#include <sys/wait.h>
 
 #include <thrift/c_glib/transport/thrift_transport.h>
 #include <thrift/c_glib/transport/thrift_socket.h>
@@ -271,7 +272,10 @@ thrift_server (const int port)
 int
 main(int argc, char *argv[])
 {
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init();
+#endif
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/testframedtransport/CreateAndDestroy", test_create_and_destroy);

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testmemorybuffer.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testmemorybuffer.c b/lib/c_glib/test/testmemorybuffer.c
index 7169a5c..5c75273 100755
--- a/lib/c_glib/test/testmemorybuffer.c
+++ b/lib/c_glib/test/testmemorybuffer.c
@@ -84,7 +84,10 @@ test_read_and_write(void)
 int
 main(int argc, char *argv[])
 {
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init();
+#endif
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/testmemorybuffer/CreateAndDestroy", test_create_and_destroy);

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testoptionalrequired.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testoptionalrequired.c b/lib/c_glib/test/testoptionalrequired.c
index 2839dd4..931d8be 100755
--- a/lib/c_glib/test/testoptionalrequired.c
+++ b/lib/c_glib/test/testoptionalrequired.c
@@ -190,7 +190,10 @@ test_tricky4 (void)
 int
 main(int argc, char *argv[])
 {
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init();
+#endif
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/testoptionalrequired/OldSchool", test_old_school1);

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testsimpleserver.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testsimpleserver.c b/lib/c_glib/test/testsimpleserver.c
index 92629b4..cb270b4 100755
--- a/lib/c_glib/test/testsimpleserver.c
+++ b/lib/c_glib/test/testsimpleserver.c
@@ -106,7 +106,10 @@ test_server (void)
 int
 main(int argc, char *argv[])
 {
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init();
+#endif
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/testsimpleserver/SimpleServer", test_server);

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/teststruct.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/teststruct.c b/lib/c_glib/test/teststruct.c
index 182a6ac..a1b3cc0 100755
--- a/lib/c_glib/test/teststruct.c
+++ b/lib/c_glib/test/teststruct.c
@@ -92,7 +92,10 @@ test_initialize_object (void)
 int
 main(int argc, char *argv[])
 {
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init();
+#endif
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/teststruct/InitializeObject", test_initialize_object);

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testthrifttest.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testthrifttest.c b/lib/c_glib/test/testthrifttest.c
index a42d089..5f0f6e3 100755
--- a/lib/c_glib/test/testthrifttest.c
+++ b/lib/c_glib/test/testthrifttest.c
@@ -8,7 +8,7 @@ static const char TEST_ADDRESS[] = "localhost";
 static const int TEST_PORT = 64444;
 
 static void
-test_thrift_server (const int port)
+test_thrift_server (void)
 {
   ThriftServerSocket *tsocket = g_object_new (THRIFT_TYPE_SERVER_SOCKET,
                                               "port", TEST_PORT, NULL);
@@ -19,7 +19,10 @@ test_thrift_server (const int port)
 int
 main(int argc, char *argv[])
 {
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init();
+#endif
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/testthrift/Server", test_thrift_server);

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testthrifttestclient.cpp
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp
index d387396..faf81db 100755
--- a/lib/c_glib/test/testthrifttestclient.cpp
+++ b/lib/c_glib/test/testthrifttestclient.cpp
@@ -354,8 +354,10 @@ test_thrift_client (void)
   TTestXception *xception = NULL;
   TTestXception2 *xception2 = NULL;
 
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   // initialize gobject
   g_type_init ();
+#endif
 
   // create a C client
   tsocket = (ThriftSocket *) g_object_new (THRIFT_TYPE_SOCKET, 

http://git-wip-us.apache.org/repos/asf/thrift/blob/1c190278/lib/c_glib/test/testtransportsocket.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/test/testtransportsocket.c b/lib/c_glib/test/testtransportsocket.c
index 08cad1c..bb1d47c 100755
--- a/lib/c_glib/test/testtransportsocket.c
+++ b/lib/c_glib/test/testtransportsocket.c
@@ -310,7 +310,10 @@ thrift_socket_server (const int port)
 int
 main(int argc, char *argv[])
 {
+#if (!GLIB_CHECK_VERSION (2, 36, 0))
   g_type_init();
+#endif
+
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/testtransportsocket/CreateAndDestroy", test_create_and_destroy);


[2/3] thrift git commit: THRIFT-3264 Fix Erlang 16 namespaced types Client: Erlang Patch: Nobuaki Sukegawa

Posted by je...@apache.org.
THRIFT-3264 Fix Erlang 16 namespaced types
Client: Erlang
Patch: Nobuaki Sukegawa <ns...@gmail.com>

This closes #566


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/57ac33ea
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/57ac33ea
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/57ac33ea

Branch: refs/heads/master
Commit: 57ac33ea1a42e871ef03a7bda770a7ba16745ead
Parents: 8c5fce9
Author: Jens Geyer <je...@apache.org>
Authored: Tue Jul 28 23:12:10 2015 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Tue Jul 28 23:12:52 2015 +0200

----------------------------------------------------------------------
 compiler/cpp/src/generate/t_erl_generator.cc | 18 ++++++++++++++++--
 configure.ac                                 |  7 +++++++
 lib/erl/Makefile.am                          | 11 +++++++++--
 lib/erl/rebar.config                         |  2 +-
 lib/erl/test/test_thrift_3214.erl            |  2 ++
 5 files changed, 35 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/57ac33ea/compiler/cpp/src/generate/t_erl_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_erl_generator.cc b/compiler/cpp/src/generate/t_erl_generator.cc
index 8af5da2..c066636 100644
--- a/compiler/cpp/src/generate/t_erl_generator.cc
+++ b/compiler/cpp/src/generate/t_erl_generator.cc
@@ -56,6 +56,10 @@ public:
 
     legacy_names_ = (parsed_options.find("legacynames") != parsed_options.end());
     maps_ = (parsed_options.find("maps") != parsed_options.end());
+    otp16_ = (parsed_options.find("otp16") != parsed_options.end());
+    if (maps_ && otp16_) {
+      throw "argument error: Cannot specify both maps and otp16; maps are not available for Erlang/OTP R16 or older";
+    }
   }
 
   /**
@@ -156,6 +160,9 @@ private:
   /* if true use maps instead of dicts in generated code */
   bool maps_;
 
+  /* if true use non-namespaced dict and set instead of dict:dict and sets:set */
+  bool otp16_;
+
   /**
    * add function to export list
    */
@@ -527,11 +534,17 @@ string t_erl_generator::render_member_type(t_field* field) {
   } else if (type->is_map()) {
     if (maps_) {
       return "#{}";
+    } else if (otp16_) {
+      return "dict()";
     } else {
       return "dict:dict()";
     }
   } else if (type->is_set()) {
-    return "sets:set()";
+    if (otp16_) {
+      return "set()";
+    } else {
+      return "sets:set()";
+    }
   } else if (type->is_list()) {
     return "list()";
   } else {
@@ -1027,4 +1040,5 @@ THRIFT_REGISTER_GENERATOR(
     erl,
     "Erlang",
     "    legacynames: Output files retain naming conventions of Thrift 0.9.1 and earlier.\n"
-    "    maps:        Generate maps instead of dicts.\n")
+    "    maps:        Generate maps instead of dicts.\n"
+    "    otp16:       Generate non-namespaced dict and set instead of dict:dict and sets:set.\n")

http://git-wip-us.apache.org/repos/asf/thrift/blob/57ac33ea/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 9af7f65..0a3fd43 100755
--- a/configure.ac
+++ b/configure.ac
@@ -231,9 +231,16 @@ if test "$with_erlang" = "yes";  then
   fi
   if test -n "$ERL" -a -n "$ERLC" ; then
     have_erlang="yes"
+
+    # otp_release is simply a number (like "17") for OTP17+ while "R16..." for OTP16 or less.
+    # OTP version is currently only used for running tests.
+    if $ERL -eval 'erlang:display(erlang:system_info(otp_release)),halt().' -noshell | grep "^\"R" >/dev/null; then
+      erlang_otp16_or_less="yes"
+    fi
   fi
 fi
 AM_CONDITIONAL(WITH_ERLANG, [test "$have_erlang" = "yes"])
+AM_CONDITIONAL(ERLANG_OTP16, [test "$erlang_otp16_or_less" = "yes"])
 
 AX_THRIFT_LIB(nodejs, [Nodejs], yes)
 have_nodejs=no

http://git-wip-us.apache.org/repos/asf/thrift/blob/57ac33ea/lib/erl/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/erl/Makefile.am b/lib/erl/Makefile.am
index 1f65a24..f48ff0a 100644
--- a/lib/erl/Makefile.am
+++ b/lib/erl/Makefile.am
@@ -21,12 +21,19 @@ THRIFT = ../../compiler/cpp/thrift
 THRIFT_FILES = $(wildcard test/*.thrift) \
 		  ../../test/ThriftTest.thrift
 
-.generated: $(THRIFT_FILES)
+if ERLANG_OTP16
+.generated: $(THRIFT) $(THRIFT_FILES)
 	for f in $(THRIFT_FILES) ; do \
-	  $(THRIFT) --gen erl -o test $$f ; \
+		$(THRIFT) --gen erl:otp16 -o test $$f ; \
+	done ;
+else
+.generated: $(THRIFT) $(THRIFT_FILES)
+	for f in $(THRIFT_FILES) ; do \
+		$(THRIFT) --gen erl -o test $$f ; \
 	done ; \
 	$(THRIFT) --gen erl:maps -o test test/Thrift3214.thrift ; \
 	touch .generated
+endif
 
 all: .generated
 	./rebar get-deps

http://git-wip-us.apache.org/repos/asf/thrift/blob/57ac33ea/lib/erl/rebar.config
----------------------------------------------------------------------
diff --git a/lib/erl/rebar.config b/lib/erl/rebar.config
index 0f5d40e..1ea18a4 100644
--- a/lib/erl/rebar.config
+++ b/lib/erl/rebar.config
@@ -1 +1 @@
-{erl_opts, [debug_info]}.
+{erl_opts, [{platform_define, "^R.*", otp16_or_less}, debug_info]}.

http://git-wip-us.apache.org/repos/asf/thrift/blob/57ac33ea/lib/erl/test/test_thrift_3214.erl
----------------------------------------------------------------------
diff --git a/lib/erl/test/test_thrift_3214.erl b/lib/erl/test/test_thrift_3214.erl
index 118e779..0f9544b 100644
--- a/lib/erl/test/test_thrift_3214.erl
+++ b/lib/erl/test/test_thrift_3214.erl
@@ -23,6 +23,7 @@
 -include("gen-erl/thrift3214_types.hrl").
 
 -ifdef(TEST).
+-ifndef(otp16_or_less).
 -include_lib("eunit/include/eunit.hrl").
 
 record_generation_test_() ->
@@ -56,3 +57,4 @@ struct_info_test_() ->
   ].
 
 -endif.
+-endif.