Skip to content

Commit 0bf14ce

Browse files
authored
Add back integration testing as part of make test target (#38)
Signed-off-by: James Duong <[email protected]>
1 parent dc75963 commit 0bf14ce

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Makefile.frag

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,32 @@ include/glide_bindings.h:
8181
echo "protoc-c not found"; \
8282
fi
8383
@echo "=== HEADER GENERATION COMPLETE ==="
84+
85+
# Override generated test target
86+
test:
87+
@echo "Running ValkeyGlide tests..."
88+
@if [ ! -f "$(CURDIR)/modules/valkey_glide.so" ]; then \
89+
echo "❌ ERROR: Extension not found at $(CURDIR)/modules/valkey_glide.so"; \
90+
echo "Please build the extension first with: make"; \
91+
exit 1; \
92+
fi
93+
@if [ ! -f "tests/TestValkeyGlide.php" ]; then \
94+
echo "❌ ERROR: Test file not found at tests/TestValkeyGlide.php"; \
95+
exit 1; \
96+
fi
97+
@if [ ! -f "tests/start_valkey_with_replicas.sh" ]; then \
98+
echo "❌ ERROR: Setup script not found at tests/start_valkey_with_replicas.sh"; \
99+
exit 1; \
100+
fi
101+
@if [ ! -f "tests/create-valkey-cluster.sh" ]; then \
102+
echo "❌ ERROR: Setup script not found at tests/create-valkey-cluster.sh"; \
103+
exit 1; \
104+
fi
105+
@echo "Setting up Valkey infrastructure..."
106+
@echo "Starting Valkey with replicas..."
107+
@cd tests && ./start_valkey_with_replicas.sh
108+
@echo "Creating Valkey cluster..."
109+
@cd tests && ./create-valkey-cluster.sh
110+
@echo "Running PHP tests..."
111+
php -n -d extension=./modules/valkey_glide.so tests/TestValkeyGlide.php
112+
@echo "✓ Tests completed"

0 commit comments

Comments
 (0)