First few fixes for make check (#250)

This commit is contained in:
Steffen Dettmer
2020-04-09 17:43:51 +02:00
parent 6c0947c86e
commit c2b5b71777
5 changed files with 24 additions and 9 deletions

1
.gitignore vendored
View File

@@ -27,3 +27,4 @@ Makefile.in
.libs/
*.l[ao]
compile
test-driver

View File

@@ -14,3 +14,4 @@ script:
- FAKETIME_COMPILE_CFLAGS="-DFORCE_MONOTONIC_FIX" make
- cd test
- make test
- make distcheck

View File

@@ -3,8 +3,18 @@ AM_CPPFLAGS =-DFAKE_SLEEP -DFAKE_INTERNAL_CALLS -I@top_srcdir@/src
AM_CFLAGS =
AM_LDFLAGS =
bin_PROGRAMS = timetest
# functests.sh fail for me, test.sh hangs for me.
# TESTS = test.sh functests.sh
check_PROGRAMS = timetest
timetest_SOURCES = timetest.c
check_SCRIPTS = functests.sh testframe.sh test.sh
EXTRA_DIST = $(check_SCRIPTS) \
functests/common.inc \
functests/dont_test_false.sh \
functests/test_exclude_mono.sh \
functests/test_null.sh \
functests/test_true.sh \
functests/test_walkone.sh
if SOLARIS
AM_CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
@@ -16,10 +26,4 @@ if !MACOS
timetest_LDADD = -ldl -lm -lrt -lpthread
endif
test: timetest functest
@echo
@./test.sh
#
# run functional tests
functest:
./testframe.sh functests

7
test/functests.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
set -e
[ "${srcdir}" ] || srcdir=.
# run functional tests
# cd "${srcdir}/"
${srcdir}/testframe.sh ${srcdir}/functests

View File

@@ -6,6 +6,8 @@
# see README.testframe.txt for details.
#
testframedir="${BASH_SOURCE%/*}"
# echo labelled error/warning message to stderr
report()
{
@@ -33,7 +35,7 @@ run_testsuite()
# add testsuite dir to PATH for convenience
typeset dir=$(dirname $testsuite)
PATH=$dir:$PATH
. testframe.inc
. $testframedir/testframe.inc
if [ -f $dir/common.inc ]; then
. $dir/common.inc
fi