Skip to content

Commit

Permalink
add simple 'make check' script
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Feb 26, 2015
1 parent b051ff8 commit f75d861
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ copyright.h
# programs
sines
harminv

# test output
*.log
*.trs
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pkgconfig_DATA = harminv.pc

ACLOCAL_AMFLAGS=-I m4

EXTRA_DIST = COPYRIGHT harminv.pc.in acx_blas.m4 acx_lapack.m4
EXTRA_DIST = COPYRIGHT harminv.pc.in m4 sines-test.sh

libharminv_la_SOURCES = harminv.c harminv.h harminv-int.h check.h
libharminv_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
Expand All @@ -21,6 +21,8 @@ sines_SOURCES = sines.c

BUILT_SOURCES = copyright.h

TESTS = sines-test.sh

# Generate built sources only in maintainer mode
if MAINTAINER_MODE

Expand Down
4 changes: 4 additions & 0 deletions sines-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
set -e

test x"`./sines 0.1+0.01i 0.08+0.001i | ./harminv 0.05-0.15 | cut -d, -f1-2 | tr '\n' /`" = x"frequency, decay constant/0.08, 1.000000e-03/0.1, 1.000000e-02/"

0 comments on commit f75d861

Please sign in to comment.