Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f22b00d authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "Add init_tests to CTS"

am: 88eedafb

Change-Id: If2cdc075e1d81cda7e326f48017fbaac5e562552
parents 93c7c970 88eedafb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3,6 +3,9 @@
    {
      "name": "adbd_test"
    },
    {
      "name": "CtsInitTestCases"
    },
    {
      "name": "debuggerd_test"
    },
@@ -12,9 +15,6 @@
    {
      "name": "fs_mgr_vendor_overlay_test"
    },
    {
      "name": "init_tests"
    },
    {
      "name": "libbase_test"
    },
+17 −3
Original line number Diff line number Diff line
@@ -207,9 +207,18 @@ cc_binary {
// ------------------------------------------------------------------------------

cc_test {
    name: "init_tests",
    name: "CtsInitTestCases",
    defaults: ["init_defaults"],
    compile_multilib: "first",
    compile_multilib: "both",
    multilib: {
        lib32: {
            suffix: "32",
        },
        lib64: {
            suffix: "64",
        },
    },

    srcs: [
        "devices_test.cpp",
        "init_test.cpp",
@@ -226,7 +235,12 @@ cc_test {
        "util_test.cpp",
    ],
    static_libs: ["libinit"],
    test_suites: ["device-tests"],

    test_suites: [
        "cts",
        "device-tests",
        "vts",
    ],
}

cc_benchmark {

init/AndroidTest.xml

0 → 100644
+31 −0
Original line number Diff line number Diff line
<?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 CTS init test cases">
    <option name="test-suite-tag" value="cts" />
    <option name="config-descriptor:metadata" key="component" value="systems" />
    <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
    <option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
        <option name="cleanup" value="true" />
        <option name="push" value="CtsInitTestCases->/data/local/tmp/CtsInitTestCases" />
        <option name="append-bitness" value="true" />
    </target_preparer>
    <test class="com.android.tradefed.testtype.GTest" >
        <option name="native-test-device-path" value="/data/local/tmp" />
        <option name="module-name" value="CtsInitTestCases" />
        <option name="runtime-hint" value="65s" />
    </test>
</configuration>
+5 −0
Original line number Diff line number Diff line
@@ -56,6 +56,11 @@ TEST(property_service, very_long_name_35166374) {
}

TEST(property_service, non_utf8_value) {
    if (getuid() != 0) {
        GTEST_SKIP() << "Skipping test, must be run as root.";
        return;
    }

    ASSERT_TRUE(SetProperty("property_service_utf8_test", "base_success"));
    EXPECT_FALSE(SetProperty("property_service_utf8_test", "\x80"));
    EXPECT_FALSE(SetProperty("property_service_utf8_test", "\xC2\x01"));
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ namespace init {
template <typename F>
void RunTest(F&& test_function) {
    if (getuid() != 0) {
        GTEST_LOG_(INFO) << "Skipping test, must be run as root.";
        GTEST_SKIP() << "Skipping test, must be run as root.";
        return;
    }

Loading