mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-24 03:34:18 +01:00
Document how to run compat tests with SQLite
This commit is contained in:
@@ -45,9 +45,20 @@ If the bytecode is the same, but query results are different, then the bug is so
|
||||
## Compatibility tests
|
||||
|
||||
The `testing/test.all` is a starting point for adding functional tests using a similar syntax to SQLite.
|
||||
When you run `make` the test cases are run with `cargo run`, which uses the latest build of the Limbo shell.
|
||||
If you run `testing/test.all` directly, it will run the tests with `sqlite3`.
|
||||
The purpose of these tests is to verify behavior matches with SQLite and Limbo.
|
||||
|
||||
To run the test suite with Limbo, simply run:
|
||||
|
||||
```
|
||||
make test
|
||||
```
|
||||
|
||||
To run the test suite with SQLite, type:
|
||||
|
||||
```
|
||||
SQLITE_EXEC=sqlite3 make test
|
||||
```
|
||||
|
||||
When working on a new feature, please consider adding a test case for it.
|
||||
|
||||
## Deterministic simulation tests
|
||||
|
||||
7
Makefile
7
Makefile
@@ -2,6 +2,9 @@ MINIMUM_RUST_VERSION := 1.73.0
|
||||
CURRENT_RUST_VERSION := $(shell rustc -V | sed -E 's/rustc ([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
|
||||
RUSTUP := $(shell command -v rustup 2> /dev/null)
|
||||
|
||||
# Executable used to execute the compatibility tests.
|
||||
SQLITE_EXEC ?= ./target/debug/limbo
|
||||
|
||||
all: check-rust-version check-wasm-target limbo limbo-wasm
|
||||
.PHONY: all
|
||||
|
||||
@@ -39,5 +42,5 @@ limbo-wasm:
|
||||
.PHONY: limbo-wasm
|
||||
|
||||
test: limbo
|
||||
SQLITE_EXEC=./target/debug/limbo ./testing/all.test
|
||||
.PHONY: test
|
||||
SQLITE_EXEC=$(SQLITE_EXEC) ./testing/all.test
|
||||
.PHONY: test
|
||||
|
||||
Reference in New Issue
Block a user