aboutsummaryrefslogtreecommitdiff
path: root/en/compatibility/tests/development/test-mapping.md
diff options
context:
space:
mode:
authorAndroid Partner Docs <noreply@android.com>2019-01-25 14:26:34 -0800
committerMark Hecomovich <mheco@google.com>2019-01-25 14:56:27 -0800
commit964c5956c98fb20ab44ead57e59b5c0ed9f0ab11 (patch)
tree94e1ae7edb82c95a5da83468b6ea104d651850f3 /en/compatibility/tests/development/test-mapping.md
parentd8c39787c5a4061686695502e62c0477b939c633 (diff)
downloadsource.android.com-964c5956c98fb20ab44ead57e59b5c0ed9f0ab11.tar.gz
Docs: Changes to source.android.com
- 230969164 Add details about supported deviceless tests by Android Partner Docs <noreply@android.com> - 230954177 Devsite localized content from translation request 1089952. by Android Partner Docs <noreply@android.com> - 230924636 Devsite localized content from translation request 1092604. by Android Partner Docs <noreply@android.com> - 230924621 Devsite localized content from translation request 1091268. by Android Partner Docs <noreply@android.com> - 230811847 Please review this new content for "Automotive Power Mana... by Janet Davies <janetd@google.com> - 230794111 Add HWASan to the docs ready for bootcamp. by Android Partner Docs <noreply@android.com> - 230779068 Link to NDK docs on DAC from first reference to Make by Android Partner Docs <noreply@android.com> - 230744983 Devsite localized content from translation request 1092191. by Android Partner Docs <noreply@android.com> - 230744981 Devsite localized content from translation request 1093422. by Android Partner Docs <noreply@android.com> - 230744964 Devsite localized content from translation request 1094193. by Android Partner Docs <noreply@android.com> - 230742820 Moving Marshmallow 6.0 to No Release Planned as CTS 6.0 w... by Android Partner Docs <noreply@android.com> - 230614628 Fixed broken links (they were relative and not absolute f... by Christina Nguyen <cqn@google.com> - 230384953 Remove rogue parenthesis by Danielle Roberts <daroberts@google.com> - 230375898 Fix broken links to subpages with absolute paths by Android Partner Docs <noreply@android.com> - 230364707 Devsite localized content from translation request 1093572. by Android Partner Docs <noreply@android.com> - 230364690 Devsite localized content from translation request 1093439. by Android Partner Docs <noreply@android.com> - 230364619 Devsite localized content from translation request 1089936. by Android Partner Docs <noreply@android.com> - 230364605 Devsite localized content from translation request 1086836. by Android Partner Docs <noreply@android.com> - 230364588 Devsite localized content from translation request 1093713. by Android Partner Docs <noreply@android.com> - 230364494 Devsite localized content from translation request 1093448. by Android Partner Docs <noreply@android.com> - 230364465 Devsite localized content from translation request 1091295. by Android Partner Docs <noreply@android.com> - 230364454 Devsite localized content from translation request 1092609. by Android Partner Docs <noreply@android.com> - 230364368 Devsite localized content from translation request 1048174. by Android Partner Docs <noreply@android.com> - 230364354 Devsite localized content from translation request 1047598. by Android Partner Docs <noreply@android.com> - 230364346 Devsite localized content from translation request 1089969. by Android Partner Docs <noreply@android.com> - 230020584 Update the guide for using vendor provided bcc by Android Partner Docs <noreply@android.com> - 229999258 Fix a typo in gsi.html by Android Partner Docs <noreply@android.com> - 229997798 Add file_patterns attribute documentation by Android Partner Docs <noreply@android.com> - 229991256 Update the characters for zh-cn and zh-tw in the Security... by Danielle Roberts <daroberts@google.com> - 229977174 Moving time zones to Updates (from Permissions); also upd... by Heidi von Markham <hvm@google.com> - 229831729 Devsite localized content from translation request 1090171. by Android Partner Docs <noreply@android.com> - 229831714 Devsite localized content from translation request 1090622. by Android Partner Docs <noreply@android.com> - 229831667 Devsite localized content from translation request 1015775. by Android Partner Docs <noreply@android.com> - 229831656 Devsite localized content from translation request 1088392. by Android Partner Docs <noreply@android.com> - 229831644 Devsite localized content from translation request 1090166. by Android Partner Docs <noreply@android.com> - 229581198 Devsite localized content from translation request 1086821. by Android Partner Docs <noreply@android.com> - 229425689 Fixing typos for Shutdown (to shutdown) by Heidi von Markham <hvm@google.com> - 229416134 Update a paragraph in the permission model section of the... by Luke Haviland <lhaviland@google.com> - 229402835 Devsite localized content from translation request 553155. by Android Partner Docs <noreply@android.com> - 229305053 Devsite localized content from translation request 1091266. by Android Partner Docs <noreply@android.com> - 229305046 Devsite localized content from translation request 1091273. by Android Partner Docs <noreply@android.com> - 229245843 Devsite localized content from translation request 1015221. by Android Partner Docs <noreply@android.com> - 228916961 Fix typo by Kenneth Lau <kennethlau@google.com> - 228796242 Change "Optional" to "Required" by Kenneth Lau <kennethlau@google.com> - 228720589 Devsite localized content from translation request 1090636. by Android Partner Docs <noreply@android.com> - 228612958 Added Joshua Laney's information to November security ack... by Luke Haviland <lhaviland@google.com> - 228585561 Update versions file by Kenneth Lau <kennethlau@google.com> - 228557861 Devsite localized content from translation request 1089965. by Android Partner Docs <noreply@android.com> - 228541590 Fix HTML. by Android Partner Docs <noreply@android.com> - 228525372 Replace unresolved variable reference in localized files. by Android Partner Docs <noreply@android.com> - 228439111 Add missing < by Android Partner Docs <noreply@android.com> - 228436522 Adding the January Android bulletin acknowledgements by Luke Haviland <lhaviland@google.com> - 228407590 Correct the naming of EGL extension, and point the link t... by Android Partner Docs <noreply@android.com> - 228395277 Rename Test Config to Build Config to better reflect Soon... by Android Partner Docs <noreply@android.com> - 228340013 Devsite localized content from translation request 1044284. by Android Partner Docs <noreply@android.com> - 228340002 Devsite localized content from translation request 1048178. by Android Partner Docs <noreply@android.com> - 228339974 Devsite localized content from translation request 1089289. by Android Partner Docs <noreply@android.com> - 228339806 Devsite localized content from translation request 999875. by Android Partner Docs <noreply@android.com> - 228339785 Devsite localized content from translation request 1046259. by Android Partner Docs <noreply@android.com> - 228339757 Devsite localized content from translation request 1049718. by Android Partner Docs <noreply@android.com> - 228267452 Add information on gdbclient.py by Kenneth Lau <kennethlau@google.com> - 228261450 Adding the Android AOSP links to the Android January secu... by Luke Haviland <lhaviland@google.com> - 228247613 Fill in security levels for December 2018 builds. by Android Partner Docs <noreply@android.com> - 228241115 Add January 2019 builds. by Android Partner Docs <noreply@android.com> - 228208289 Remove _toc-*.yaml files that are no longer used due to r... by Christina Nguyen <cqn@google.com> - 228205865 Devsite localized content from translation request 1048626. by Android Partner Docs <noreply@android.com> - 228205856 Devsite localized content from translation request 1048155. by Android Partner Docs <noreply@android.com> - 228205845 Devsite localized content from translation request 1047886. by Android Partner Docs <noreply@android.com> - 228186179 Adding the January 2019 security Android/Pixel bulletins. by Luke Haviland <lhaviland@google.com> - 228183717 Add BCC native stack dump documentation by Android Partner Docs <noreply@android.com> - 228181974 Devsite localized content from translation request 1089935. by Android Partner Docs <noreply@android.com> - 227911224 Add more information on cts-dev and also --skip-precondit... by Android Partner Docs <noreply@android.com> - 227772142 Update image path by Danielle Roberts <daroberts@google.com> - 227719040 Fix broken links by Kenneth Lau <kennethlau@google.com> - 227715850 Devsite localized content from translation request 1045494. by Android Partner Docs <noreply@android.com> - 227715841 Devsite localized content from translation request 1044265. by Android Partner Docs <noreply@android.com> - 227715826 Devsite localized content from translation request 1087340. by Android Partner Docs <noreply@android.com> - 227709199 Fix path on images by Danielle Roberts <daroberts@google.com> - 227620512 Devsite localized content from translation request 1032286. by Android Partner Docs <noreply@android.com> - 227620508 Devsite localized content from translation request 1087344. by Android Partner Docs <noreply@android.com> - 227620485 Devsite localized content from translation request 1087104. by Android Partner Docs <noreply@android.com> - 227620481 Devsite localized content from translation request 1046261. by Android Partner Docs <noreply@android.com> - 227620479 Devsite localized content from translation request 1087239. by Android Partner Docs <noreply@android.com> - 227617540 Devsite localized content from translation request 1007762. by Android Partner Docs <noreply@android.com> - 227617535 Devsite localized content from translation request 1089145. by Android Partner Docs <noreply@android.com> - 227617491 Devsite localized content from translation request 1087109. by Android Partner Docs <noreply@android.com> - 227617482 Devsite localized content from translation request 1047584. by Android Partner Docs <noreply@android.com> - 227617480 Devsite localized content from translation request 1089449. by Android Partner Docs <noreply@android.com> - 227617378 Devsite localized content from translation request 1087099. by Android Partner Docs <noreply@android.com> - 227610447 Add variable tag to CTS downloads page by Danielle Roberts <daroberts@google.com> - 227595909 Add link to camera section on CTS setup page by Kenneth Lau <kennethlau@google.com> - 227595777 Change title to title case by Kenneth Lau <kennethlau@google.com> - 227546776 Newline between function and param descriptions. by Android Partner Docs <noreply@android.com> - 227546753 Small edits to system best practices by Danielle Roberts <daroberts@google.com> - 227033873 Document "run cts-dev" command, present CTS V2 first by Android Partner Docs <noreply@android.com> - 226772000 Devsite localized content from translation request 1041964. by Android Partner Docs <noreply@android.com> - 226552899 Announce Adiantum on SAC home page by Danielle Roberts <daroberts@google.com> - 226550934 Add Adiantum docs to encryption section by Danielle Roberts <daroberts@google.com> - 226530870 Devsite localized content from translation request 1046265. by Android Partner Docs <noreply@android.com> - 226497667 Devsite localized content from translation request 1047878. by Android Partner Docs <noreply@android.com> (And 26 more changes) PiperOrigin-RevId: 230969164 Change-Id: I2bf51b3793304247e04b953816961605fe1ba4bf
Diffstat (limited to 'en/compatibility/tests/development/test-mapping.md')
-rw-r--r--en/compatibility/tests/development/test-mapping.md35
1 files changed, 32 insertions, 3 deletions
diff --git a/en/compatibility/tests/development/test-mapping.md b/en/compatibility/tests/development/test-mapping.md
index 5f843199..1c113219 100644
--- a/en/compatibility/tests/development/test-mapping.md
+++ b/en/compatibility/tests/development/test-mapping.md
@@ -88,7 +88,12 @@ Here is a sample TEST_MAPPING file:
{
"include-annotation": "android.platform.test.annotations.RequiresDevice"
}
- ]
+ ],
+ "file_patterns": ["(/|^)Window[^/]*\\.java", "(/|^)Activity[^/]*\\.java"]
+ },
+ {
+ "name" : "net_test_avrcp",
+ "host" : true
}
],
"postsubmit": [
@@ -120,11 +125,24 @@ use class `name` or test method `name`. To narrow down the tests to run, you can
use options such as `include-filter` here. See
([include-filter sample usage](https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/pm/dex/TEST_MAPPING#7)).
-The `imports` attribute allows you to include tests in other TEST_MAPPING files
+The **host** setting of a test indicates whether the test is a deviceless test
+running on host or not. The default value is **false**, meaning the test
+requires a device to run. The supported test types are
+[HostGTest](/compatibility/tests/development/native) for native tests and
+[HostTest](/compatibility/tests/development/jar) for JUnit tests.
+
+The **file_patterns** attribute allows you to set a list of regex strings for
+matching the relative path of any source code file (relative to the directory
+containing the TEST_MAPPING file). In above example, test `CtsWindowManagerDeviceTestCases`
+will run in presubmit only when any java file starts with Window or Activity,
+which exists in the same directory of the TEST_MAPPING file or any of its sub
+directories, is changed. Note that `\` needs to escaped as it's in a JSON file.
+
+The **imports** attribute allows you to include tests in other TEST_MAPPING files
without copying the content. Note that the TEST_MAPPING files in the parent
directories of the imported path will also be included.
-The `options` attribute contains additional TradeFed command line options. In
+The **options** attribute contains additional TradeFed command line options. In
the above example, only tests with annotation `Presubmit` will run in presubmit;
all tests will run in postsubmit.
@@ -240,6 +258,17 @@ and its parent directories:
<code class="devsite-terminal">atest [--test-mapping] [src_path]:postsubmit</code>
</pre>
+### Running only tests that require no device
+
+You can use option **--host** for Atest to only run tests configured against the
+host that require no device. Without this option, Atest will run both tests, the
+ones requiring device and the ones running on host and require no device. The
+tests will be run in two seperate suites.
+
+<pre>
+<code class="devsite-terminal">atest [--test-mapping] --host</code>
+</pre>
+
### Identifying test groups
You can specify test groups in the Atest command. Note that presubmit tests are