Skip to content

Commit 40e8c4d

Browse files
committed
test: add Android-specific test target in Makefile
Introduces a conditional test target for the Android platform in the Makefile. The Android test runs only the sqlite3 CLI smoke test, while other platforms also run additional tests. This prevents the Android job from trying to execute build/tests/sqlite_ai_tests (and other host-only tools) inside the emulator while keeping the rest of the test workflow unchanged. The commands on Android were trying to use the host’s prebuilt toolchain path inside an Android emulator, which doesn’t exist there
1 parent 1b006bb commit 40e8c4d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,16 @@ $(GGUF_MODEL_PATH):
228228
@mkdir -p $(GGUF_MODEL_DIR)
229229
curl -L --fail --retry 3 -o $@ $(GGUF_MODEL_URL)
230230

231+
ifeq ($(PLATFORM),android)
232+
test: $(TARGET)
233+
@echo "Running sqlite3 CLI smoke test inside Android environment..."
234+
$(SQLITE3) ":memory:" -cmd ".bail on" ".load ./dist/ai" "SELECT ai_version();"
235+
else
231236
test: $(TARGET) $(CTEST_BIN) $(GGUF_MODEL_PATH)
232237
@echo "Running sqlite3 CLI smoke test (ensures .load works)..."
233238
$(SQLITE3) ":memory:" -cmd ".bail on" ".load ./dist/ai" "SELECT ai_version();"
234239
$(CTEST_BIN) --extension "$(TARGET)" --model "$(GGUF_MODEL_PATH)"
240+
endif
235241

236242
# Build submodules
237243
ifeq ($(PLATFORM),windows)

0 commit comments

Comments
 (0)