Skip to content

Commit 3e6ff85

Browse files
targosMylesBorins
authored andcommittedApr 11, 2018
tools: fix make test-v8
PR-URL: #19201 Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 17d4368 commit 3e6ff85

File tree

2 files changed

+16
-69
lines changed

2 files changed

+16
-69
lines changed
 

‎Makefile

+10-25
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,12 @@ ifdef JOBS
2020
PARALLEL_ARGS = -j $(JOBS)
2121
endif
2222

23-
ifdef QUICKCHECK
24-
QUICKCHECK_ARG := --quickcheck
25-
endif
26-
2723
ifdef ENABLE_V8_TAP
2824
TAP_V8 := --junitout $(PWD)/v8-tap.xml
2925
TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml
3026
TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml
3127
endif
3228

33-
V8_BUILD_OPTIONS += GYPFLAGS="-Dclang=0"
3429
V8_TEST_OPTIONS = $(V8_EXTRA_TEST_OPTIONS)
3530
ifdef DISABLE_V8_I18N
3631
V8_BUILD_OPTIONS += i18nsupport=off
@@ -233,8 +228,7 @@ endif
233228
# Rebuilds deps/v8 as a git tree, pulls its third-party dependencies, and
234229
# builds it.
235230
v8:
236-
tools/make-v8.sh
237-
$(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
231+
tools/make-v8.sh $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
238232

239233
.PHONY: jstest
240234
jstest: build-addons build-addons-napi ## Runs addon tests and JS tests
@@ -569,31 +563,22 @@ test-with-async-hooks:
569563
ifneq ("","$(wildcard deps/v8/tools/run-tests.py)")
570564
# Related CI job: node-test-commit-v8-linux
571565
test-v8: v8 ## Runs the V8 test suite on deps/v8.
572-
# Performs a full test unless QUICKCHECK is specified.
573-
# Note that we cannot run the tests in deps/v8 directly without rebuilding a
574-
# git tree and using gclient to pull the third-party dependencies, which is
575-
# done by the `v8` target.
576-
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \
577-
--mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) $(QUICKCHECK_ARG) \
578-
--no-presubmit \
579-
--shell-dir=$(PWD)/deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) \
580-
$(TAP_V8)
581-
git clean -fdxq -- deps/v8
566+
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) \
567+
--mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) \
568+
mjsunit cctest debugger inspector message preparser \
569+
$(TAP_V8)
582570
@echo Testing hash seed
583571
$(MAKE) test-hash-seed
584572

585573
test-v8-intl: v8
586-
# Performs a full test unless QUICKCHECK is specified.
587-
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \
588-
--mode=$(BUILDTYPE_LOWER) --no-presubmit $(QUICKCHECK_ARG) \
589-
--shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) intl \
574+
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) \
575+
--mode=$(BUILDTYPE_LOWER) intl \
590576
$(TAP_V8_INTL)
591577

592578
test-v8-benchmarks: v8
593-
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) --mode=$(BUILDTYPE_LOWER) \
594-
--download-data $(QUICKCHECK_ARG) --no-presubmit \
595-
--shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) benchmarks \
596-
$(TAP_V8_BENCHMARKS)
579+
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) --mode=$(BUILDTYPE_LOWER) \
580+
benchmarks \
581+
$(TAP_V8_BENCHMARKS)
597582

598583
test-v8-all: test-v8 test-v8-intl test-v8-benchmarks
599584
# runs all v8 tests

‎tools/make-v8.sh

+6-44
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,9 @@
11
#!/bin/bash
22

3-
# Get V8 branch from v8/include/v8-version.h
4-
MAJOR=$(grep V8_MAJOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3)
5-
MINOR=$(grep V8_MINOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3)
6-
BRANCH=$MAJOR.$MINOR
3+
BUILD_ARCH_TYPE=$1
4+
V8_BUILD_OPTIONS=$2
75

8-
# clean up if someone presses ctrl-c
9-
trap cleanup INT
10-
11-
function cleanup() {
12-
trap - INT
13-
rm .gclient || true
14-
rm .gclient_entries || true
15-
rm -rf _bad_scm/ || true
16-
find v8 -name ".git" | xargs rm -rf || true
17-
echo "git cleanup"
18-
git reset --hard HEAD
19-
git clean -fdq
20-
# unstash local changes
21-
git stash pop
22-
exit 0
23-
}
24-
25-
cd deps
26-
# stash local changes
27-
git stash
28-
rm -rf v8
29-
30-
echo "Fetching V8 from chromium.googlesource.com"
31-
fetch v8
32-
if [ "$?" -ne 0 ]; then
33-
echo "V8 fetch failed"
34-
exit 1
35-
fi
36-
echo "V8 fetched"
37-
38-
cd v8
39-
40-
echo "Checking out branch:$BRANCH"
41-
git checkout remotes/branch-heads/$BRANCH
42-
43-
echo "Sync dependencies"
44-
gclient sync
45-
46-
cd ..
47-
cleanup
6+
cd deps/v8
7+
tools/node/fetch_deps.py .
8+
PATH=~/_depot_tools:$PATH tools/dev/v8gen.py $BUILD_ARCH_TYPE --no-goma $V8_BUILD_OPTIONS
9+
PATH=~/_depot_tools:$PATH ninja -C out.gn/$BUILD_ARCH_TYPE/ d8 cctest inspector-test

0 commit comments

Comments
 (0)
Please sign in to comment.