blob: 56549831b5141ce4204eb24aae8720184a300a61 [file] [log] [blame] [view]
Caleb Raittob0cd9fa52018-12-13 19:15:041# Testing Cronet native API on desktop
2
3[TOC]
4
5## Overview
6
7The Cronet native API is cross-platform, usable on multiple desktop and mobile
8platforms.
9
10TODO(caraitto): Add mobile test information for the native API in the
11Android and iOS pages as instructions for testing vary by platform.
12
13## Checkout and build
14
15See instructions in the [common checkout and
16build](/components/cronet/build_instructions.md).
17
18## Running tests locally
19
20To run Cronet native API unit and integration tests:
21
22```shell
23$ gn gen out/Default # Generate Ninja build files.
24$ ninja -C out/Default cronet_unittests cronet_tests # Build both test suites.
25$ ./out/Default/cronet_unittests # Run unit tests.
26$ ./out/Default/cronet_tests # Run the integration tests.
27```
28
29# Running tests remotely
30
31To test against all tryjobs:
32
33```shell
34$ git cl upload # Upload to Gerrit.
35$ git cl try # Run the tryjob, results posted in the Gerrit review.
36```
37
38This will test against several mobile and desktop platforms, along with
39special configurations like ASAN and TSAN.
40
41You can use the -b flag to test against just one of those, like this:
42
43```shell
Stephen Martinis089f5f02019-02-12 02:42:2444$ git cl try -b linux-rel
Caleb Raittob0cd9fa52018-12-13 19:15:0445```