summaryrefslogtreecommitdiffstats
path: root/test/ext/vapi_c_test.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-09-29 12:36:37 +0200
committerKlement Sekera <ksekera@cisco.com>2017-09-29 12:59:19 +0200
commitd3e671e0dbb879d90f00bdee608ee0bb5f6357ae (patch)
treeeec07bfa10a2789a469c8d629104173bef4a39bf /test/ext/vapi_c_test.c
parent0ff5c563d5048991dbd02a3892dccde8305a7e30 (diff)
make test: fix/disable VAPI tests on centos
Workaround old `check' library on centos. Disable building/running of C++ VAPI test as centos's gcc can't compile our C++ code (vapi.hpp) due to bug. Change-Id: If9da9c7f1bc076f7cdfb9bd3016dfe60a08afa36 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/ext/vapi_c_test.c')
-rw-r--r--test/ext/vapi_c_test.c12
1 files changed, 11 insertions, 1 deletions
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;