Document how to run compat tests with SQLite

This commit is contained in:
Pekka Enberg
2024-07-12 08:27:06 +03:00
parent 55adf93282
commit 3e8da8e4c5
2 changed files with 18 additions and 4 deletions

View File

@@ -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

View File

@@ -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