Disabled RT tests when unavailable

This commit is contained in:
Snaipe 2015-04-12 23:31:16 +02:00
parent e5ebb64bb8
commit 77c5e43140
2 changed files with 8 additions and 1 deletions

View file

@ -22,6 +22,11 @@ AC_SUBST([LIBTOOL_DEPS])
AC_FUNC_FNMATCH
enable_rt_tests="no"
AC_CHECK_LIB([rt], [clock_gettime], [enable_rt_tests="yes"])
AM_CONDITIONAL([ENABLE_RT_TESTS], [test "x$enable_rt_tests" != "xno"])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.18])

View file

@ -8,7 +8,6 @@ BIN_TESTS = \
long-messages \
description \
other-crashes \
with-time \
simple
TESTS_ENVIRONMENT = CRITERION_ALWAYS_SUCCEED=1
@ -17,7 +16,10 @@ check_PROGRAMS := $(BIN_TESTS)
CFLAGS = -I$(top_srcdir)/include/ -std=c99 -Wall -Wextra -pedantic
LDADD = -L$(top_srcdir)/ -lcriterion
if ENABLE_RT_TESTS
BIN_TESTS += with-time
with_time_LDADD = $(LDADD) -lrt
endif
SCRIPT_TESTS = tests/tap_test.sh \
tests/early_exit.sh \