Skip to content

Commit

Permalink
Use canonical Automake test harness
Browse files Browse the repository at this point in the history
* To run the full test suite:
  make check TESTS=all-tests
  • Loading branch information
SoapGentoo authored and dbry committed Apr 26, 2021
1 parent 58865dd commit d4f7fd2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ before_install:
script:
- if [[ "${BUILD_SYSTEM}" == "cmake" ]]; then mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON && cmake --build . && cpack -G ZIP && ctest -V; fi
- if [[ "${BUILD_SYSTEM}" == "autotools" && "${TRAVIS_OS_NAME}" == "linux" && "${CC_FOR_BUILD}" == "clang" ]]; then ./build-regressors.sh && ./run-regressors.sh; fi
- if [[ "${BUILD_SYSTEM}" == "autotools" && ( "${TRAVIS_OS_NAME}" != "linux" || "${CC_FOR_BUILD}" != "clang" ) ]]; then ./autogen.sh --enable-tests && make && cli/wvtest --exhaustive --short --no-extras; fi
- if [[ "${BUILD_SYSTEM}" == "autotools" && ( "${TRAVIS_OS_NAME}" != "linux" || "${CC_FOR_BUILD}" != "clang" ) ]]; then ./autogen.sh && make distcheck; fi
7 changes: 4 additions & 3 deletions cli/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ wvtag_LDFLAGS = -rpath $(libdir)
endif
wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/libwavpack.la $(LIBM) $(ICONV_LIBS)

if ENABLE_TESTS
bin_PROGRAMS += wvtest
check_PROGRAMS = wvtest
wvtest_SOURCES = wvtest.c md5.c
wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
if ENABLE_RPATH
wvtest_LDFLAGS = -rpath $(libdir)
endif
wvtest_LDADD = $(AM_LDADD) $(top_builddir)/src/libwavpack.la $(LIBM) -lpthread
endif

TESTS = fast-tests
TESTS_ENVIRONMENT = $(SHELL)

noinst_HEADERS = \
win32_unicode_support.h \
Expand Down
2 changes: 2 additions & 0 deletions cli/all-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set -e
./wvtest --default
2 changes: 2 additions & 0 deletions cli/fast-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set -e
./wvtest --exhaustive --short --no-extras
11 changes: 5 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

AC_INIT(wavpack, 5.4.0, [email protected])
AC_CONFIG_SRCDIR([src/pack.c])
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE([serial-tests])
AM_MAINTAINER_MODE

LIBWAVPACK_MAJOR=5
Expand Down Expand Up @@ -148,11 +148,6 @@ AC_ARG_ENABLE([rpath],

AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"])

AC_ARG_ENABLE([tests],
AS_HELP_STRING([--enable-tests], [build libwavpack test program (requires Pthreads)]))

AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"])

AC_ARG_ENABLE([asm],
[AS_HELP_STRING([--disable-asm], [disable assembly optimizations])],,
[enable_asm=check])
Expand Down Expand Up @@ -216,6 +211,10 @@ fi

AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)

AC_CONFIG_LINKS([
cli/all-tests:cli/all-tests
cli/fast-tests:cli/fast-tests
])
AC_CONFIG_FILES(
Makefile
wavpack.pc
Expand Down

0 comments on commit d4f7fd2

Please sign in to comment.