mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 01:56:21 +00:00
feat(tests): enable parallel execution of functional tests
This commit is contained in:
17
Makefile.am
17
Makefile.am
@@ -305,6 +305,23 @@ tests_functionaltests_functionaltests_SOURCES = $(functionaltest_sources)
|
||||
tests_functionaltests_functionaltests_CPPFLAGS = -Itests/
|
||||
tests_functionaltests_functionaltests_CFLAGS = $(AM_CFLAGS)
|
||||
tests_functionaltests_functionaltests_LDADD = -lcmocka -lstabber @FORKPTY_LIB@
|
||||
|
||||
# Parallel functional tests target (~3x faster than sequential)
|
||||
# Usage: make check-functional-parallel
|
||||
check-functional-parallel: tests/functionaltests/functionaltests
|
||||
@echo "Running functional tests in parallel (4 groups)..."
|
||||
@mkdir -p $(builddir)/test-logs
|
||||
@( \
|
||||
./tests/functionaltests/functionaltests 1 > $(builddir)/test-logs/group1.log 2>&1 & \
|
||||
./tests/functionaltests/functionaltests 2 > $(builddir)/test-logs/group2.log 2>&1 & \
|
||||
./tests/functionaltests/functionaltests 3 > $(builddir)/test-logs/group3.log 2>&1 & \
|
||||
./tests/functionaltests/functionaltests 4 > $(builddir)/test-logs/group4.log 2>&1 & \
|
||||
wait \
|
||||
) && ( \
|
||||
echo "=== Test Results ==="; \
|
||||
grep -E 'PASSED|FAILED|Running' $(builddir)/test-logs/group*.log; \
|
||||
! grep -q FAILED $(builddir)/test-logs/group*.log \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user