Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Unified Diff: docs/testing.md

Issue 1347153006: [Docs] Add wiki content to Markdown docs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: docs/testing.md
diff --git a/docs/testing.md b/docs/testing.md
new file mode 100644
index 0000000000000000000000000000000000000000..a777c0c5a0654106102628d0673ecc50723f5b3b
--- /dev/null
+++ b/docs/testing.md
@@ -0,0 +1,58 @@
+V8 includes a test framework that allows you to test the engine. The framework lets you run both our own test suites that are included with the source code and others, currently only the Mozilla tests.
+
+## Running the V8 tests
+
+Before you run the tests, you will have to build V8 with GYP using the instructions [here](http://code.google.com/p/v8-wiki/wiki/BuildingWithGYP)
+
+You can append `.check` to any build target to have tests run for it, e.g.
+```
+make ia32.release.check
+make ia32.check
+make release.check
+make check # builds and tests everything (no dot before "check"!)
+```
+
+Before submitting patches, you should always run the quickcheck target, which builds a fast debug build and runs only the most relevant tests:
+```
+make quickcheck
+```
+
+You can also run tests manually:
+```
+tools/run-tests.py --arch-and-mode=ia32.release [--outdir=foo]
+```
+
+Or you can run individual tests:
+```
+tools/run-tests.py --arch=ia32 cctest/test-heap/SymbolTable mjsunit/delete-in-eval
+```
+
+Run the script with `--help` to find out about its other options, `--outdir` defaults to `out`. Also note that using the `cctest` binary to run multiple tests in one process is not supported.
+
+## Running the Mozilla and Test262 tests
+
+The V8 test framework comes with support for running the Mozilla as well as the Test262 test suite. To download the test suites and then run them for the first time, do the following:
+
+```
+tools/run-tests.py --download-data mozilla
+tools/run-tests.py --download-data test262
+```
+
+To run the tests subsequently, you may omit the flag that downloads the test suite:
+
+```
+tools/run-tests.py mozilla
+tools/run-tests.py test262
+```
+
+Note that V8 fails a number of Mozilla tests because they require Firefox-specific extensions.
+
+## Running the WebKit tests
+
+Sometimes all of the above tests pass but WebKit build bots fail. To make sure WebKit tests pass run:
+
+```
+tools/run-tests.py --progress=verbose --outdir=out --arch=ia32 --mode=release webkit --timeout=200
+```
+
+Replace --arch and other parameters with values that match your build options.
« docs/building_with_gyp.md ('K') | « docs/source.md ('k') | docs/triaging_issues.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698