Merge pull request #188 from selvamKrish/fix_build

Fix for parodus compile error in test_token when seshat is enabled #187
This commit is contained in:
bill1600
2018-04-12 13:35:38 -07:00
committed by GitHub
2 changed files with 20 additions and 4 deletions

View File

@@ -258,9 +258,22 @@ set(TOKEN_SRC ../src/conn_interface.c ../src/config.c
../src/networking.c
../src/thread_tasks.c ../src/time.c
../src/string_helpers.c ../src/mutex.c
../src/seshat_interface.c ../src/token.c
../src/token.c
)
add_executable(test_token test_token.c ${TOKEN_SRC} )
if (ENABLE_SESHAT)
set(TOKEN_SRC ${TOKEN_SRC} ../src/seshat_interface.c)
else()
set(TOKEN_SRC ${TOKEN_SRC} ../src/seshat_interface_stub.c)
endif (ENABLE_SESHAT)
if (FEATURE_DNS_QUERY)
set(TOKEN_SRC test_token.c ${TOKEN_SRC})
else()
set(TOKEN_SRC test_token_stub.c ${TOKEN_SRC})
endif (FEATURE_DNS_QUERY)
add_executable(test_token ${TOKEN_SRC} )
#target_link_libraries (test_token ${PARODUS_COMMON_LIBS} ${PARODUS_JWT_LIBS} -lcmocka )
target_link_libraries (test_token ${PARODUS_COMMON_LIBS} -lcmocka )

View File

@@ -33,8 +33,11 @@
void test_allow_insecure_conn ()
{
int insecure;
insecure = allow_insecure_conn ();
assert_int_equal (insecure, 1);
char *server_Address = NULL;
char *port = NULL;
insecure = allow_insecure_conn (server_Address,(int) sizeof(server_Address),
port, (int) sizeof(port));
assert_int_equal (insecure, -1);
}
/*----------------------------------------------------------------------------*/