From 41c1e72b761ea70b0b4b8407702d831586cba321 Mon Sep 17 00:00:00 2001
From: Rich Trott <rtrott@gmail.com>
Date: Sun, 19 Jul 2020 19:18:09 -0700
Subject: [PATCH] build: fix test-ci-js task in Makefile

Move benchmark CI to native suite since it requires building an addon.

Refs: https://github.com/nodejs/node/issues/34427#issuecomment-660760789

PR-URL: https://github.com/nodejs/node/pull/34433
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
---
 Makefile    | 6 +++---
 vcbuild.bat | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 354996e3955dfb..cf16a62f92d4cb 100644
--- a/Makefile
+++ b/Makefile
@@ -495,8 +495,8 @@ test-all-suites: | clear-stalled test-build bench-addons-build doc-only ## Run a
 JS_SUITES ?= default
 NATIVE_SUITES ?= addons js-native-api node-api
 # CI_* variables should be kept synchronized with the ones in vcbuild.bat
-CI_NATIVE_SUITES ?= $(NATIVE_SUITES)
-CI_JS_SUITES ?= $(JS_SUITES) benchmark
+CI_NATIVE_SUITES ?= $(NATIVE_SUITES) benchmark
+CI_JS_SUITES ?= $(JS_SUITES)
 ifeq ($(node_use_openssl), false)
 	CI_DOC := doctool
 else
@@ -507,7 +507,7 @@ endif
 # Build and test addons without building anything else
 # Related CI job: node-test-commit-arm-fanned
 test-ci-native: LOGLEVEL := info
-test-ci-native: | test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
+test-ci-native: | benchmark/napi/.buildstamp test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
 	$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
 		--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
 		$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)
diff --git a/vcbuild.bat b/vcbuild.bat
index ac4c604aa80445..eb7bc0d74ec7b9 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -18,8 +18,8 @@ cd %~dp0
 set JS_SUITES=default
 set NATIVE_SUITES=addons js-native-api node-api
 @rem CI_* variables should be kept synchronized with the ones in Makefile
-set "CI_NATIVE_SUITES=%NATIVE_SUITES%"
-set "CI_JS_SUITES=%JS_SUITES% benchmark"
+set "CI_NATIVE_SUITES=%NATIVE_SUITES% benchmark"
+set "CI_JS_SUITES=%JS_SUITES%"
 set CI_DOC=doctool
 @rem Same as the test-ci target in Makefile
 set "common_test_suites=%JS_SUITES% %NATIVE_SUITES%&set build_addons=1&set build_js_native_api_tests=1&set build_node_api_tests=1"