Simplify continuous-integration build
[ric-plt/lib/rmr.git] / test / rmr_nng_test.c
index 1ebdb94..c9d9a6a 100644 (file)
@@ -8,7 +8,7 @@
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
 
    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
+          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,
 
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
@@ -51,6 +51,8 @@
 #include <stdint.h>
 #include <ctype.h>
 #include <sys/epoll.h>
 #include <stdint.h>
 #include <ctype.h>
 #include <sys/epoll.h>
+#include <pthread.h>
+#include <semaphore.h>
 
 #define DEBUG 1
 
 
 #define DEBUG 1
 
 #include "test_nng_em.c"                                                       // nng/nn emulation (before including things under test)
 
 
 #include "test_nng_em.c"                                                       // nng/nn emulation (before including things under test)
 
 
-#include "../src/common/include/rmr.h"                                 // things the users see
-#include "../src/common/include/rmr_symtab.h"
-#include "../src/common/include/rmr_agnostic.h"                        // transport agnostic header
-#include "../src/nng/include/rmr_nng_private.h"                        // transport specific
+#include "rmr.h"                                       // things the users see
+#include "rmr_symtab.h"
+#include "rmr_agnostic.h"                      // transport agnostic header
+#include "rmr_nng_private.h"                   // transport specific
 
 
-#include "../src/common/src/symtab.c"
-#include "../src/nng/src/rmr_nng.c"
+#include "symtab.c"
+#include "rmr_nng.c"
+#include "mbuf_api.c"
 
 static void gen_rt( uta_ctx_t* ctx );          // defined in sr_nng_static_test, but used by a few others (eliminate order requirement below)
 
 
 static void gen_rt( uta_ctx_t* ctx );          // defined in sr_nng_static_test, but used by a few others (eliminate order requirement below)
 
@@ -84,6 +87,7 @@ static void gen_rt( uta_ctx_t* ctx );         // defined in sr_nng_static_test, but use
 #include "sr_nng_static_test.c"
 #include "wormhole_static_test.c"
 #include "rmr_nng_api_static_test.c"
 #include "sr_nng_static_test.c"
 #include "wormhole_static_test.c"
 #include "rmr_nng_api_static_test.c"
+#include "mbuf_api_static_test.c"
 
 
 /*
 
 
 /*
@@ -110,6 +114,10 @@ int main() {
 
        fprintf( stderr, "<INFO> starting RMr API tests\n" );
        errors += rmr_api_test();
 
        fprintf( stderr, "<INFO> starting RMr API tests\n" );
        errors += rmr_api_test();
+
+       fprintf( stderr, "<INFO> run RMr API tests with src name only env var set\n" );
+       setenv( "RMR_SRC_NAMEONLY", "1", 1 );
+       errors += rmr_api_test();
        fprintf( stderr, "<INFO> error count: %d\n", errors );
 
        fprintf( stderr, "<INFO> starting wormhole tests\n" );
        fprintf( stderr, "<INFO> error count: %d\n", errors );
 
        fprintf( stderr, "<INFO> starting wormhole tests\n" );
@@ -120,6 +128,10 @@ int main() {
        errors += sr_nng_test();                                // test the send/receive static functions
        fprintf( stderr, "<INFO> error count: %d\n", errors );
 
        errors += sr_nng_test();                                // test the send/receive static functions
        fprintf( stderr, "<INFO> error count: %d\n", errors );
 
+       fprintf( stderr, "<INFO> starting mbuf api tests\n" );
+       errors +=  mbuf_api_test( );
+       fprintf( stderr, "<INFO> error count: %d\n", errors );
+
        if( errors == 0 ) {
                fprintf( stderr, "<PASS> all tests were OK\n" );
        } else {
        if( errors == 0 ) {
                fprintf( stderr, "<PASS> all tests were OK\n" );
        } else {