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

Commit 5e5c1847 authored by Jae Shin's avatar Jae Shin Committed by Android (Google) Code Review
Browse files

Merge "Add structural test VtsHalConfigstoreV1_1Target" into oc-dr1-dev

parents 61f5c145 6e3ec61a
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2017 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.
//

cc_test {
    name: "VtsHalConfigstoreV1_1TargetTest",
    defaults: ["hidl_defaults"],
    srcs: ["VtsHalConfigstoreV1_1TargetTest.cpp"],
    shared_libs: [
        "libbase",
        "libhidlbase",
        "liblog",
        "libutils",
        "android.hardware.configstore@1.1",
    ],
    static_libs: ["VtsHalHidlTargetTestBase"],
    cflags: [
        "-O0",
        "-g",
    ]
}
+55 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.
 */

#define LOG_TAG "ConfigstoreHidlHalTest"

#include <VtsHalHidlTargetTestBase.h>
#include <android-base/logging.h>
#include <android/hardware/configstore/1.0/types.h>
#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
#include <unistd.h>

using ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;
using ::android::sp;

#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())

class ConfigstoreHidlTest : public ::testing::VtsHalHidlTargetTestBase {
   public:
    sp<ISurfaceFlingerConfigs> sfConfigs;

    virtual void SetUp() override {
        sfConfigs = ::testing::VtsHalHidlTargetTestBase::getService<ISurfaceFlingerConfigs>();
        ASSERT_NE(sfConfigs, nullptr);
    }

    virtual void TearDown() override {}
};

/**
 * Placeholder testcase.
 */
TEST_F(ConfigstoreHidlTest, Test) {
    ASSERT_TRUE(true);
}

int main(int argc, char** argv) {
    ::testing::InitGoogleTest(&argc, argv);
    int status = RUN_ALL_TESTS();
    LOG(INFO) << "Test result = " << status;
    return status;
}
+1 −0
Original line number Diff line number Diff line
@@ -3,5 +3,6 @@ subdirs = [
    "1.0",
    "1.0/vts/functional",
    "1.1",
    "1.1/vts/functional",
    "utils",
]