From b30754aa87b58c90d2821ee3751fd8ae576bae45 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 6 Sep 2023 01:43:45 +0200 Subject: [PATCH] build: run embedtest using node executable We should use the node executable to run this test, instead of counting on embedtest, the binary being tested, as the test runner. Otherwise bugs can go unnoticed if the embedtest binary itself does not work correctly. PR-URL: https://github.com/nodejs/node/pull/49506 Fixes: https://github.com/nodejs/node/issues/49501 Reviewed-By: Darshan Sen Reviewed-By: James M Snell --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 47eb7288ad36b0..b7871bf218572c 100644 --- a/Makefile +++ b/Makefile @@ -286,7 +286,7 @@ coverage-report-js: # Runs the C++ tests using the built `cctest` executable. cctest: all @out/$(BUILDTYPE)/$@ --gtest_filter=$(GTEST_FILTER) - @out/$(BUILDTYPE)/embedtest "require('./test/embedding/test-embedding.js')" + $(NODE) ./test/embedding/test-embedding.js .PHONY: list-gtests list-gtests: @@ -550,7 +550,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ --mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \ $(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC) - out/Release/embedtest 'require("./test/embedding/test-embedding.js")' + $(NODE) ./test/embedding/test-embedding.js $(info Clean up any leftover processes, error if found.) ps awwx | grep Release/node | grep -v grep | cat @PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \