aboutsummaryrefslogtreecommitdiffstats
path: root/test/ext
diff options
context:
space:
mode:
Diffstat (limited to 'test/ext')
-rw-r--r--test/ext/Makefile4
-rw-r--r--test/ext/vapi_c_test.c12
2 files changed, 15 insertions, 1 deletions
diff --git a/test/ext/Makefile b/test/ext/Makefile
index 6b3cb907f76..6436302f731 100644
--- a/test/ext/Makefile
+++ b/test/ext/Makefile
@@ -2,6 +2,10 @@ BINDIR = $(BR)/vapi_test/
CBIN = $(addprefix $(BINDIR), vapi_c_test)
CPPBIN = $(addprefix $(BINDIR), vapi_cpp_test)
+ifeq ($(filter centos,$(OS_ID)),$(OS_ID))
+CPPBIN=
+endif
+
LIBS = -L$(VPP_TEST_BUILD_DIR)/vpp/.libs/ -L$(VPP_TEST_BUILD_DIR)/vpp/vpp-api/vapi/.libs/ -lvppinfra -lvlibmemoryclient -lsvm -lpthread -lcheck -lsubunit -lrt -lm -lvapiclient
CFLAGS = -std=gnu99 -g -Wall -pthread -I$(WS_ROOT)/src -I$(VPP_TEST_INSTALL_PATH)/vpp/include -I$(BINDIR)
CPPFLAGS = -std=c++11 -g -Wall -pthread -I$(WS_ROOT)/src -I$(VPP_TEST_INSTALL_PATH)/vpp/include -I$(BINDIR)
diff --git a/test/ext/vapi_c_test.c b/test/ext/vapi_c_test.c
index 622b617b394..ad75ad6e8b8 100644
--- a/test/ext/vapi_c_test.c
+++ b/test/ext/vapi_c_test.c
@@ -40,6 +40,16 @@ static char *api_prefix = NULL;
static const int max_outstanding_requests = 64;
static const int response_queue_size = 32;
+/* centos has ancient check so we hack our way around here
+ * to make it work somehow */
+#ifndef ck_assert_ptr_eq
+#define ck_assert_ptr_eq(X,Y) ck_assert_int_eq((long)X, (long)Y)
+#endif
+
+#ifndef ck_assert_ptr_ne
+#define ck_assert_ptr_ne(X,Y) ck_assert_int_ne((long)X, (long)Y)
+#endif
+
START_TEST (test_invalid_values)
{
vapi_ctx_t ctx;
@@ -571,7 +581,7 @@ sw_interface_dump_cb (struct vapi_ctx_s *ctx, void *callback_ctx,
}
else
{
- ck_assert (reply);
+ ck_assert (NULL != reply);
printf ("Interface dump entry: [%u]: %s\n", reply->sw_if_index,
reply->interface_name);
size_t i = 0;