From a5ce8b6e080d30fc27dde15fbabab99c4909ea16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ChangZhuo=20Chen=20=28=E9=99=B3=E6=98=8C=E5=80=AC=29?= Date: Wed, 21 May 2014 18:18:18 +0800 Subject: [PATCH 1/4] Add address sanitizer build to travis-ci --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index c7a1ad4..06e6e04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ matrix: env: CONFIGURE_OPTION='--enable-debug' COVERALLS=yes VALGRIND=no - compiler: gcc env: CONFIGURE_OPTION='--enable-debug' COVERALLS=yes VALGRIND=yes LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ + - compiler: clang + env: ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.4 CFLAGS='-fsanitize=address -g -O1' install: - sudo apt-get update -qq From bd95ce9355f1506eb02e20a6f7ae44107de71847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ChangZhuo=20Chen=20=28=E9=99=B3=E6=98=8C=E5=80=AC=29?= Date: Wed, 21 May 2014 19:44:46 +0800 Subject: [PATCH 2/4] Set llvm-symbolizer path --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 06e6e04..112a81c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ matrix: - compiler: gcc env: CONFIGURE_OPTION='--enable-debug' COVERALLS=yes VALGRIND=yes LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ - compiler: clang - env: ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.4 CFLAGS='-fsanitize=address -g -O1' + env: ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=/usr/local/clang-3.4/bin/llvm-symbolizer CFLAGS='-fsanitize=address -g -O1' install: - sudo apt-get update -qq From 291e6add6bbddbd8f3bfb88a2aba95d3a2ccdd49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ChangZhuo=20Chen=20=28=E9=99=B3=E6=98=8C=E5=80=AC=29?= Date: Thu, 22 May 2014 12:01:27 +0800 Subject: [PATCH 3/4] Use verbose make --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 112a81c..1c6a808 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,9 +25,9 @@ before_script: script: - ./autogen.sh - ./configure $CONFIGURE_OPTION - - make + - make V=1 - sudo make install - - if [ "x$VALGRIND" == xyes ]; then make check > /dev/null 2>&1; else make check; fi + - if [ "x$VALGRIND" == xyes ]; then make check > /dev/null 2>&1; else make check V=1; fi - if [ "x$VALGRIND" == xyes ]; then valgrind ./tests/.libs/* -v --trace-children=yes --show-leak-kinds=full --leak-check=full; fi after_success: From fef3361ed2085f88140671678608030d80b23d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ChangZhuo=20Chen=20=28=E9=99=B3=E6=98=8C=E5=80=AC=29?= Date: Thu, 22 May 2014 22:06:11 +0800 Subject: [PATCH 4/4] Set test timeout to 30 --- tests/check_slug.c | 1 + tests/check_tree.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/check_slug.c b/tests/check_slug.c index 88b11e6..06567b7 100644 --- a/tests/check_slug.c +++ b/tests/check_slug.c @@ -97,6 +97,7 @@ END_TEST Suite* r3_suite (void) { Suite *suite = suite_create("slug test"); TCase *tcase = tcase_create("test_slug"); + tcase_set_timeout(tcase, 30); tcase_add_test(tcase, test_contains_slug); tcase_add_test(tcase, test_inside_slug); tcase_add_test(tcase, test_find_slug_pattern); diff --git a/tests/check_tree.c b/tests/check_tree.c index 72af3e1..ee2370d 100644 --- a/tests/check_tree.c +++ b/tests/check_tree.c @@ -736,6 +736,7 @@ Suite* r3_suite (void) { Suite *suite = suite_create("blah"); TCase *tcase = tcase_create("testcase"); + tcase_set_timeout(tcase, 30); tcase_add_test(tcase, test_r3_node_construct_and_free); tcase_add_test(tcase, test_str_array); tcase_add_test(tcase, test_ltrim_slash);