Skip to content

Commit

Permalink
travis: output testbench detail result
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerhards committed Nov 30, 2016
1 parent 02edc6d commit 7e29d33
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ install:
- sh autogen.sh

before_script:
- sudo apt-get -qq --force-yes install valgrind
- sudo add-apt-repository ppa:adiscon/$AD_PPA -y
- sudo apt-get update -qq
- sudo apt-get -qq --force-yes install valgrind libfastjson
- # note: valgrind is only available on Linux
- if [ "$CC" == "gcc" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then export ENA_VG="--enable-valgrind"; fi
- if [ "$CC" == "clang" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then export SANITIZER="-fsanitize=address" ; fi
Expand All @@ -42,5 +44,6 @@ script:
- valgrind --tool=callgrind ls
- export VERBOSE=1
- make check
- cat tests/test-suite.log
- cat tests/perf_to_string.trs
- make distcheck
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ AC_ARG_ENABLE(performance_testbench,
[enable_performance_testbench="no"]
)
if test "$enable_performance_testbench" = "yes"; then
AC_CHECK_PROG(VALGRIND, [valgrind], [valgrind], [no])
if test "x$VALGRIND" = "xno"; then
AC_CHECK_PROG(VALGRIND_CALLGRIND, [valgrind], [valgrind], [no])
if test "x$VALGRIND_CALLGRIND" = "xno"; then
AC_MSG_ERROR([--enable-performance-testbench given, but valgrind is not present on system])
fi
fi
Expand Down
9 changes: 5 additions & 4 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ check_PROGRAMS += $(TESTS:.test=)

# some programs that do internal checking
check_PROGRAMS += chk_version \
cr_obj_multi \
perf_to_string
cr_obj_multi

TESTS += chk_version

Expand Down Expand Up @@ -62,9 +61,10 @@ test_object_object_add_exFormatted_SOURCES = test_object_object_add_ex.c parse_f
test_object_object_add_exFormatted_CPPFLAGS = -DTEST_FORMATTED

# performancebaseline tests
# TODO: guard via configure switch! -- rgerhards, 2016-11-29
if ENABLE_PERFORMANCE_TESTBENCH
check_PROGRAMS += perf_to_string
TESTS += perf_to_string.test

endif


EXTRA_DIST=
Expand Down Expand Up @@ -97,6 +97,7 @@ EXTRA_DIST += test_object_object_add_exFormatted_pretty.expected
EXTRA_DIST += test_object_object_add_exFormatted_spaced.expected
EXTRA_DIST += test_many_subobj.expected
EXTRA_DIST += test_obj_obj_get_ex-null.expected
EXTRA_DIST += perf_to_string.c

testsubdir=testSubDir
TESTS_ENVIRONMENT = top_builddir=$(top_builddir)
1 change: 1 addition & 0 deletions tests/perf_to_string.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ valgrind --tool=callgrind --callgrind-out-file=callgrind.out .libs/perf_to_strin
if [ $? -ne 0 ]; then
echo "Error obtaining performance baseline, assuming system is not able to"
echo "support this test - skipping"
rm callgrind.out
exit 77
fi
export RETCODE=$?
Expand Down

0 comments on commit 7e29d33

Please sign in to comment.