Skip to content

Run all build system tests from make test-build - #9445

Draft
cknitt wants to merge 4 commits into
masterfrom
make-test-targets
Draft

cknitt wants to merge 4 commits into
masterfrom
make-test-targets

Conversation

@cknitt

@cknitt cknitt commented Nov 27, 2026

Copy link
Copy Markdown
Member

make test-build now runs all of the build system's tests, and CI runs them through the same targets.

  • New tests/build_tests/Makefile with one target per suite: unit, snapshots, verbose, interactive, isolated, integration, plus test for all of them. Like the other suites' Makefiles, it takes the executable as RESCRIPT and defaults to the platform package's binary.
  • make test-build builds the runtime and then runs test. Before, it ran only the integration suite, and the unit and isolated tests only ran in CI, where each command was spelled out in ci.yml.
  • CI calls the single targets, so CI and local runs use the same commands.
  • scripts/test.js -build is now -projects. It runs the projects, project_tests and error_tests, not the build system's tests.
  • Fix: the integration suite's check for leftover processes counted any process that had the executable's path in its arguments. Started from make with an absolute path, it found make and itself. It now counts only processes that run the executable.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gLP8xKdoF8ZA2WZNCo

make test-build ran only the integration suite. The unit tests and the
isolated scripts ran only in CI, where each command was spelled out in
ci.yml. tests/build_tests/Makefile now has a target per suite (unit,
snapshots, verbose, interactive, isolated, integration) and test for all of
them; make test-build runs that after building the runtime, and CI calls
the single targets. scripts/test.js -build, which runs the projects and the
error tests, is now -projects.

The integration suite's check for leftover processes matched any process
that named the executable in its arguments. Started from make with an
absolute path, it found make and itself. It now counts only processes that
run the executable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLP8xKdoF8ZA2WZNCo
Signed-off-by: Christoph Knittel <ck@cca.io>
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Changelog

🏠 Internal

  • make test-build runs all build system tests (unit, isolated and integration) through tests/build_tests/Makefile, whose targets CI calls; scripts/test.js -build is now -projects.

Semantic Diff

4 commits · Full page

Run all build system tests from make test-build

d7d9e88 · cknitt + Claude · Nov 27, 2026, 06:16 UTC

make test-build ran only the integration suite. The unit tests and the isolated scripts ran only in CI, where each command was spelled out in ci.yml. tests/build_tests/Makefile now has a target per suite (unit, snapshots, verbose, interactive, isolated, integration) and test for all of them; make test-build runs that after building the runtime, and CI calls the single targets. scripts/test.js -build, which runs the projects and the error tests, is now -projects.

The integration suite's check for leftover processes matched any process that named the executable in its arguments. Started from make with an absolute path, it found make and itself. It now counts only processes that run the executable.

Keep the integration suite running when no process matches on Windows

b2910b3 · cknitt + Claude · Nov 27, 2026, 06:34 UTC

Git for Windows' ps has no -o, so the leftover-process check falls back to grep, which exits 1 when it finds nothing. Under set -e that ended the suite before its first test.

Let the integration suite run alongside the other build tests

7a2f982 · cknitt + Claude · Nov 27, 2026, 09:03 UTC

Its check for leftover processes aborts when another process runs its executable. With make -j, the suites of make test-build (or other make targets) could run at the same time on the same binary. The integration target now runs a copy of the binaries, as CI did by hand, and CI no longer makes its own copy.

Answers the Codex review on #9445.

✨ Catch leftover watchers again in the integration target

a6d3e56 · cknitt + Claude · Nov 27, 2026, 09:36 UTC · new

Each run copied the binaries to a new temporary directory, so the suite's check for leftover processes could never match a watcher from an interrupted earlier run, and the copies piled up after Ctrl-C. The copy now always goes to tmp/integration-bin. The check also counts node running the cli/rescript.js script, the default RESCRIPT is resolved through a relative path that node understands under an MSYS make, and the docs no longer say that make test-build runs the projects.

Answers the Fable review of stack #9449.

@cknitt
cknitt added this pull request to stack #9449 November 27, 2026 06:24
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 638,387,352 → 638,387,081 (±0.00%).

Generated projects: 629,071,033 → 629,072,249 (±0.00%).

None of the 265 benchmarks changed by 0.1% or more.

Instructions

In total: 9,221,543,221 → 9,221,543,221 (±0.00%).

None of the 33 benchmarks changed by 0.1% or more.

Output size

In total: 26,070,038 → 26,070,038 (±0.00%).

None of the 13 benchmarks changed by 0.1% or more.

Pull request a6d3e56 compared with base 58c494d in this run.

Git for Windows' ps has no -o, so the leftover-process check falls back to
grep, which exits 1 when it finds nothing. Under set -e that ended the suite
before its first test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLP8xKdoF8ZA2WZNCo
Signed-off-by: Christoph Knittel <ck@cca.io>
@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.22%. Comparing base (58c494d) to head (a6d3e56).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9445   +/-   ##
=======================================
  Coverage   82.22%   82.22%           
=======================================
  Files         462      462           
  Lines       65582    65582           
=======================================
  Hits        53927    53927           
  Misses      11655    11655           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new

pkg-pr-new Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@9445

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@9445

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@9445

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@9445

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@9445

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@9445

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@9445

commit: a6d3e56

@github-actions

Copy link
Copy Markdown

@cknitt

cknitt commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T09:50:19.596054Z a6d3e56 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b2910b3923

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/build_tests/Makefile Resolved
Its check for leftover processes aborts when another process runs its
executable. With make -j, the suites of make test-build (or other make
targets) could run at the same time on the same binary. The integration
target now runs a copy of the binaries, as CI did by hand, and CI no longer
makes its own copy.

Answers the Codex review on #9445.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLP8xKdoF8ZA2WZNCo
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt

cknitt commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 7a2f982ae7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Each run copied the binaries to a new temporary directory, so the suite's
check for leftover processes could never match a watcher from an
interrupted earlier run, and the copies piled up after Ctrl-C. The copy now
always goes to tmp/integration-bin. The check also counts node running the
cli/rescript.js script, the default RESCRIPT is resolved through a relative
path that node understands under an MSYS make, and the docs no longer say
that make test-build runs the projects.

Answers the Fable review of stack #9449.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLP8xKdoF8ZA2WZNCo
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt

cknitt commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: a6d3e56116

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

No deployments
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.

1 participant