diff options
| author | Yifan Hong <elsk@google.com> | 2019-08-16 13:59:40 -0700 |
|---|---|---|
| committer | Yifan Hong <elsk@google.com> | 2019-08-23 13:58:47 -0700 |
| commit | fd659bdfed3f190d2d2cb283b53e53b730fc08ab (patch) | |
| tree | 5a8a1dbb9763859ce4c2d76fcfd12a3973bd2066 | |
| parent | 3bd09415a3f859467fae2b1516ffa3e95431bfa0 (diff) | |
Add liblp_test to presubmit.
Create a new test binary, liblp_test, that can run on presubmit.
Bug: 138328907
Test: TH
Test: atest liblp_test
Change-Id: I968ff84078524e5733da9b009d9a7222aad299bd
| -rw-r--r-- | fs_mgr/liblp/Android.bp | 28 | ||||
| -rw-r--r-- | fs_mgr/liblp/TEST_MAPPING | 7 | ||||
| -rw-r--r-- | fs_mgr/liblp/liblp_test.xml | 27 |
3 files changed, 53 insertions, 9 deletions
diff --git a/fs_mgr/liblp/Android.bp b/fs_mgr/liblp/Android.bp index 2b11da262d..4ea60e571c 100644 --- a/fs_mgr/liblp/Android.bp +++ b/fs_mgr/liblp/Android.bp @@ -55,13 +55,14 @@ cc_library { export_include_dirs: ["include"], } -cc_test { - name: "liblp_test_static", +cc_defaults { + name: "liblp_test_defaults", defaults: ["fs_mgr_defaults"], cppflags: [ "-Wno-unused-parameter", ], static_libs: [ + "libcutils", "libgmock", "libfs_mgr", "liblp", @@ -74,11 +75,20 @@ cc_test { "test_partition_opener.cpp", "utility_test.cpp", ], - target: { - android: { - static_libs: [ - "libcutils", - ], - }, - }, } + +cc_test { + name: "liblp_test", + defaults: ["liblp_test_defaults"], + test_config: "liblp_test.xml", + test_suites: [ + "device-tests", + "vts-core", + ], +} + +cc_test { + name: "liblp_test_static", + defaults: ["liblp_test_defaults"], +} + diff --git a/fs_mgr/liblp/TEST_MAPPING b/fs_mgr/liblp/TEST_MAPPING new file mode 100644 index 0000000000..04bcbda548 --- /dev/null +++ b/fs_mgr/liblp/TEST_MAPPING @@ -0,0 +1,7 @@ +{ + "presubmit": [ + { + "name": "liblp_test" + } + ] +} diff --git a/fs_mgr/liblp/liblp_test.xml b/fs_mgr/liblp/liblp_test.xml new file mode 100644 index 0000000000..d9ee12eac2 --- /dev/null +++ b/fs_mgr/liblp/liblp_test.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2019 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<configuration description="Config for liblp_test"> + <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> + <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> + <option name="cleanup" value="true" /> + <option name="push" value="liblp_test->/data/local/tmp/liblp_test" /> + </target_preparer> + <option name="test-suite-tag" value="vts-core" /> + <test class="com.android.tradefed.testtype.GTest" > + <option name="native-test-device-path" value="/data/local/tmp" /> + <option name="module-name" value="liblp_test" /> + </test> +</configuration> |
