Tooling to assist in the process of re-implementing JavaScript language tests from Google's V8 project to ECMA's Test262 project.
This repository serves as a superproject to Bocoup's forks of V8 and Test262.
Because of this, the repo shouldn't be cloned using git clone
directly.
Instead, follow these steps:
- Install Node.js
- Install
git-slave
: http://gitslave.sourceforge.net/ - Clone this repository:
gits clone git@github.com:bocoup/test262-v8-machinery.git
- Run the
bin/init.sh
script
Use the gits
wrapper and a few simple Bash scripts to synchronize changes
across the V8 and Test262 projects.
- Create a migration branch.
gits checkout -b migration-twenty-three
- Use the
scripts/migrate.sh
executable to move a test file from the V8 project into the Test262 project. This will automatically apply some simple transformations necessary to run the tests in the Test262 harness.
./scripts/migrate.sh \
v8-git-mirror/test/mjsunit/es6/json.js \
test262/test/built-ins/JSON/new-stuff.js
-
Update the new test file to fit more naturally in the Test262 test suite. This can be done with any editor and may include:
- removing assertions for V8 internals
- modifying code style
- re-factoring the tests to span multiple files
-
Verify the new tests pass:
$ ./scripts/run-tests.sh
# The above assumes V8 has been built in this project's clone of the project.
# You may optionally specify a different JavaScript runtime
$ ./scripts/run-tests.sh js
- Add the changes from each sub-project.
gits add --all .
- Commit the changes.
./scripts/commit.sh
- Publish your work!
gits push origin migration-twenty-three
- io.js
- via Homebrew:
brew install iojs
- via Homebrew:
- Node.js
- via Homebrew:
brew install node
- via Apt:
apt-get install nodejs
- via Homebrew:
- SpiderMonkey
- V8
- via Homebrew:
brew install v8
- via Homebrew:
Sync at any time:
gits pull --rebase upstream master
Copyright (c) 2015 Bocoup
Licensed under the MIT Expat license.