Loading tetheroffload/control/1.0/vts/functional/Android.bp +14 −0 Original line number Diff line number Diff line Loading @@ -30,3 +30,17 @@ cc_test { "vts", ], } cc_test_library { name: "VtsHalTetheroffloadControlV1_0TargetTest-lib", defaults: ["VtsHalTargetTestDefaults"], export_include_dirs: ["include"], static_libs: [ "android.hardware.tetheroffload.config@1.0", "android.hardware.tetheroffload.control@1.0", ], srcs: [ "OffloadControlTestBase.cpp", "OffloadControlTestUtils.cpp", ], } tetheroffload/control/1.0/vts/functional/include/OffloadControlTestBase.h +3 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ using android::hardware::hidl_vec; using android::hardware::Return; using android::hardware::Void; using android::hardware::tetheroffload::config::V1_0::IOffloadConfig; using android::hardware::tetheroffload::control::V1_0::IOffloadControl; using android::hardware::tetheroffload::control::V1_0::ITetheringOffloadCallback; using android::hardware::tetheroffload::control::V1_0::NatTimeoutUpdate; using android::hardware::tetheroffload::control::V1_0::OffloadCallbackEvent; Loading Loading @@ -64,7 +63,8 @@ class OffloadControlTestBase : public testing::TestWithParam<std::tuple<std::str // Called once in setup stage to retrieve correct version of // IOffloadControl object. virtual sp<IOffloadControl> createControl(const std::string& serviceName) = 0; virtual sp<android::hardware::tetheroffload::control::V1_0::IOffloadControl> createControl( const std::string& serviceName) = 0; // The IOffloadConfig HAL is tested more thoroughly elsewhere. Here the // class just setup everything correctly and verify basic readiness. Loading Loading @@ -100,6 +100,6 @@ class OffloadControlTestBase : public testing::TestWithParam<std::tuple<std::str }; sp<IOffloadConfig> config; sp<IOffloadControl> control; sp<android::hardware::tetheroffload::control::V1_0::IOffloadControl> control; sp<TetheringOffloadCallback> control_cb; }; No newline at end of file tetheroffload/control/1.0/vts/functional/include/OffloadControlTestV1_0.h +4 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,10 @@ class OffloadControlTestV1_0_HalNotStarted : public OffloadControlTestBase { prepareControlHal(); } virtual sp<IOffloadControl> createControl(const std::string& serviceName) override { return IOffloadControl::getService(serviceName); virtual sp<android::hardware::tetheroffload::control::V1_0::IOffloadControl> createControl( const std::string& serviceName) override { return android::hardware::tetheroffload::control::V1_0::IOffloadControl::getService( serviceName); } }; Loading tetheroffload/control/1.1/vts/functional/Android.bp 0 → 100644 +30 −0 Original line number Diff line number Diff line // Copyright (C) 2020 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: "VtsHalTetheroffloadControlV1_1TargetTest", defaults: ["VtsHalTargetTestDefaults"], srcs: ["VtsHalTetheroffloadControlV1_1TargetTest.cpp"], local_include_dirs: ["include"], static_libs: [ "android.hardware.tetheroffload.config@1.0", "android.hardware.tetheroffload.control@1.0", "android.hardware.tetheroffload.control@1.1", "VtsHalTetheroffloadControlV1_0TargetTest-lib", ], test_suites: [ "general-tests", "vts", ], } tetheroffload/control/1.1/vts/functional/VtsHalTetheroffloadControlV1_1TargetTest.cpp 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 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. */ #include <OffloadControlTestV1_1.h> #include <gtest/gtest.h> #include <hidl/GtestPrinter.h> #include <hidl/ServiceManagement.h> using android::hardware::tetheroffload::control::V1_1::IOffloadControl; GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(OffloadControlTestV1_1_HalNotStarted); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(OffloadControlTestV1_1_HalStarted); INSTANTIATE_TEST_CASE_P( PerInstance, OffloadControlTestV1_1_HalNotStarted, testing::Combine(testing::ValuesIn(android::hardware::getAllHalInstanceNames( IOffloadConfig::descriptor)), testing::ValuesIn(android::hardware::getAllHalInstanceNames( IOffloadControl::descriptor))), android::hardware::PrintInstanceTupleNameToString<>); INSTANTIATE_TEST_CASE_P( PerInstance, OffloadControlTestV1_1_HalStarted, testing::Combine(testing::ValuesIn(android::hardware::getAllHalInstanceNames( IOffloadConfig::descriptor)), testing::ValuesIn(android::hardware::getAllHalInstanceNames( IOffloadControl::descriptor))), android::hardware::PrintInstanceTupleNameToString<>); Loading
tetheroffload/control/1.0/vts/functional/Android.bp +14 −0 Original line number Diff line number Diff line Loading @@ -30,3 +30,17 @@ cc_test { "vts", ], } cc_test_library { name: "VtsHalTetheroffloadControlV1_0TargetTest-lib", defaults: ["VtsHalTargetTestDefaults"], export_include_dirs: ["include"], static_libs: [ "android.hardware.tetheroffload.config@1.0", "android.hardware.tetheroffload.control@1.0", ], srcs: [ "OffloadControlTestBase.cpp", "OffloadControlTestUtils.cpp", ], }
tetheroffload/control/1.0/vts/functional/include/OffloadControlTestBase.h +3 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ using android::hardware::hidl_vec; using android::hardware::Return; using android::hardware::Void; using android::hardware::tetheroffload::config::V1_0::IOffloadConfig; using android::hardware::tetheroffload::control::V1_0::IOffloadControl; using android::hardware::tetheroffload::control::V1_0::ITetheringOffloadCallback; using android::hardware::tetheroffload::control::V1_0::NatTimeoutUpdate; using android::hardware::tetheroffload::control::V1_0::OffloadCallbackEvent; Loading Loading @@ -64,7 +63,8 @@ class OffloadControlTestBase : public testing::TestWithParam<std::tuple<std::str // Called once in setup stage to retrieve correct version of // IOffloadControl object. virtual sp<IOffloadControl> createControl(const std::string& serviceName) = 0; virtual sp<android::hardware::tetheroffload::control::V1_0::IOffloadControl> createControl( const std::string& serviceName) = 0; // The IOffloadConfig HAL is tested more thoroughly elsewhere. Here the // class just setup everything correctly and verify basic readiness. Loading Loading @@ -100,6 +100,6 @@ class OffloadControlTestBase : public testing::TestWithParam<std::tuple<std::str }; sp<IOffloadConfig> config; sp<IOffloadControl> control; sp<android::hardware::tetheroffload::control::V1_0::IOffloadControl> control; sp<TetheringOffloadCallback> control_cb; }; No newline at end of file
tetheroffload/control/1.0/vts/functional/include/OffloadControlTestV1_0.h +4 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,10 @@ class OffloadControlTestV1_0_HalNotStarted : public OffloadControlTestBase { prepareControlHal(); } virtual sp<IOffloadControl> createControl(const std::string& serviceName) override { return IOffloadControl::getService(serviceName); virtual sp<android::hardware::tetheroffload::control::V1_0::IOffloadControl> createControl( const std::string& serviceName) override { return android::hardware::tetheroffload::control::V1_0::IOffloadControl::getService( serviceName); } }; Loading
tetheroffload/control/1.1/vts/functional/Android.bp 0 → 100644 +30 −0 Original line number Diff line number Diff line // Copyright (C) 2020 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: "VtsHalTetheroffloadControlV1_1TargetTest", defaults: ["VtsHalTargetTestDefaults"], srcs: ["VtsHalTetheroffloadControlV1_1TargetTest.cpp"], local_include_dirs: ["include"], static_libs: [ "android.hardware.tetheroffload.config@1.0", "android.hardware.tetheroffload.control@1.0", "android.hardware.tetheroffload.control@1.1", "VtsHalTetheroffloadControlV1_0TargetTest-lib", ], test_suites: [ "general-tests", "vts", ], }
tetheroffload/control/1.1/vts/functional/VtsHalTetheroffloadControlV1_1TargetTest.cpp 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 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. */ #include <OffloadControlTestV1_1.h> #include <gtest/gtest.h> #include <hidl/GtestPrinter.h> #include <hidl/ServiceManagement.h> using android::hardware::tetheroffload::control::V1_1::IOffloadControl; GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(OffloadControlTestV1_1_HalNotStarted); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(OffloadControlTestV1_1_HalStarted); INSTANTIATE_TEST_CASE_P( PerInstance, OffloadControlTestV1_1_HalNotStarted, testing::Combine(testing::ValuesIn(android::hardware::getAllHalInstanceNames( IOffloadConfig::descriptor)), testing::ValuesIn(android::hardware::getAllHalInstanceNames( IOffloadControl::descriptor))), android::hardware::PrintInstanceTupleNameToString<>); INSTANTIATE_TEST_CASE_P( PerInstance, OffloadControlTestV1_1_HalStarted, testing::Combine(testing::ValuesIn(android::hardware::getAllHalInstanceNames( IOffloadConfig::descriptor)), testing::ValuesIn(android::hardware::getAllHalInstanceNames( IOffloadControl::descriptor))), android::hardware::PrintInstanceTupleNameToString<>);