make test: run self tests
This commit is contained in:
parent
e1b8082e4c
commit
32141d17d9
|
@ -14,7 +14,7 @@ INCLUDES = $(DEPS_CFLAGS)
|
|||
|
||||
bin_PROGRAMS = minimodem
|
||||
|
||||
EXTRA_DIST = self-test # run-test
|
||||
EXTRA_DIST = self-test self-test-baudot.txt # run-test
|
||||
|
||||
|
||||
SIMPLEAUDIO_SRC = \
|
||||
|
@ -33,3 +33,15 @@ minimodem_LDADD = $(DEPS_LIBS)
|
|||
minimodem_SOURCES = minimodem.c $(BAUDOT_SRC) $(FSK_SRC) $(SIMPLEAUDIO_SRC)
|
||||
|
||||
|
||||
test:
|
||||
for file in simpleaudio.[ch] ; \
|
||||
do { for rate in 1200 300 50; \
|
||||
do ./self-test $$rate $$file || exit; \
|
||||
done }; \
|
||||
done
|
||||
./self-test rtty self-test-baudot.txt
|
||||
[ ! -f ./run-test ] || ./run-test
|
||||
@echo
|
||||
@echo "minimodem: ALL TESTS PASS"
|
||||
@echo
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ top_builddir = @top_builddir@
|
|||
top_srcdir = @top_srcdir@
|
||||
AM_CFLAGS = -Wall -Werror
|
||||
INCLUDES = $(DEPS_CFLAGS)
|
||||
EXTRA_DIST = self-test # run-test
|
||||
EXTRA_DIST = self-test self-test-baudot.txt # run-test
|
||||
SIMPLEAUDIO_SRC = \
|
||||
simpleaudio.h \
|
||||
simpleaudio_internal.h \
|
||||
|
@ -481,6 +481,18 @@ uninstall-am: uninstall-binPROGRAMS
|
|||
uninstall-am uninstall-binPROGRAMS
|
||||
|
||||
|
||||
test:
|
||||
for file in simpleaudio.[ch] ; \
|
||||
do { for rate in 1200 300 50; \
|
||||
do ./self-test $$rate $$file || exit; \
|
||||
done }; \
|
||||
done
|
||||
./self-test rtty self-test-baudot.txt
|
||||
[ ! -f ./run-test ] || ./run-test
|
||||
@echo
|
||||
@echo "minimodem: ALL TESTS PASS"
|
||||
@echo
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -12,6 +12,6 @@ trap "rm -f $TMPF" 0
|
|||
|
||||
set -e
|
||||
./minimodem --tx --file $TMPF "$baudmode" < "$textfile"
|
||||
ls -l $TMPF
|
||||
# ls -l $TMPF
|
||||
./minimodem --rx --file $TMPF "$baudmode" | diff "$textfile" -
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
THIS FILE CONTAINS ONLY CHARACTERS IN THE BAUDOT CHARACTER SET, AND INCLUDES
|
||||
SOME CHARACTERS AND NUMBERS FROM THE FIGS TABLE, LIKE 10 AND 20 AND KA6MAL.
|
||||
HERE ARE SOME MORE: A1A1A1 2B2B2B TUE JUN 21 14:22:36 PDT 2011. THE QUICK
|
||||
BROWN FOX JUMPS OVER THE LAZY DOG? YES, HE DOES!
|
Loading…
Reference in New Issue