Skip to content

Add PHPUnit tests workflow for Doltlite#371

Closed
JanJakes wants to merge 2 commits into
trunkfrom
doltlite
Closed

Add PHPUnit tests workflow for Doltlite#371
JanJakes wants to merge 2 commits into
trunkfrom
doltlite

Conversation

@JanJakes

@JanJakes JanJakes commented Apr 24, 2026

Copy link
Copy Markdown
Member

Summary

Runs the mysql-on-sqlite PHPUnit suite against Doltlite, pinned to 0745bbab. The full suite passes with 740 tests, 1,428,287 assertions, 15 skipped, 2 incomplete.

The workflow builds Doltlite from source, installs it as the system libsqlite3 so PHP's pdo_sqlite resolves against it, verifies that Doltlite is active, and runs PHPUnit without filters. Installing the library replaces the earlier LD_PRELOAD approach, which loses to pdo_sqlite's DT_NEEDED binding on libsqlite3.so.0.

Three narrow, CI-only compatibility patches remain:

  1. Keep mysql-on-sqlite tables as rowid tables. Doltlite auto-converts ordinary composite or text primary-key tables to WITHOUT ROWID, while the driver still relies on rowid access for table recreation, limited UPDATE/DELETE rewrites, on-update triggers, zero-column result statements, and information-schema ordering.
  2. Preserve parseable schema SQL across rollback. Doltlite's schema canonicalization now strips line and block comments outside quoted strings, preventing collapsed -- comments from consuming the rest of a restored CREATE TABLE statement.
  3. Expose configurable logical journal modes. Doltlite's storage engine does not use SQLite journal or WAL sidecars, but the pager shim tracks the requested logical mode and preserves stock SQLite failure behavior when WAL cannot be opened.

File-based tests also remove Doltlite's persistent per-database lock file during cleanup, alongside standard SQLite sidecars.

Upstreaming the remaining Doltlite compatibility changes is a separate task.

Test plan

  • PHPUnit Tests (Doltlite) passes: 740 tests, 1,428,287 assertions, 15 skipped, 2 incomplete.
  • The full PR check suite passes.
  • Local unprivileged Linux verification against patched Doltlite passes with the same counts.
  • Local stock-SQLite PHPUnit suite and coding-standards checks pass.

@JanJakes JanJakes changed the title Try running PHPUnit tests against Doltlite Add PHPUnit tests workflow for Doltlite Apr 24, 2026
@JanJakes JanJakes force-pushed the doltlite branch 2 times, most recently from 4ed52e8 to 4ceaba3 Compare June 5, 2026 10:04
@JanJakes JanJakes force-pushed the doltlite branch 2 times, most recently from 9433dd9 to feb49d9 Compare July 10, 2026 09:36
JanJakes added 2 commits July 10, 2026 11:54
Run the mysql-on-sqlite PHPUnit suite against Doltlite commit 0745bbab by building it from source and installing its shared library as the libsqlite3 resolved by PHP's pdo_sqlite.

Keep three CI-only compatibility patches for rowid tables, schema SQL canonicalization, and logical journal modes, with a focused runtime check before the full PHPUnit run.
Remove Doltlite's persistent per-database lock file alongside the standard SQLite sidecars so file-based connection tests leave their temporary directories empty.
@JanJakes

Copy link
Copy Markdown
Member Author

Closing this for now. We can reopen when needed. Doltlite compatibility with SQLite is pretty good and improving. If needed, it is viable to be used with this project.

@JanJakes JanJakes closed this Jul 10, 2026
@JanJakes JanJakes deleted the doltlite branch July 10, 2026 15:10
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