From c29a40c2ffe48e174f1c212ac715b528693f3edc Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Tue, 22 May 2012 14:53:15 -0400 Subject: Adding tests/ directory to CMake build --- tests/CMakeLists.txt | 10 ++++++++++ tests/test_tables.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tests/CMakeLists.txt (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..93ccb9a --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,10 @@ +include_directories(${LIBRABBITMQ_INCLUDE_DIRS}) + +add_executable(test_parse_url test_parse_url.c) +target_link_libraries(test_parse_url rabbitmq) +add_test(parse_url test_parse_url) + +add_executable(test_tables test_tables.c) +target_link_libraries(test_tables rabbitmq) +add_test(tables test_tables) +configure_file(test_tables.expected ${CMAKE_CURRENT_BINARY_DIR}/tests/test_tables.expected COPY_ONLY) diff --git a/tests/test_tables.c b/tests/test_tables.c index e4b0f43..659db53 100644 --- a/tests/test_tables.c +++ b/tests/test_tables.c @@ -446,7 +446,7 @@ int main(void) test_dump_value(out); if (srcdir == NULL) - srcdir = "tests"; + srcdir = "."; expected_path = malloc(strlen(srcdir) + strlen(expected_file_name) + 2); sprintf(expected_path, "%s/%s", srcdir, expected_file_name); -- cgit v1.2.1