diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d16e838c..e935f9d12 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/Makefile b/Makefile index ad4d7b998..0408fff9a 100644 --- a/Makefile +++ b/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 \ No newline at end of file + SQLITE_EXEC=$(SQLITE_EXEC) ./testing/all.test +.PHONY: test