Fix binlogrouter test
The test used the wrong working directory. blr_slave.c didn't check the input for NULL values.
This commit is contained in:
@ -4540,7 +4540,7 @@ blr_get_parsed_command_value(char *input)
|
|||||||
char *word;
|
char *word;
|
||||||
char *value = NULL;
|
char *value = NULL;
|
||||||
|
|
||||||
if (strlen(input))
|
if (input && strlen(input))
|
||||||
{
|
{
|
||||||
value = strdup(input);
|
value = strdup(input);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
if(BUILD_TESTS)
|
if(BUILD_TESTS)
|
||||||
add_executable(testbinlogrouter testbinlog.c ../blr.c ../blr_slave.c ../blr_master.c ../blr_file.c ../blr_cache.c)
|
add_executable(testbinlogrouter testbinlog.c ../blr.c ../blr_slave.c ../blr_master.c ../blr_file.c ../blr_cache.c)
|
||||||
target_link_libraries(testbinlogrouter maxscale-common ${PCRE_LINK_FLAGS} uuid)
|
target_link_libraries(testbinlogrouter maxscale-common ${PCRE_LINK_FLAGS} uuid)
|
||||||
add_test(TestBinlogRouter ${CMAKE_CURRENT_BINARY_DIR}/testbinlogrouter)
|
add_test(NAME TestBinlogRouter COMMAND ./testbinlogrouter WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user