Skip to content

Commit

Permalink
Update build instructions to recommend using autoninja instead of ninja.
Browse files Browse the repository at this point in the history
Change-Id: I327542d2ec81be8d3d4240a82f7121c27c4994b3
Reviewed-on: https://chromium-review.googlesource.com/1169427
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582351}
  • Loading branch information
Dor1s authored and Commit Bot committed Aug 10, 2018
1 parent eeddc1f commit f5b31fc
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docs/accessibility/chromevox_on_desktop_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ your file anywhere!
Now build Chrome as usual, e.g.:

```
ninja -C out/cros chrome
autoninja -C out/cros chrome
```

And run it as usual to see a mostly-complete Chrome OS desktop inside
Expand Down
14 changes: 7 additions & 7 deletions docs/accessibility/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ content/shell/test_runner

To run all accessibility LayoutTests:
```
ninja -C out/release blink_tests
autoninja -C out/release blink_tests
third_party/blink/tools/run_web_tests.py --build-directory=out --target=release accessibility/
```

To run just one test by itself without the script:
```
ninja -C out/release blink_tests
autoninja -C out/release blink_tests
out/release/content_shell --run-web-tests third_party/WebKit/LayoutTests/accessibility/name-calc-inputs.html
```

Expand All @@ -64,7 +64,7 @@ content/browser/accessibility/dump_accessibility_tree_browsertest.cc

To run all tests:
```
ninja -C out/release content_browsertests
autoninja -C out/release content_browsertests
out/release/content_browsertests --gtest_filter="DumpAccessibilityTree*"
```

Expand All @@ -77,7 +77,7 @@ tree from the browser process, and running some test from there.

To run all tests:
```
ninja -C out/release content_browsertests
autoninja -C out/release content_browsertests
out/release/content_browsertests --gtest_filter="*ccessib*"
```

Expand All @@ -93,7 +93,7 @@ ui/accessibility

To run all tests:
```
ninja -C out/release accessibility_unittests
autoninja -C out/release accessibility_unittests
out/release/accessibility_unittests
```

Expand All @@ -103,14 +103,14 @@ You must build with ```target_os = "chromeos"``` in your GN args.

To run all tests:
```
ninja -C out/release chromevox_tests
autoninja -C out/release chromevox_tests
out/release/chromevox_tests --test-launcher-jobs=10
```

### Select-To-Speak tests

```
ninja -C out/release unit_tests
autoninja -C out/release unit_tests
out/release/unit_tests --gtest_filter="*SelectToSpeak*"
```

Expand Down
16 changes: 10 additions & 6 deletions docs/android_build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,13 @@ require you to set `CHROMIUM_OUTPUT_DIR=out/Default`.
Build Chromium with Ninja using the command:

```shell
ninja -C out/Default chrome_public_apk
autoninja -C out/Default chrome_public_apk
```

`autoninja` is a wrapper that automatically provides optimal values for the
arguments passed to `ninja`.


You can get a list of all of the other build targets from GN by running `gn ls
out/Default` from the command line. To compile one, pass the GN label to Ninja
with no preceding "//" (so, for `//chrome/test:unit_tests` use `ninja -C
Expand Down Expand Up @@ -244,7 +248,7 @@ third_party/android_tools/sdk/platform-tools/adb shell settings put global verif
### Build the full browser

```shell
ninja -C out/Default chrome_public_apk
autoninja -C out/Default chrome_public_apk
```

And deploy it to your Android device:
Expand All @@ -262,7 +266,7 @@ Wraps the content module (but not the /chrome embedder). See
for details on the content module and content shell.

```shell
ninja -C out/Default content_shell_apk
autoninja -C out/Default content_shell_apk
out/Default/bin/content_shell_apk install
```

Expand Down Expand Up @@ -333,22 +337,22 @@ a little slower since updated dex files are installed manually.
Here's an example:

```shell
ninja -C out/Default chrome_public_apk_incremental
autoninja -C out/Default chrome_public_apk_incremental
out/Default/bin/chrome_public_apk install --incremental --verbose
```

For gunit tests (note that run_*_incremental automatically add
`--fast-local-dev` when calling `test_runner.py`):

```shell
ninja -C out/Default base_unittests_incremental
autoninja -C out/Default base_unittests_incremental
out/Default/bin/run_base_unittests_incremental
```

For instrumentation tests:

```shell
ninja -C out/Default chrome_public_test_apk_incremental
autoninja -C out/Default chrome_public_test_apk_incremental
out/Default/bin/run_chrome_public_test_apk_incremental
```

Expand Down
2 changes: 1 addition & 1 deletion docs/code_coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ compiler.
$ gn gen out/coverage \
--args='use_clang_coverage=true is_component_build=false'
$ gclient runhooks
$ ninja -C out/coverage crypto_unittests url_unittests
$ autoninja -C out/coverage crypto_unittests url_unittests
```

### Step 2 Create Raw Profiles
Expand Down
5 changes: 4 additions & 1 deletion docs/fuchsia_build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ Currently, not all targets build on Fuchsia. You can build base\_unittests, for
example:

```shell
$ ninja -C out/fuchsia base_unittests
$ autoninja -C out/fuchsia base_unittests
```

`autoninja` is a wrapper that automatically provides optimal values for the
arguments passed to `ninja`.

## Run

Once it is built, you can run by:
Expand Down
2 changes: 1 addition & 1 deletion docs/how_to_add_your_feature_flag.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ __flag_descriptions.cc__ and __flag_descriptions.h__. After that, try running th

```bash
# Build unit_tests
ninja -C out/Default unit_tests
autoninja -C out/Default unit_tests
# Run AboutFlagsHistogramTest.CheckHistograms
./out/Default/unit_tests --gtest_filter=AboutFlagsHistogramTest.CheckHistograms
```
Expand Down
7 changes: 5 additions & 2 deletions docs/linux_build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,15 @@ hyperthreaded, 12 GB RAM)
Build Chromium (the "chrome" target) with Ninja using the command:

```shell
$ ninja -C out/Default chrome
$ autoninja -C out/Default chrome
```

`autoninja` is a wrapper that automatically provides optimal values for the
arguments passed to `ninja`.

You can get a list of all of the other build targets from GN by running `gn ls
out/Default` from the command line. To compile one, pass the GN label to Ninja
with no preceding "//" (so, for `//chrome/test:unit_tests` use `ninja -C
with no preceding "//" (so, for `//chrome/test:unit_tests` use `autoninja -C
out/Default chrome/test:unit_tests`).

## Run Chromium
Expand Down
7 changes: 5 additions & 2 deletions docs/mac_build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,15 @@ You might also want to [install ccache](ccache_mac.md) to speed up the build.
Build Chromium (the "chrome" target) with Ninja using the command:
```shell
$ ninja -C out/Default chrome
$ autoninja -C out/Default chrome
```
`autoninja` is a wrapper that automatically provides optimal values for the
arguments passed to `ninja`.
You can get a list of all of the other build targets from GN by running `gn ls
out/Default` from the command line. To compile one, pass the GN label to Ninja
with no preceding "//" (so, for `//chrome/test:unit_tests` use `ninja -C
with no preceding "//" (so, for `//chrome/test:unit_tests` use `autoninja -C
out/Default chrome/test:unit_tests`).
## Run Chromium
Expand Down
8 changes: 4 additions & 4 deletions docs/testing/layout_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Before you can run the layout tests, you need to build the `blink_tests` target
to get `content_shell` and all of the other needed binaries.

```bash
ninja -C out/Release blink_tests
autoninja -C out/Release blink_tests
```

On **Android** (layout test support
Expand All @@ -32,7 +32,7 @@ build and install `content_shell_apk` instead. See also:
[Android Build Instructions](../android_build_instructions.md).

```bash
ninja -C out/Default content_shell_apk
autoninja -C out/Default content_shell_apk
adb install -r out/Default/apks/ContentShell.apk
```

Expand Down Expand Up @@ -408,7 +408,7 @@ machine?

### Debugging DevTools Tests

* Add `debug_devtools=true` to args.gn and compile: `ninja -C out/Default devtools_frontend_resources`
* Add `debug_devtools=true` to args.gn and compile: `autoninja -C out/Default devtools_frontend_resources`
> Debug DevTools lets you avoid having to recompile after every change to the DevTools front-end.
* Do one of the following:
* Option A) Run from the chromium/src folder:
Expand Down Expand Up @@ -454,7 +454,7 @@ this:
# Exit code 125 tells git bisect to skip the revision.
gclient sync || exit 125
ninja -C out/Debug -j100 blink_tests || exit 125
autoninja -C out/Debug -j100 blink_tests || exit 125
third_party/blink/tools/run_web_tests.py -t Debug \
--no-show-results --no-retry-failures \
Expand Down
8 changes: 5 additions & 3 deletions docs/windows_build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,15 @@ CLParser::Parse 45 1889.1 85.0
## Build Chromium
Build Chromium (the "chrome" target) with Ninja (or autoninja) using the
command:
Build Chromium (the "chrome" target) with Ninja using the command:
```shell
$ ninja -C out\Default chrome
$ autoninja -C out\Default chrome
```
`autoninja` is a wrapper that automatically provides optimal values for the
arguments passed to `ninja`.
You can get a list of all of the other build targets from GN by running
`gn ls out/Default` from the command line. To compile one, pass to Ninja
the GN label with no preceding "//" (so for `//chrome/test:unit_tests`
Expand Down

0 comments on commit f5b31fc

Please sign in to comment.