feat: add integration test framework and rack/grid command support

This commit is contained in:
Loic Coenen
2026-05-16 23:38:28 +00:00
committed by Loic Coenen (aider)
parent 9fda1b2669
commit e6e0a47749
6 changed files with 143 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ TEST_PLUGINS_BIN = test_plugins
TEST_CLIENT_BIN = test_client
TEST_CARLA_BIN = test_carla_host
TEST_CLIENT_CMD_BIN = test_client_cmd
TEST_INTEGRATION_BIN = test_integration
all: looper-client test_status_parse
@@ -29,6 +30,11 @@ $(PLUGINS_OBJ): src/plugins.c src/plugins.h
$(CARLA_OBJ): src/carla_host.c src/carla_host.h
$(CC) -Wall -Wextra -std=c11 -Isrc $(CARLA_INC) -c -o $@ $<
CARLA_TEST_OBJ = src/carla_host_test.o
$(CARLA_TEST_OBJ): src/carla_host.c src/carla_host.h
$(CC) -Wall -Wextra -std=c11 -Isrc $(CARLA_INC) -DTESTING -c -o $@ $<
$(CLIENT_CMD_OBJ): src/client_cmd.c src/client_cmd.h
$(CC) $(CFLAGS) $(CARLA_INC) -c -o $@ $<
@@ -71,14 +77,19 @@ $(TEST_CARLA_OBJ): tests/test_carla_host.c src/carla_host.h
$(TEST_CARLA_BIN): $(TEST_CARLA_OBJ) $(CARLA_OBJ)
$(CC) $(CFLAGS) -o $@ $^ $(CARLA_LIB) -ljack
test: looper-client test_status_parse $(TEST_PLUGINS_BIN) $(TEST_CLIENT_BIN) $(TEST_CARLA_BIN) $(TEST_CLIENT_CMD_BIN)
# --- Integration test (requires TESTING symbol) ---
$(TEST_INTEGRATION_BIN): tests/test_integration.c $(CARLA_TEST_OBJ)
$(CC) $(CFLAGS) $(CARLA_INC) -DTESTING -o $@ $^ $(CARLA_LIB) -ljack
test: looper-client test_status_parse $(TEST_PLUGINS_BIN) $(TEST_CLIENT_BIN) $(TEST_CARLA_BIN) $(TEST_CLIENT_CMD_BIN) $(TEST_INTEGRATION_BIN)
./test_status_parse
./$(TEST_PLUGINS_BIN)
./$(TEST_CLIENT_BIN)
./$(TEST_CARLA_BIN)
./$(TEST_CLIENT_CMD_BIN)
./$(TEST_INTEGRATION_BIN)
.PHONY: all test clean
clean:
rm -f looper-client test_status_parse $(TEST_PLUGINS_BIN) $(TEST_CLIENT_BIN) $(TEST_CARLA_BIN) $(TEST_CLIENT_CMD_BIN) *.o tests/*.o src/*.o
rm -f looper-client test_status_parse $(TEST_PLUGINS_BIN) $(TEST_CLIENT_BIN) $(TEST_CARLA_BIN) $(TEST_CLIENT_CMD_BIN) $(TEST_INTEGRATION_BIN) *.o tests/*.o src/*.o