summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBryon Leung <teslaslegacy@gmail.com>2015-03-27 21:39:06 -0700
committerMichael Dawson <michael_dawson@ca.ibm.com>2016-02-11 13:07:03 -0500
commitcd720f816a86afa47afe4369e41a9c6c607a6f70 (patch)
treebc106b7d4d5177968fbcea518a9469ba089995a9 /tools
parent9bee03aaf2d8137a5e490150e759750ccdc65202 (diff)
downloadandroid-node-v8-cd720f816a86afa47afe4369e41a9c6c607a6f70.tar.gz
android-node-v8-cd720f816a86afa47afe4369e41a9c6c607a6f70.tar.bz2
android-node-v8-cd720f816a86afa47afe4369e41a9c6c607a6f70.zip
test: run v8 tests from node tree
Ported by exinfinitum from a PR by jasnell: see https://github.com/nodejs/node-v0.x-archive/pull/14185 Allows the running of v8 tests on node's packaged v8 source code. Note that the limited win32 support added by jasnell has NOT been ported, and so these tests are currently UNIX ONLY. Note that gclient depot tools (see https://commondatastorage.googleapis.com/ chrome-infra-docs/flat/depot_tools/docs/html/ depot_tools_tutorial.html#_setting_up) and subversion are required to run tests. To perform tests, run the following commands: make v8 DESTCPU=(ARCH) make test-v8 DESTCPU=(ARCH) where (ARCH) is your CPU architecture, e.g. x64, ia32. DESTCPU MUST be specified for this to work properly. Can also do tests on debug build by using "make test-v8 DESTCPU=(ARCH) BUILDTYPE=Debug", or perform intl or benchmark tests via make test-v8-intl or test-v8-benchmarks respectively. Note that by default, quickcheck and TAP output are disabled, and i18n is enabled. To activate these options, use options"QUICKCHECK=True" and "ENABLE_V8_TAP=True" respectively. Use "DISABLE_V8_I18N" to disable i18n. Use V8_BUILD_OPTIONS to allow custom user-defined flags to be appended onto "make v8". Any tests performed after changes to the packaged v8 file will require recompiling of v8, which can be done using "make v8 DESTCPU=(ARCH)". Finally, two additional files necessary for one of the v8 tests have been added to the v8 folder. PR-URL: https://github.com/nodejs/node/pull/4704 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: targos - Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/make-v8.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/make-v8.sh b/tools/make-v8.sh
new file mode 100755
index 0000000000..f6efb66a56
--- /dev/null
+++ b/tools/make-v8.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+
+git_origin=$(git config --get remote.origin.url | sed 's/.\+[\/:]\([^\/]\+\/[^\/]\+\)$/\1/')
+git_branch=$(git rev-parse --abbrev-ref HEAD)
+v8ver=${1:-v8} #default v8
+svn_prefix=https://github.com
+svn_path="$svn_prefix/$git_origin/branches/$git_branch/deps/$v8ver"
+#svn_path="$git_origin/branches/$git_branch/deps/$v8ver"
+gclient_string="solutions = [{'name': 'v8', 'url': '$svn_path', 'managed': False}]"
+
+# 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
+
+ #if v8ver isn't v8, move the v8 folders
+ #back to what they were
+ if [ "$v8ver" != "v8" ]; then
+ mv v8 $v8ver
+ mv .v8old v8
+ fi
+ exit 0
+}
+
+cd deps
+echo $gclient_string > .gclient
+if [ "$v8ver" != "v8" ]; then
+ mv v8 .v8old
+ mv $v8ver v8
+fi
+gclient sync
+cleanup