Repository navigation
S2: cargo-free test runner (tests/run.sh) replacing cargo test - #38
Merged
Merged
Conversation
Port tests/native_tests.rs to tests/sh/native.sh on a bash runner with per-test timeouts, PASS/FAIL lines and optional parallelism. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
selfhost.sh and lifecycle.sh cover every selfhost_tests.rs test (the stage0 halves of the parity tests become goldens recorded from stage0); tools.sh ports the editor and headless-highlight asset checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lang.sh and cli.sh hold the trackc halves of integration, cli, codegen_semantics, regression, soundness, checker, lexer, parser and performance tests; verdicts pin trackc's exact first diagnostic line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two holes found by the independent check: - A trackc that exits 0 without writing output passed both parity tests (two missing binaries both exit 127 and so "agree"). build() and the parity loops now require an executable, and same_run rejects 126/127. - Deleting or renaming a test function silently ran one test fewer. A full run now checks the suites against tests/sh/ids.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 231 files, which is 131 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. CodeRabbit couldn't verify your organization's usage billing state, so no usage-priced review was started. Retry after the billing service recovers.
|
CI failed with 'no golden tests/cases/examples/arithmetic.out': the 25 goldens the parity tests read were on disk locally but matched *.out in .gitignore. Unignore tests/cases/**/*.out and add them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…name size The example prints the size of /etc/hostname (14 here, 11 on the CI runner). The golden now holds @HOSTNAME_BYTES@ and the test fills in the local size (0 when the file is missing, the example's fallback path). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
tests/run.shruns Track's test suite with bash and POSIX tools only: no cargo, no Rust. This is step 2 of retiring the Rust code. S1 (seed bootstrap, #35) is merged; S3 (yard in Track, #36) and S4 (trackc lsp, #37) are open.tests/sh/{native,selfhost,lifecycle,lang,cli,tools}.sh, 97 tests. Each test runs in its own process undertimeout, in an empty scratch directory.tests/PORTING.mdmaps all 165#[test]s intests/*.rs.tests/cases/examples/*.out; 3 C-codegen-internals tests dropped.trackc lsp#37.tests/sh/ids.txtlists every test. A full run fails if a test is deleted or renamed without updating it.seed-bootstrapjob runstests/run.shright after the bootstrap, withPATH=/usr/bin:/bin.Verification
Full run, trackc built from this tree: 97 passed, 0 failed, 92 s.
cargo testtakes about 133 s.An independent check gave PASS with notes:
dir_exists("src"), so it depends on the working directory.The check found two holes, now fixed in ab724bc:
same_runrejects 126/127.ids.txt.CI found two problems that local runs hid, both fixed:
*.outin.gitignore.tests/cases/**/*.outis now unignored.error_handlinggolden contained this machine's/etc/hostnamesize. It now holds@HOSTNAME_BYTES@, which the test fills in at run time.Known weak spots (not fixed here)
/etc/hostnameis missing.Review
CodeRabbit skips this PR: 231 files is over its free limit of 100, and most of them are small golden and case files. The independent check above is the only review it has had.
Next
S5 removes
src/,Cargo.toml,tests/*.rsand the cargo CI jobs, once this PR, #36 and #37 are merged.🤖 Generated with Claude Code