Speed up test suite with early-return polling and parallel execution#98
Merged
Speed up test suite with early-return polling and parallel execution#98
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces test-suite wall-clock time by replacing fixed-duration polling sleeps with an early-return polling helper, and by enabling parallel execution of Elisp vs native-module tests locally and in CI.
Changes:
- Introduce
ghostel-test--wait-forand replace severaldotimes+accept-process-outputwaits with predicate-based early-return polling. - Split
make test-allintotest(Elisp-only) andtest-nativetargets somake -jcan run them concurrently. - Add a
test-nativeGitHub Actions job that downloads the native module build artifact and runs native-module tests end-to-end.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
test/ghostel-test.el |
Adds a shared polling helper and refactors slow tests to wait only as long as needed; adds a native-only test runner entry point. |
Makefile |
Splits test targets into Elisp-only and native-module tests to allow parallel execution. |
.github/workflows/ci.yml |
Adds a test-native CI job that runs native-module tests using the built artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace fixed dotimes/accept-process-output polling loops with a ghostel-test--wait-for helper that returns as soon as the condition is met instead of always burning the full timeout budget. This cuts the four slowest tests (fish-backspace, shell-integration, clear-screen, scrollback-rotation-rebuild) from ~31s to ~6s. Split test-all into parallel elisp and native-module targets so make -j runs them concurrently (40s → 6.4s wall-clock). Add a test-native CI job that downloads the build artifact and actually runs native-module tests end-to-end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dotimes/accept-process-outputpolling loops with aghostel-test--wait-forhelper that returns as soon as the condition is met, cutting the four slowest tests from ~31s to ~6stest-allinto paralleltest(elisp) +test-nativetargets somake -jruns them concurrently (40s → 6.4s wall-clock locally)test-nativeCI job that downloads the build artifact and runs native-module tests end-to-end (previously CI only verified compilation)Test plan
make -j4 allpasses locally (110 tests + 30 evil tests + lint)test(elisp-only) passes across Emacs 28.2, 29.4, snapshottest-nativepasses on x86_64-linux and aarch64-macosbuild-nativestill uploads artifacts for all 4 platforms