1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add -sqllog flag to the JNI 'tests' target because it hits APIs which are otherwise not tested.

FossilOrigin-Name: cc3153ed341f59262485c3541a8879c4e86520c8a10f4ce819344a88099e7d0e
This commit is contained in:
stephan
2023-08-26 12:19:51 +00:00
parent 3ff458d61e
commit acfbe5284e
4 changed files with 20 additions and 13 deletions

View File

@ -243,12 +243,19 @@ test.flags ?=
test.main.flags = -ea -Djava.library.path=$(dir.bld.c) \
$(java.flags) -cp $(classpath) \
org.sqlite.jni.Tester1
test-one: $(SQLite3Jni.class) $(sqlite3-jni.dll)
test.deps := $(SQLite3Jni.class) $(sqlite3-jni.dll)
test-one: $(test.deps)
$(bin.java) $(test.main.flags) $(test.flags)
test: test-one
@echo "Again in multi-threaded mode:";
test-sqllog: $(test.deps)
@echo "Testing with -sqllog..."
$(bin.java) $(test.main.flags) -sqllog
test-mt: $(test.deps)
@echo "Testing in multi-threaded mode:";
$(bin.java) $(test.main.flags) -t 5 -r 20 -shuffle $(test.flags)
test: test-one test-mt
tests: test test-sqllog
tester.scripts := $(sort $(wildcard $(dir.src)/tests/*.test))
tester.flags ?= # --verbose
.PHONY: tester tester-local tester-ext
@ -283,7 +290,7 @@ endif
tester-ext: tester-local
tester: tester-ext
tests: test tester
tests: tester
########################################################################
# Build each SQLITE_THREADMODE variant and run all tests against them.

View File

@ -1504,7 +1504,7 @@ public class Tester1 implements Runnable {
@Override public void call(sqlite3 db, String msg, int op){
switch(op){
case 0: outln("Opening db: ",db); break;
case 1: outln(db,": ",msg); break;
case 1: outln("SQL ",db,": ",msg); break;
case 2: outln("Closing db: ",db); break;
}
}