diff options
author | Jae Shin <jaeshin@google.com> | 2017-07-03 13:34:04 +0900 |
---|---|---|
committer | Jae Shin <jaeshin@google.com> | 2017-07-03 13:47:11 +0900 |
commit | 6e3ec61aabefcc87bd2ab8f96d6b1a4433404902 (patch) | |
tree | f0d83e6a2454e5ba393b13dfbf2cc3c4a7fc2986 /configstore/1.1 | |
parent | 050c563f02a44dd95f59b840843478934063cf50 (diff) | |
download | platform_hardware_interfaces-6e3ec61aabefcc87bd2ab8f96d6b1a4433404902.tar.gz platform_hardware_interfaces-6e3ec61aabefcc87bd2ab8f96d6b1a4433404902.tar.bz2 platform_hardware_interfaces-6e3ec61aabefcc87bd2ab8f96d6b1a4433404902.zip |
Add structural test VtsHalConfigstoreV1_1Target
Add vts test module for configstore@1.1
Test: make vts -j40 && run commandAndExit vts -m
VtsHalConfigstoreV1_1Target
Bug: 63071317
Change-Id: I405f4409bc2ac4acdf07728b950ba9b653eb3328
Diffstat (limited to 'configstore/1.1')
-rw-r--r-- | configstore/1.1/vts/functional/Android.bp | 34 | ||||
-rw-r--r-- | configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp | 55 |
2 files changed, 89 insertions, 0 deletions
diff --git a/configstore/1.1/vts/functional/Android.bp b/configstore/1.1/vts/functional/Android.bp new file mode 100644 index 0000000000..5cfa4839d9 --- /dev/null +++ b/configstore/1.1/vts/functional/Android.bp @@ -0,0 +1,34 @@ +// +// 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", + ] +} + diff --git a/configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp b/configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp new file mode 100644 index 0000000000..bd3da4c433 --- /dev/null +++ b/configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp @@ -0,0 +1,55 @@ +/* + * 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; +} |