@@ -294,7 +294,6 @@ coverage-report-js: ## Report JavaScript coverage results.
294
294
cctest : all # # Run the C++ tests using the built `cctest` executable.
295
295
@out/$(BUILDTYPE ) /$@ --gtest_filter=$(GTEST_FILTER )
296
296
$(NODE ) ./test/embedding/test-embedding.js
297
- $(NODE ) ./test/sqlite/test-sqlite-extensions.mjs
298
297
299
298
.PHONY : list-gtests
300
299
list-gtests : # # List all available C++ gtests.
@@ -312,7 +311,7 @@ v8: ## Build deps/v8.
312
311
tools/make-v8.sh $(V8_ARCH ) .$(BUILDTYPE_LOWER ) $(V8_BUILD_OPTIONS )
313
312
314
313
.PHONY : jstest
315
- jstest : build-addons build-js-native-api-tests build-node-api-tests # # Run addon tests and JS tests.
314
+ jstest : build-addons build-js-native-api-tests build-node-api-tests build-sqlite-tests # # Run addon tests and JS tests.
316
315
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) \
317
316
$(TEST_CI_ARGS ) \
318
317
--skip-tests=$(CI_SKIP_TESTS ) \
@@ -338,6 +337,7 @@ test: all ## Run default tests, linters, and build docs.
338
337
$(MAKE ) -s build-addons
339
338
$(MAKE ) -s build-js-native-api-tests
340
339
$(MAKE ) -s build-node-api-tests
340
+ $(MAKE ) -s build-sqlite-tests
341
341
$(MAKE ) -s cctest
342
342
$(MAKE ) -s jstest
343
343
@@ -346,6 +346,7 @@ test-only: all ## Run default tests, without linters or building the docs.
346
346
$(MAKE ) build-addons
347
347
$(MAKE ) build-js-native-api-tests
348
348
$(MAKE ) build-node-api-tests
349
+ $(MAKE ) build-sqlite-tests
349
350
$(MAKE ) cctest
350
351
$(MAKE ) jstest
351
352
$(MAKE ) tooltest
@@ -356,6 +357,7 @@ test-cov: all ## Run coverage tests.
356
357
$(MAKE ) build-addons
357
358
$(MAKE ) build-js-native-api-tests
358
359
$(MAKE ) build-node-api-tests
360
+ $(MAKE ) build-sqlite-tests
359
361
$(MAKE ) cctest
360
362
CI_SKIP_TESTS=$(COV_SKIP_TESTS ) $(MAKE ) jstest
361
363
@@ -501,6 +503,23 @@ benchmark/napi/.buildstamp: $(ADDONS_PREREQS) \
501
503
$(BENCHMARK_NAPI_BINDING_GYPS ) $(BENCHMARK_NAPI_BINDING_SOURCES )
502
504
@$(call run_build_addons,"$$PWD/benchmark/napi",$@ )
503
505
506
+ SQLITE_BINDING_GYPS := $(wildcard test/sqlite/* /binding.gyp)
507
+
508
+ SQLITE_BINDING_SOURCES := \
509
+ $(wildcard test/sqlite/* /* .c)
510
+
511
+ # Implicitly depends on $(NODE_EXE), see the build-sqlite-tests rule for rationale.
512
+ test/sqlite/.buildstamp : $(ADDONS_PREREQS ) \
513
+ $(SQLITE_BINDING_GYPS ) $(SQLITE_BINDING_SOURCES )
514
+ @$(call run_build_addons,"$$PWD/test/sqlite",$@ )
515
+
516
+ .PHONY : build-sqlite-tests
517
+ # .buildstamp needs $(NODE_EXE) but cannot depend on it
518
+ # directly because it calls make recursively. The parent make cannot know
519
+ # if the subprocess touched anything so it pessimistically assumes that
520
+ # .buildstamp is out of date and need a rebuild.
521
+ build-sqlite-tests : | $(NODE_EXE ) test/sqlite/.buildstamp # # Build SQLite tests.
522
+
504
523
.PHONY : clear-stalled
505
524
clear-stalled : # # Clear any stalled processes.
506
525
$(info Clean up any leftover processes but don't error if found.)
@@ -511,14 +530,18 @@ clear-stalled: ## Clear any stalled processes.
511
530
fi
512
531
513
532
.PHONY : test-build
514
- test-build : | all build-addons build-js-native-api-tests build-node-api-tests # # Build all tests.
533
+ test-build : | all build-addons build-js-native-api-tests build-node-api-tests build-sqlite-tests # # Build all tests.
515
534
516
535
.PHONY : test-build-js-native-api
517
536
test-build-js-native-api : all build-js-native-api-tests # # Build JS Native-API tests.
518
537
519
538
.PHONY : test-build-node-api
520
539
test-build-node-api : all build-node-api-tests # # Build Node-API tests.
521
540
541
+ .PHONY : test-build-sqlite
542
+ test-build-sqlite : all build-sqlite-tests # # Build SQLite tests.
543
+
544
+
522
545
.PHONY : test-all
523
546
test-all : test-build # # Run default tests with both Debug and Release builds.
524
547
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=debug,release
@@ -546,7 +569,7 @@ endif
546
569
547
570
# Related CI job: node-test-commit-arm-fanned
548
571
test-ci-native : LOGLEVEL := info # # Build and test addons without building anything else.
549
- test-ci-native : | benchmark/napi/.buildstamp test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
572
+ test-ci-native : | benchmark/napi/.buildstamp test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp test/sqlite/.buildstamp
550
573
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) -p tap --logfile test.tap \
551
574
--mode=$(BUILDTYPE_LOWER ) --flaky-tests=$(FLAKY_TESTS ) \
552
575
$(TEST_CI_ARGS ) $(CI_NATIVE_SUITES )
@@ -569,13 +592,12 @@ test-ci-js: | clear-stalled ## Build and test JavaScript with building anything
569
592
.PHONY : test-ci
570
593
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned
571
594
test-ci : LOGLEVEL := info # # Build and test everything (CI).
572
- test-ci : | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests doc-only
595
+ test-ci : | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests build-sqlite-tests doc-only
573
596
out/Release/cctest --gtest_output=xml:out/junit/cctest.xml
574
597
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) -p tap --logfile test.tap \
575
598
--mode=$(BUILDTYPE_LOWER ) --flaky-tests=$(FLAKY_TESTS ) \
576
599
$(TEST_CI_ARGS ) $(CI_JS_SUITES ) $(CI_NATIVE_SUITES ) $(CI_DOC )
577
600
$(NODE ) ./test/embedding/test-embedding.js
578
- $(NODE ) ./test/sqlite/test-sqlite-extensions.mjs
579
601
$(info Clean up any leftover processes, error if found.)
580
602
ps awwx | grep Release/node | grep -v grep | cat
581
603
@PS_OUT=` ps awwx | grep Release/node | grep -v grep | awk ' {print $$1}' ` ; \
@@ -681,6 +703,16 @@ test-node-api-clean: ## Remove Node-API testing artifacts.
681
703
$(RM ) -r test/node-api/* /build
682
704
$(RM ) test/node-api/.buildstamp
683
705
706
+ .PHONY : test-sqlite
707
+ test-sqlite : test-build-sqlite # # Run SQLite tests.
708
+ $(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) sqlite
709
+
710
+ .PHONY : test-sqlite-clean
711
+ .NOTPARALLEL : test-sqlite-clean
712
+ test-sqlite-clean : # # Remove SQLite testing artifacts.
713
+ $(RM ) -r test/sqlite/* /build
714
+ $(RM ) test/sqlite/.buildstamp
715
+
684
716
.PHONY : test-addons
685
717
test-addons : test-build test-js-native-api test-node-api # # Run addon tests.
686
718
$(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) addons
@@ -1446,7 +1478,7 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
1446
1478
test/cctest/* .h \
1447
1479
test/embedding/* .cc \
1448
1480
test/embedding/* .h \
1449
- test/sqlite/* .c \
1481
+ test/sqlite/* / * .c \
1450
1482
test/fixtures/* .c \
1451
1483
test/js-native-api/* /* .cc \
1452
1484
test/node-api/* /* .cc \
@@ -1470,6 +1502,7 @@ FORMAT_CPP_FILES += $(wildcard \
1470
1502
test/js-native-api/* /* .h \
1471
1503
test/node-api/* /* .c \
1472
1504
test/node-api/* /* .h \
1505
+ test/sqlite/* /* .c \
1473
1506
)
1474
1507
1475
1508
# Code blocks don't have newline at the end,
0 commit comments