Skip to content

Split the One Big Test into multiple#1527

Merged
jtran merged 5 commits into
mainfrom
achalmers/split-up-tests-properly
Jun 25, 2026
Merged

Split the One Big Test into multiple#1527
jtran merged 5 commits into
mainfrom
achalmers/split-up-tests-properly

Conversation

@adamchalmers

@adamchalmers adamchalmers commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Previously tests::test_main ran a lot of different tests. Now it's replaced by many small Rust tests. This way you can filter them via cargo nextest and get nice reporting, and they run in parallel so it's faster.

@adamchalmers adamchalmers requested a review from jessfraz as a code owner March 18, 2026 18:56
`zoo ml kcl edit gear.kcl ...` failed before reaching the API because
`Path::parent()` on a bare relative filename returns `Some("")`. We passed
that empty path to `kcl_lib::walk_dir`, which produced the empty-path
"is not a directory" error.

Treat that empty parent as the current directory, and compare canonical
paths when filtering walked files so the primary input file is not re-added
when we walk `.`.

Add a regression test covering relative file inputs from the current
directory.

This fixes the local path-handling failure. The API still expects a project
root containing `main.kcl`.
@jtran jtran force-pushed the achalmers/split-up-tests-properly branch from 6180003 to 38fdbc2 Compare June 24, 2026 20:30
* Fix test assertion to match engine output

* Fix ml tests that need a main.kcl file

* Fix ml reasoning to be captured, not printed directly to stderr

* Fix test to not assert reason output when the server doesn't provide it
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.15789% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.66%. Comparing base (73abc3e) to head (5cc1619).

Files with missing lines Patch % Lines
src/context.rs 88.15% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1527      +/-   ##
==========================================
+ Coverage   63.88%   64.66%   +0.77%     
==========================================
  Files          44       44              
  Lines        8118     8150      +32     
==========================================
+ Hits         5186     5270      +84     
+ Misses       2932     2880      -52     
Flag Coverage Δ
unittests 64.66% <88.15%> (+0.77%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jtran jtran enabled auto-merge (squash) June 25, 2026 15:48
@jtran jtran merged commit fbeb350 into main Jun 25, 2026
16 of 18 checks passed
@jtran jtran deleted the achalmers/split-up-tests-properly branch June 25, 2026 16:17
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.

3 participants