1 /* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef VTS_TREBLE_VINTF_TEST_SINGLE_MANIFEST_TEST_H_ 18 #define VTS_TREBLE_VINTF_TEST_SINGLE_MANIFEST_TEST_H_ 19 #include <gtest/gtest.h> 20 #include <hidl-util/FqInstance.h> 21 22 #include "VtsTrebleVintfTestBase.h" 23 24 namespace android { 25 namespace vintf { 26 namespace testing { 27 28 // A parameterized test for an HIDL HAL declared in a device or framework 29 // manifest. 30 class SingleHidlTest : public VtsTrebleVintfTestBase, 31 public ::testing::WithParamInterface< 32 std::tuple<HidlInstance, HalManifestPtr>> { 33 public: ~SingleHidlTest()34 virtual ~SingleHidlTest() {} 35 36 sp<IBase> GetPassthroughService(const android::FqInstance& fq_instance); 37 }; 38 39 // A parameterized test for an HIDL HAL registered through hwservicemanager 40 // for a given device or framework manifest. 41 class SingleHwbinderHalTest 42 : public VtsTrebleVintfTestBase, 43 public ::testing::WithParamInterface< 44 std::tuple<std::string /* fq instance name */, HalManifestPtr>> { 45 public: ~SingleHwbinderHalTest()46 virtual ~SingleHwbinderHalTest() {} 47 48 static std::string GetTestCaseSuffix( 49 const ::testing::TestParamInfo<ParamType>& info); 50 }; 51 52 // A parameterized test for an AIDL HAL declared in a device or framework 53 // manifest. 54 class SingleAidlTest : public VtsTrebleVintfTestBase, 55 public ::testing::WithParamInterface< 56 std::tuple<AidlInstance, HalManifestPtr>> { 57 public: ~SingleAidlTest()58 virtual ~SingleAidlTest() {} 59 }; 60 61 // A parameterized test for a native HAL in one of the manifests. 62 class SingleNativeTest : public VtsTrebleVintfTestBase, 63 public ::testing::WithParamInterface< 64 std::tuple<NativeInstance, HalManifestPtr>> { 65 public: ~SingleNativeTest()66 virtual ~SingleNativeTest() {} 67 }; 68 69 } // namespace testing 70 } // namespace vintf 71 } // namespace android 72 73 #endif // VTS_TREBLE_VINTF_TEST_SINGLE_MANIFEST_TEST_H_ 74