diff options
author | Kunal Pathak <kpathak@microsoft.com> | 2017-06-28 15:24:52 -0700 |
---|---|---|
committer | Kunal Pathak <kpathak@microsoft.com> | 2017-07-26 18:08:30 -0700 |
commit | 09dd6bbec6dbb9cc4e5ee615e249dcb749c8e777 (patch) | |
tree | 80fb55747c99c99a3e89a7add459dea5f4c967f2 /tools | |
parent | 77ca3cb47480543cb496e3012ab0c3b219dc57a3 (diff) | |
download | node-new-09dd6bbec6dbb9cc4e5ee615e249dcb749c8e777.tar.gz |
build,test: run v8 tests on windows
`vcbuild.bat test-v8` : Runs unit test from v8 repo
`vcbuild.bat test-v8-intl` : Runs intl test from v8 repo
`vcbuild.bat test-v8` : Runs benchmarks from v8 repo
The runs needs
https://www.chromium.org/developers/how-tos/install-depot-tools
installed on the machine expects environment variable
`DEPOT_TOOLS_PATH` to be set to the path.
Set environment variable `DISABLE_V8_I18N` to disable i18n.
PR-URL: https://github.com/nodejs/node/pull/13992
Refs: https://github.com/nodejs/node/pull/4704
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/test-v8.bat | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tools/test-v8.bat b/tools/test-v8.bat new file mode 100644 index 0000000000..d322c31a38 --- /dev/null +++ b/tools/test-v8.bat @@ -0,0 +1,45 @@ +if not defined DEPOT_TOOLS_PATH goto depot-tools-not-found +if "%config%"=="Debug" set test_args=%target_arch%.debug +if "%config%"=="Release" set test_args=%target_arch%.release +set savedpath=%path% +set path=%DEPOT_TOOLS_PATH%;%path% +pushd . + +set ERROR_STATUS=0 +echo calling: tools\make-v8.sh +sh tools\make-v8.sh +if errorlevel 1 set ERROR_STATUS=1&goto test-v8-exit +cd %~dp0 +cd deps\v8 +echo running 'python tools\dev\v8gen.py %test_args%' +call python tools\dev\v8gen.py %test_args% +if errorlevel 1 set ERROR_STATUS=1&goto test-v8-exit +echo running 'ninja -C out.gn/%test_args% %v8_build_options%' +call ninja -C out.gn/%test_args% %v8_build_options% +if errorlevel 1 set ERROR_STATUS=1&goto test-v8-exit +set path=%savedpath% + +if not defined test_v8 goto test-v8-intl +echo running 'python tools\run-tests.py %common_v8_test_options% %v8_test_options% --junitout ./v8-tap.xml' +call python tools\run-tests.py %common_v8_test_options% %v8_test_options% --junitout ./v8-tap.xml + +:test-v8-intl +if not defined test_v8_intl goto test-v8-benchmarks +echo running 'python tools\run-tests.py %common_v8_test_options% intl --junitout ./v8-intl-tap.xml' +call python tools\run-tests.py %common_v8_test_options% intl --junitout ./v8-intl-tap.xml + +:test-v8-benchmarks +if not defined test_v8_benchmarks goto test-v8-exit +echo running 'python tools\run-tests.py %common_v8_test_options% benchmarks --junitout ./v8-benchmarks-tap.xml' +call python tools\run-tests.py %common_v8_test_options% benchmarks --junitout ./v8-benchmarks-tap.xml +goto test-v8-exit + +:test-v8-exit +popd +if defined savedpath set path=%savedpath% +exit /b %ERROR_STATUS% + +:depot-tools-not-found +echo Failed to find a suitable depot tools to test v8 +exit /b 1 + |