Skip to content

Commit 4571a61

Browse files
committed
Run SQLite extension unit tests in CI
1 parent 6fa8df4 commit 4571a61

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ jobs:
364364
echo "::endgroup::"
365365
366366
echo "::group::build unittest binary for android"
367-
make build/unittest ${{ matrix.make }} SQLITE_AMALGAM=${SQLITE_DIR}/sqlite3.c
367+
make build/unittest ${{ matrix.make }} SQLITE_AMALGAM=${SQLITE_DIR}/sqlite3.c DEFINES="-DTEST_SQLITE_EXTENSION"
368368
echo "::endgroup::"
369369
370370
echo "::group::build e2e binary for android"
@@ -406,12 +406,12 @@ jobs:
406406
407407
- name: unix test sqlite-memory
408408
if: matrix.skip_test != true && matrix.os != 'windows-2022' && matrix.name != 'android'
409-
run: ${{ matrix.name == 'linux-musl' && matrix.arch == 'arm64' && 'docker exec alpine' || '' }} make test ${{ matrix.make && matrix.make || ''}}
409+
run: ${{ matrix.name == 'linux-musl' && matrix.arch == 'arm64' && 'docker exec alpine' || '' }} make test ${{ matrix.make && matrix.make || ''}} DEFINES="-DTEST_SQLITE_EXTENSION"
410410

411411
- name: windows test sqlite-memory
412412
if: matrix.skip_test != true && matrix.name == 'windows'
413413
shell: msys2 {0}
414-
run: make test ${{ matrix.make && matrix.make || ''}}
414+
run: make test ${{ matrix.make && matrix.make || ''}} DEFINES="-DTEST_SQLITE_EXTENSION"
415415

416416
- name: unix e2e sqlite-memory
417417
if: matrix.skip_test != true && matrix.variant != 'local' && matrix.os != 'windows-2022' && matrix.name != 'android'

test/unittest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2359,7 +2359,7 @@ static int dummy_compute(void *engine, const char *text, int text_len, void *xda
23592359
dummy_engine_t *e = (dummy_engine_t *)engine;
23602360
e->compute_count++;
23612361
result->n_tokens = text_len / 4;
2362-
result->n_tokens_truncated = 0;
2362+
result->truncated = false;
23632363
result->n_embd = e->dimension;
23642364
result->embedding = e->embedding;
23652365
return 0;

0 commit comments

Comments
 (0)