Skip to content

Link the integration tests into one test binary - #220

Open
LucaCappelletti94 wants to merge 1 commit into
mainfrom
upstream/single-test-binary
Open

LucaCappelletti94 wants to merge 1 commit into
mainfrom
upstream/single-test-binary

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Collaborator

Every file under tests/ built its own test binary, so the crate was linked 326 times and a release build of the suite took 41G of target/release. The files are now modules of one it binary declared from tests/it/main.rs, with autotests = false, and the same build takes 4.3G. Individual tests run as cargo test --test it test_translator::.

Four targets stay apart because they need a process of their own. sqlite_vec and sqlitegis hold the tests that register those extensions through sqlite3_auto_extension, which loads them into every later connection of the process, so sharing it would hand their functions to tests that prove output against plain SQLite. test_playground_sample_queries registers both. test_postgres_harness_lifecycle keeps its own because the harness sweeps abandoned containers when it starts, which in a shared process races its sweep test.

The helpers are one module in tests/helpers. test_groups was compiled into two binaries and the declared-list check in statistical_aggregates into four, so those now run once. Helpers that nothing called are gone, and insta snapshots moved to the new module paths.

@github-actions github-actions 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.

These duplicates are not on lines GitHub shows in this pull request diff, the inline comment cannot attach there. The links point at the copies on the head commit.

echoes · 👎 Report a wrong review · ❤️ Support echoes

@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/single-test-binary branch from 1a5c777 to e8c5fe5 Compare November 2, 2026 12:11

@github-actions github-actions 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.

These duplicates are not on lines GitHub shows in this pull request diff, the inline comment cannot attach there. The links point at the copies on the head commit.

echoes · 👎 Report a wrong review · ❤️ Support echoes

@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Every file under tests/ compiled into its own test binary, linking the crate
once per file. The files are now modules of a single `it` binary declared
from tests/it/main.rs, with autotests off. The tests that register sqlite-vec
or SQLiteGIS through sqlite3_auto_extension, which loads the extension into
every later connection of the process, keep their own binaries grouped by the
extensions they load, and the harness lifecycle test keeps its own because
the harness's startup sweep would race its sweep test. The helpers are one
shared module, and insta snapshots follow the new module paths.
@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/single-test-binary branch from e8c5fe5 to 4327c84 Compare November 3, 2026 00:08

@github-actions github-actions 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.

These duplicates are not on lines GitHub shows in this pull request diff, the inline comment cannot attach there. The links point at the copies on the head commit.

echoes · 👎 Report a wrong review · ❤️ Support echoes

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