diff options
| author | Keith Packard <keithp@keithp.com> | 2012-12-05 19:44:09 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-12-05 19:44:09 -0800 |
| commit | 0c2c47dd7af2fc95de852178c4244daba02f44ed (patch) | |
| tree | f33e705836472056436be45f23101ce1508a43f4 /src/test/Makefile | |
| parent | d65751fded3321b8a350e4140c44f87fec95aab2 (diff) | |
altos: Add test scaffolding for APRS
This moves some test code out of ao_aprs.c and into ao_aprs_test.c,
and then adds Makefile fragments to compile and run the resulting
program, creating a wav file as output
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/test/Makefile')
| -rw-r--r-- | src/test/Makefile | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/test/Makefile b/src/test/Makefile index 0dcdc949..092bf360 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -1,7 +1,8 @@ vpath % ..:../core:../drivers:../util PROGS=ao_flight_test ao_flight_test_baro ao_flight_test_accel ao_flight_test_noisy_accel ao_flight_test_mm \ - ao_gps_test ao_gps_test_skytraq ao_convert_test ao_convert_pa_test ao_fec_test + ao_gps_test ao_gps_test_skytraq ao_convert_test ao_convert_pa_test ao_fec_test \ + ao_aprs_test INCS=ao_kalman.h ao_ms5607.h ao_log.h ao_data.h altitude-pa.h altitude.h @@ -9,7 +10,7 @@ KALMAN=make-kalman CFLAGS=-I.. -I. -I../core -I../drivers -O0 -g -Wall -all: $(PROGS) +all: $(PROGS) ao_aprs_data.wav clean: rm -f $(PROGS) run-out.baro run-out.full @@ -49,5 +50,14 @@ ao_kalman.h: $(KALMAN) ao_fec_test: ao_fec_test.c ao_fec_tx.c ao_fec_rx.c cc $(CFLAGS) -DAO_FEC_DEBUG=1 -o $@ ao_fec_test.c ../core/ao_fec_tx.c ../core/ao_fec_rx.c -lm +ao_aprs_test: ao_aprs_test.c ao_aprs.c + cc $(CFLAGS) -o $@ ao_aprs_test.c + +SOX_INPUT_ARGS=--type raw --encoding unsigned-integer -b 8 -c 1 -r 9600 +SOX_OUTPUT_ARGS=--type wav + +ao_aprs_data.wav: ao_aprs_test + ./ao_aprs_test | sox $(SOX_INPUT_ARGS) - $(SOX_OUTPUT_ARGS) $@ + check: ao_fec_test ao_flight_test ao_flight_test_baro run-tests ./ao_fec_test && ./run-tests
\ No newline at end of file |
