Skip to content

tests: Add SQLite integration coverage from canonical sources - #2002

Open
thedataking wants to merge 5 commits into
masterfrom
perl/integration-test-sqlite
Open

tests: Add SQLite integration coverage from canonical sources#2002
thedataking wants to merge 5 commits into
masterfrom
perl/integration-test-sqlite

Conversation

@thedataking

@thedataking thedataking commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Add SQLite 3.53.4 to the integration harness and both Clang CI configurations. Build the official source submodule with --disable-amalgamation to exercise translation across individual source files. Generate sources before recording the compilation database to exclude host build tools.

Compare result counts and hashes for five upstream speedtest workloads (main, cte, orm, fp, and rtree) against native and translated libraries before and after refactoring. Always-active SQL assertions cover transactions, triggers, foreign keys, blobs, JSON/JSONB, large integers and floating-point parsing, window functions, integrity, and data and WAL journal-mode persistence after reopening. These explicit JSON and numeric checks replace upstream workloads that do not hash results or reliably report SQL errors. Both libraries use the same native C callers to exercise their public C ABI.

Use jq to read Cargo's configured output directory and rustc to determine the Rust archive's native link dependencies.

Depends on the transpiler fixes in #2001.

@thedataking
thedataking force-pushed the perl/integration-test-sqlite branch from cce7db1 to be8873d Compare September 8, 2026 02:33
@thedataking
thedataking marked this pull request as ready for review September 8, 2026 03:24
@thedataking
thedataking requested a review from ahomescu September 8, 2026 03:25
@thedataking
thedataking force-pushed the perl/integration-test-sqlite branch from be8873d to e53b57e Compare September 8, 2026 03:34
Comment thread tests/integration/tests/sqlite/test.sh Outdated
Comment thread tests/integration/tests/sqlite/configure.sh

@ahomescu ahomescu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review findings (7), posted inline. The two that matter most: the json and parsenumber testsets compare a constant hash, and --fail-on-error is unique to this conf.yml.

Comment thread tests/integration/tests/sqlite/test.sh Outdated
Comment thread tests/integration/tests/sqlite/conf.yml Outdated
Comment thread tests/integration/tests/sqlite/smoke.c Outdated
Comment thread tests/integration/tests/sqlite/test.sh
Comment thread tests/integration/tests/sqlite/test.sh Outdated
Comment thread tests/integration/tests/sqlite/README.md Outdated
Comment thread tests/integration/tests/sqlite/test.sh Outdated
@thedataking
thedataking force-pushed the perl/integration-test-sqlite branch from e53b57e to 3130ace Compare September 10, 2026 02:18
@thedataking
thedataking force-pushed the perl/integration-test-sqlite branch 3 times, most recently from 4c9c71e to 9abad44 Compare September 10, 2026 07:11
Base automatically changed from perl/sqlite-transpiler-fixes to master September 10, 2026 07:19
Pin SQLite 3.53.4 from the official source mirror to provide the
canonical source tree and upstream workloads for integration coverage.
Build libsqlite3.a with --disable-amalgamation so the integration
harness translates the individual library source files. Generate
sources before recording the compilation database to exclude host
build tools. Enable R-tree support for the spatial workload.
Run definition reorganization and the name, import, label, cast, and
literal cleanup transforms on translated SQLite, then compile the
result to exercise refactoring across the library modules.
Run five upstream speedtest workloads against native and Rust archives
before and after refactoring, comparing result counts and hashes. Use
the same native C callers to exercise both libraries' public C ABI.

Add always-active SQL checks for transactions, triggers, foreign keys,
blobs, JSON/JSONB, numeric parsing, window functions, and integrity.
Check data and WAL journal-mode persistence after reopening. Explicit
JSON and numeric assertions replace upstream workloads that do not
hash results or reliably report SQL errors.

Use jq to read Cargo's configured target directory and rustc to determine
the Rust archive's native link dependencies.
Check out the SQLite submodule and add it to the integration project
list so both Clang configurations exercise its translation, refactoring,
and runtime behavior.

Install jq for the test driver's Cargo metadata lookup.
@thedataking
thedataking force-pushed the perl/integration-test-sqlite branch from 9abad44 to 98b8a8e Compare September 10, 2026 07:19
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.

2 participants