Skip to content

Speed up test suite with early-return polling and parallel execution#98

Merged
dakra merged 1 commit intomainfrom
faster-tests
Apr 13, 2026
Merged

Speed up test suite with early-return polling and parallel execution#98
dakra merged 1 commit intomainfrom
faster-tests

Conversation

@dakra
Copy link
Copy Markdown
Owner

@dakra dakra commented Apr 13, 2026

Summary

  • Replace fixed dotimes/accept-process-output polling loops with a ghostel-test--wait-for helper that returns as soon as the condition is met, cutting the four slowest tests from ~31s to ~6s
  • Split test-all into parallel test (elisp) + test-native targets so make -j runs them concurrently (40s → 6.4s wall-clock locally)
  • Add test-native CI job that downloads the build artifact and runs native-module tests end-to-end (previously CI only verified compilation)

Test plan

  • make -j4 all passes locally (110 tests + 30 evil tests + lint)
  • CI test (elisp-only) passes across Emacs 28.2, 29.4, snapshot
  • CI test-native passes on x86_64-linux and aarch64-macos
  • CI build-native still uploads artifacts for all 4 platforms

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-for and replace several dotimes + accept-process-output waits with predicate-based early-return polling.
  • Split make test-all into test (Elisp-only) and test-native targets so make -j can run them concurrently.
  • Add a test-native GitHub 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.

Comment thread test/ghostel-test.el Outdated
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.
@dakra dakra merged commit 2d3bda7 into main Apr 13, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants