Skip to content

Commit

Permalink
Add more build and test instructions to the doc
Browse files Browse the repository at this point in the history
Summary:
Add instruction on
1. how to build out of tree hermes
2. how to run Hermes aginast test262
3. how to run Hermes against Intl402

Reviewed By: neildhar

Differential Revision: D31045774

fbshipit-source-id: eb0612f732ab3962398079120f702c0743ce2263
  • Loading branch information
Huxpro authored and facebook-github-bot committed Sep 20, 2021
1 parent 030aadd commit 8b9a9c9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions doc/BuildingAndRunning.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ The build system has now been generated in the `build` directory. To perform the

cd build && ninja

Note that you can also pass an argument to specify a customized directory:

hermes/utils/build/configure.py ~/out_of_tree_build
cd out_of_tree_build && ninja


## Release Build

The above instructions create an unoptimized debug build. The `--distribute` flag will enable a release build, in the `build_release` directory. Example:
Expand Down Expand Up @@ -73,6 +79,21 @@ To run the Hermes test suite:

ninja check-hermes

To run Hermes against the test262 suite, you need to have a Hermes binary built
already and a clone of the [test262 repo](https://github.com/tc39/test262/):

hermes/utils/testsuite/run_testsuite.py -b <hermes_build> <test262>

E.g. if we configured at `~/hermes_build` (i.e. `~/hermes_build/bin/hermes` is
an executable) and cloned test262 at `~/test262`, then perform:

hermes/utils/testsuite/run_testsuite.py -b ~/hermes_build ~/test262/test

Note that you can also only test against part of a test suite, e.g. to run the
Intl402 subset of the test262, you can specifiy a subdir:

hermes/utils/testsuite/run_testsuite.py -b ~/hermes_build ~/test262/test/intl402

## Formatting Code

To automatically format all your changes, you will need `clang-format`, then
Expand Down

0 comments on commit 8b9a9c9

Please sign in to comment.