Test execution on CI optimization #72
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/parallel-tests-clean"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implement parallel functional test execution, build optimizations, and code coverage support. Combined ~3x CI speedup.
Changes
1. Parallel Functional Tests
./tests/functionaltests/files/{port}/xdg_*), enabling safe parallel execution./functionaltests [1-4]to run specific group2. Build Performance
-Cflag to configure for faster reconfigurationmake -j$(nproc)in all Dockerfiles--depth 1for git clone in Dockerfiles$(srcdir)/testsfor out-of-tree builds3. Code Coverage
--enable-coverageadds gcov instrumentationmake coverageandmake coverage-html--rc branch_coverage=1(step towards MC/DC)Test Groups
Usage
Files Changed
--enable-coverageoptionDockerfile.*- lcov, parallel make, shallow cloneResolves #26
Resolves #73
Partially addresses #72
c1a60dc603to49b552dcb1Generally, LGTM. However, certain parts might be slightly improved.
@@ -308,0 +312,4 @@@echo "Running functional tests in parallel (4 groups)..."@mkdir -p $(builddir)/test-logs@failed=0; \./tests/functionaltests/functionaltests 1 > $(builddir)/test-logs/group1.log 2>&1 & pid1=$$!; \Can we make it a loop for extensibility?
Corrected
@@ -20,2 +17,2 @@* Group 3: MUC (Multi-User Chat) functionality* Group 4: Carbons, Chat sessions, Software version, Disconnect* Tests are organized into groups for better maintainability and parallel execution:* Group 1: Connect, Ping, Rooms, Software (17 tests)Please remove counts (such as 17 tests) from the commentary. It's highly likely that we will miss to update those and we'll have outdated docs. Updating them each time we add/remove test is going to be painful as well.
Corrected
@@ -55,3 +74,1 @@* GROUP 1: Connect, Ping, Rooms, Presence* Basic XMPP session establishment and presence management* ============================================================ *//* GROUP 1: Connect, Ping, Rooms, Software (17 tests)Previous style (here and later) feels better for readability.
Corrected
@@ -119,2 +132,3 @@};/* Room join with various options *//* GROUP 3: Presence (16 tests)Same as earlier: style and counts
Corrected
@@ -176,0 +191,4 @@int result = 0;switch (group) {case 1:Do we plan to increase count of groups? If so, maybe it would make sense to make a different structure to store group names and their content and then loop over it?
Corrected
@@ -4,2 +4,2 @@#define XDG_CONFIG_HOME "./tests/functionaltests/files/xdg_config_home"#define XDG_DATA_HOME "./tests/functionaltests/files/xdg_data_home"/** XDG paths are now dynamic, generated per-test based on stub_port.Adjust comment so it reflects current state of things, not the change that has been made (E.g. "XDG paths are used for...").
Corrected
d6388674d5tof779c157a7f779c157a7to56ede1b45f