test: add integration tests for audio and MIDI routing via JACK

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-04 17:45:33 +00:00
parent f04257a189
commit 2a0667b372
2 changed files with 422 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200809L -I. -Ilib -fsanitize=thread
LDFLAGS = -ljack -lm -lncurses -lpthread
all: jack-looper test_engine test_tui test_gui test_cli test_stress test_wav_io
all: jack-looper test_engine test_tui test_gui test_cli test_stress test_wav_io test_audio_routing
jack-looper: main.o engine.o tui.o gui.o cli.o transport.o dispatcher.o lib/microui.o wav_io.o carla.o fs.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
@@ -25,6 +25,9 @@ test_stress: test_stress.o engine.o wav_io.o dispatcher.o carla.o fs.o
test_wav_io: test_wav_io.o wav_io.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
test_audio_routing: test_audio_routing.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
test_stress.o: test_stress.c dispatcher.h engine.h wav_io.h
$(CC) $(CFLAGS) -c -o $@ $<
@@ -75,6 +78,9 @@ test_cli.o: test_cli.c engine.h transport.h dispatcher.h
test_wav_io.o: test_wav_io.c wav_io.h
$(CC) $(CFLAGS) -c -o $@ $<
test_audio_routing.o: test_audio_routing.c
$(CC) $(CFLAGS) -c -o $@ $<
cli.o: cli.c cli.h engine.h transport.h
$(CC) $(CFLAGS) -c -o $@ $<
@@ -84,8 +90,9 @@ cli.o: cli.c cli.h engine.h transport.h
clean:
rm -f *.o lib/microui.o wav_io.o jack-looper test_engine test_tui test_gui test_cli test_stress test_wav_io
test: test_engine test_tui test_cli test_wav_io
test: test_engine test_tui test_cli test_wav_io test_audio_routing
./test_engine
./test_tui
./test_cli
./test_wav_io
./test_audio_routing