Skip to content

test(vtest): accelerate shared cases and report CI timings - #1867

Merged
mergify[bot] merged 3 commits into
masterfrom
feature/vtest-exec
Oct 24, 2026
Merged

mergify[bot] merged 3 commits into
masterfrom
feature/vtest-exec

Conversation

@tignear

@tignear tignear commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Most shared language tests are thin #[test] registrations around the same vtest adapters. Build that executor once with opt-level = 1 and run the existing registrations through it, both in CI and locally via node scripts/run-vtest.mjs. Rust API tests keep running in their test binaries; nextest still controls case selection, backend omissions, ignores, parallelism and timeouts.

The opt-in runtime-cases feature reads .vtest files from disk instead of embedding them, so editing a case body does not rebuild the suite, Celox or the executor. Ordinary Cargo commands retain the embedded/in-process path. CI prepares the shared executor once for full workspace runs and scoped runs containing Celox; scopes without Celox skip this build. The cache warmer builds both profiles with the same versioned cache key, and executor preparation failures fail the Rust test job. The first invocation builds both the executor profile and the ordinary test binaries; subsequent invocations reuse those outputs. Development assertions and overflow checks remain enabled.

Rust nextest runs also emit JUnit reports for Mergify CI Insights, including per-test duration and failures. Each scoped invocation keeps a separate report so later invocations do not overwrite earlier results. CI retains the reports for 14 days and uploads them when MERGIFY_TOKEN is available; forks without the secret still run tests. Failure status remains unchanged, with no retries or quarantine enabled. CI Insights is already enabled for the repository and the CI-scoped application key has been registered.

Usage:

node scripts/run-vtest.mjs --test counter
node scripts/run-vtest.mjs --test systemverilog -E 'test(operators::)'

A local 16-case counter sample, with a fresh process per case and three alternating runs per mode, improved from 5.42 s to 1.97 s median (2.75x), including executor process startup. Both modes used the runtime corpus. The broader 1,245-test selection took 114.2 s in process and 30.5 s through the executor; those broader timings are indicative because concurrent build load differed. These are execution timings, not cold build timings.

Validation

  • cargo check --workspace --locked, formatting, diff whitespace, JS lint and submodule checks passed.
  • Clippy passed for the executor with runtime/SV features and with default features, the runtime suite library/tests, and the counter, SystemVerilog and suite-adapter integration targets.
  • Suite unit tests: 34 passed with runtime loading; 30 passed with the default embedded catalogue.
  • The same 1,245 selected counter, operator, four-state, SystemVerilog operator/timing and adapter tests passed through both execution paths, with identical skip counts (4,175).
  • All 285 repository script tests passed, including CI scope, cache parity, executor setup and failure-propagation tests.
  • Actual CI preparation and scoped execution passed 17 heap tests and 23 counter tests (one existing ignore); the external/runtime-cases feature combination passed 50 suite unit tests (two existing ignores).
  • Reporting validation: real scoped runs preserved two reports covering 18 tests both on success and on an intentional assertion failure (one failure, exit 100); full-run collection preserved 17 passing tests. All reports included per-test timings. Remote ingestion awaits the updated CI run.
  • Actionlint passed for both changed workflows with the existing ubuntu-26.04-arm label supplied to the pinned linter.
  • End-to-end checks verified dispatch arguments, recursion prevention, edited assertions failing without rebuilding, missing executors failing closed, unknown cases/backends/languages failing, and Rust API tests bypassing the executor.
  • Editing an actual counter.vtest file left the suite, Celox and executor Cargo artifacts fresh. The edit was restored after validation.
  • Runtime discovery matches all existing catalogue files: 72 Veryl and 29 SystemVerilog.
  • Shared cases and external simulator adapters were not changed, so external simulator runs were not required.

Add an opt-in shared executor with runtime corpus loading while preserving existing libtest registrations and nextest scheduling. Avoid Rust rebuilds for vtest body edits and retain the embedded in-process path.

Change-Id: I782a196b4d4b952a7c5122984f2f9785cc61d153
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T09:02:33.051395Z ce7e015 New commits
ℹ️ 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.

@tignear tignear added merge-ready Request merging through Mergify after required checks and removed merge-ready Request merging through Mergify after required checks labels Oct 24, 2026
Prepare the shared executor once for full and scoped Celox runs, fail when setup is missing, and warm both Cargo profiles under a matching cache key.

Change-Id: I3bc134b06e3bf4fce8f1ed2e8a36ce7e0a6f629b
@tignear tignear changed the title test(vtest): run shared cases through an optimized executor test(vtest): accelerate shared cases locally and in CI Oct 24, 2026
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 24, 2026
Change-Id: I28a4e411f6de79c7e30511682cd78111ff7f9490
@tignear tignear changed the title test(vtest): accelerate shared cases locally and in CI test(vtest): accelerate shared cases and report CI timings Oct 24, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 24, 2026
@mergify

mergify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 4 hours 18 minutes 2 seconds in the queue, including 2 hours 11 minutes 20 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

@mergify
mergify Bot merged commit bed4fcd into master Oct 24, 2026
33 checks passed
@mergify
mergify Bot deleted the feature/vtest-exec branch October 24, 2026 15:24
@mergify mergify Bot removed the queued Mergify queue entry label Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant