diff options
| author | 2019-07-01 11:09:50 +0000 | |
|---|---|---|
| committer | 2019-07-01 11:09:50 +0000 | |
| commit | 57bf6a993e552d92941c2ae5e87649435d9e944f (patch) | |
| tree | a1d3253e15fadb155633573af90652e9d3fb68af | |
| parent | 56a8c96e1f3f961e3bb830c47ab86f4c1e1c535a (diff) | |
| parent | e177e8e0caae3c52a121f4d18d8566e220e23b2b (diff) | |
Merge "Fix dumpstate_test test config"
| -rw-r--r-- | cmds/dumpstate/Android.bp | 2 | ||||
| -rw-r--r-- | cmds/dumpstate/dumpstate_test.xml | 29 | ||||
| -rw-r--r-- | cmds/dumpstate/tests/dumpstate_test.cpp | 5 |
3 files changed, 33 insertions, 3 deletions
diff --git a/cmds/dumpstate/Android.bp b/cmds/dumpstate/Android.bp index cbfd9557a3..4020480479 100644 --- a/cmds/dumpstate/Android.bp +++ b/cmds/dumpstate/Android.bp @@ -145,6 +145,8 @@ cc_test { "tests/dumpstate_test.cpp", ], static_libs: ["libgmock"], + test_config: "dumpstate_test.xml", + data: [":dumpstate_test_fixture", "tests/testdata/**/*"] } cc_test { diff --git a/cmds/dumpstate/dumpstate_test.xml b/cmds/dumpstate/dumpstate_test.xml new file mode 100644 index 0000000000..e4e4a30a1e --- /dev/null +++ b/cmds/dumpstate/dumpstate_test.xml @@ -0,0 +1,29 @@ +<?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 dumpstate_test"> + <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> + <option name="cleanup" value="true" /> + <option name="push" value="dumpstate_test->/data/local/tmp/dumpstate_test" /> + </target_preparer> + <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> + <option name="test-suite-tag" value="apct" /> + <test class="com.android.tradefed.testtype.GTest" > + <option name="native-test-device-path" value="/data/local/tmp" /> + <option name="file-exclusion-filter-regex" value=".*/dumpstate_test_fixture" /> + <option name="file-exclusion-filter-regex" value=".*/tests/.*" /> + <option name="module-name" value="dumpstate_test" /> + </test> +</configuration> diff --git a/cmds/dumpstate/tests/dumpstate_test.cpp b/cmds/dumpstate/tests/dumpstate_test.cpp index c5d01fdf25..0e88e43258 100644 --- a/cmds/dumpstate/tests/dumpstate_test.cpp +++ b/cmds/dumpstate/tests/dumpstate_test.cpp @@ -105,9 +105,8 @@ class DumpstateBaseTest : public Test { protected: const std::string kTestPath = dirname(android::base::GetExecutablePath().c_str()); - const std::string kFixturesPath = kTestPath + "/../dumpstate_test_fixture/"; - const std::string kTestDataPath = kFixturesPath + "tests/testdata/"; - const std::string kSimpleCommand = kFixturesPath + "dumpstate_test_fixture"; + const std::string kTestDataPath = kTestPath + "/tests/testdata/"; + const std::string kSimpleCommand = kTestPath + "/dumpstate_test_fixture"; const std::string kEchoCommand = "/system/bin/echo"; /* |