Caleb Raitto | b0cd9fa5 | 2018-12-13 19:15:04 | [diff] [blame] | 1 | # Testing Cronet native API on desktop |
| 2 | |
| 3 | [TOC] |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | The Cronet native API is cross-platform, usable on multiple desktop and mobile |
| 8 | platforms. |
| 9 | |
| 10 | TODO(caraitto): Add mobile test information for the native API in the |
| 11 | Android and iOS pages as instructions for testing vary by platform. |
| 12 | |
| 13 | ## Checkout and build |
| 14 | |
| 15 | See instructions in the [common checkout and |
| 16 | build](/components/cronet/build_instructions.md). |
| 17 | |
| 18 | ## Running tests locally |
| 19 | |
| 20 | To 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 | |
| 31 | To 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 | |
| 38 | This will test against several mobile and desktop platforms, along with |
| 39 | special configurations like ASAN and TSAN. |
| 40 | |
| 41 | You can use the -b flag to test against just one of those, like this: |
| 42 | |
| 43 | ```shell |
Stephen Martinis | 089f5f0 | 2019-02-12 02:42:24 | [diff] [blame] | 44 | $ git cl try -b linux-rel |
Caleb Raitto | b0cd9fa5 | 2018-12-13 19:15:04 | [diff] [blame] | 45 | ``` |