summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2018-03-14 13:04:48 +0100
committerMyles Borins <mylesborins@google.com>2018-04-11 13:23:27 -0400
commit3e6ff8589442fddcd15828c272bf68c26c30d951 (patch)
tree064c5b74967251bbe4a3034c4b8fe914d4614d22
parent17d4368cb170041505866a97de88b13c37873428 (diff)
downloadandroid-node-v8-3e6ff8589442fddcd15828c272bf68c26c30d951.tar.gz
android-node-v8-3e6ff8589442fddcd15828c272bf68c26c30d951.tar.bz2
android-node-v8-3e6ff8589442fddcd15828c272bf68c26c30d951.zip
tools: fix make test-v8
PR-URL: https://github.com/nodejs/node/pull/19201 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-rw-r--r--Makefile35
-rwxr-xr-xtools/make-v8.sh50
2 files changed, 16 insertions, 69 deletions
diff --git a/Makefile b/Makefile
index b153a128d5..00a3e46df8 100644
--- a/Makefile
+++ b/Makefile
@@ -20,17 +20,12 @@ ifdef JOBS
PARALLEL_ARGS = -j $(JOBS)
endif
-ifdef QUICKCHECK
- QUICKCHECK_ARG := --quickcheck
-endif
-
ifdef ENABLE_V8_TAP
TAP_V8 := --junitout $(PWD)/v8-tap.xml
TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml
TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml
endif
-V8_BUILD_OPTIONS += GYPFLAGS="-Dclang=0"
V8_TEST_OPTIONS = $(V8_EXTRA_TEST_OPTIONS)
ifdef DISABLE_V8_I18N
V8_BUILD_OPTIONS += i18nsupport=off
@@ -233,8 +228,7 @@ endif
# Rebuilds deps/v8 as a git tree, pulls its third-party dependencies, and
# builds it.
v8:
- tools/make-v8.sh
- $(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
+ tools/make-v8.sh $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
.PHONY: jstest
jstest: build-addons build-addons-napi ## Runs addon tests and JS tests
@@ -569,31 +563,22 @@ test-with-async-hooks:
ifneq ("","$(wildcard deps/v8/tools/run-tests.py)")
# Related CI job: node-test-commit-v8-linux
test-v8: v8 ## Runs the V8 test suite on deps/v8.
-# Performs a full test unless QUICKCHECK is specified.
-# Note that we cannot run the tests in deps/v8 directly without rebuilding a
-# git tree and using gclient to pull the third-party dependencies, which is
-# done by the `v8` target.
- deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \
- --mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) $(QUICKCHECK_ARG) \
- --no-presubmit \
- --shell-dir=$(PWD)/deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) \
- $(TAP_V8)
- git clean -fdxq -- deps/v8
+ deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) \
+ --mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) \
+ mjsunit cctest debugger inspector message preparser \
+ $(TAP_V8)
@echo Testing hash seed
$(MAKE) test-hash-seed
test-v8-intl: v8
-# Performs a full test unless QUICKCHECK is specified.
- deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \
- --mode=$(BUILDTYPE_LOWER) --no-presubmit $(QUICKCHECK_ARG) \
- --shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) intl \
+ deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) \
+ --mode=$(BUILDTYPE_LOWER) intl \
$(TAP_V8_INTL)
test-v8-benchmarks: v8
- deps/v8/tools/run-tests.py --arch=$(V8_ARCH) --mode=$(BUILDTYPE_LOWER) \
- --download-data $(QUICKCHECK_ARG) --no-presubmit \
- --shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) benchmarks \
- $(TAP_V8_BENCHMARKS)
+ deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) --mode=$(BUILDTYPE_LOWER) \
+ benchmarks \
+ $(TAP_V8_BENCHMARKS)
test-v8-all: test-v8 test-v8-intl test-v8-benchmarks
# runs all v8 tests
diff --git a/tools/make-v8.sh b/tools/make-v8.sh
index 786171facf..4365412856 100755
--- a/tools/make-v8.sh
+++ b/tools/make-v8.sh
@@ -1,47 +1,9 @@
#!/bin/bash
-# Get V8 branch from v8/include/v8-version.h
-MAJOR=$(grep V8_MAJOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3)
-MINOR=$(grep V8_MINOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3)
-BRANCH=$MAJOR.$MINOR
+BUILD_ARCH_TYPE=$1
+V8_BUILD_OPTIONS=$2
-# clean up if someone presses ctrl-c
-trap cleanup INT
-
-function cleanup() {
- trap - INT
- rm .gclient || true
- rm .gclient_entries || true
- rm -rf _bad_scm/ || true
- find v8 -name ".git" | xargs rm -rf || true
- echo "git cleanup"
- git reset --hard HEAD
- git clean -fdq
- # unstash local changes
- git stash pop
- exit 0
-}
-
-cd deps
-# stash local changes
-git stash
-rm -rf v8
-
-echo "Fetching V8 from chromium.googlesource.com"
-fetch v8
-if [ "$?" -ne 0 ]; then
- echo "V8 fetch failed"
- exit 1
-fi
-echo "V8 fetched"
-
-cd v8
-
-echo "Checking out branch:$BRANCH"
-git checkout remotes/branch-heads/$BRANCH
-
-echo "Sync dependencies"
-gclient sync
-
-cd ..
-cleanup
+cd deps/v8
+tools/node/fetch_deps.py .
+PATH=~/_depot_tools:$PATH tools/dev/v8gen.py $BUILD_ARCH_TYPE --no-goma $V8_BUILD_OPTIONS
+PATH=~/_depot_tools:$PATH ninja -C out.gn/$BUILD_ARCH_TYPE/ d8 cctest inspector-test