blob: 2d0fe4b11f2519cdb9c2fb56650bcfcbcf182c89 [file] [log] [blame]
Sanket Padawee4c63232017-02-07 15:58:34 -08001/*
2 * Copyright (C) 2017 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
Dan Shi8caedd02019-10-21 11:32:21 -070017#include <gtest/gtest.h>
18#include <hidl/GtestPrinter.h>
19#include <hidl/ServiceManagement.h>
sqian0c74fc72017-05-24 15:08:25 -070020#include <radio_hidl_hal_utils_v1_0.h>
Sanket Padawee4c63232017-02-07 15:58:34 -080021
Dan Shiba4d5322020-07-28 13:09:30 -070022GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(RadioHidlTest);
Dan Shi8caedd02019-10-21 11:32:21 -070023INSTANTIATE_TEST_SUITE_P(PerInstance, RadioHidlTest,
24 testing::ValuesIn(android::hardware::getAllHalInstanceNames(
25 ::android::hardware::radio::V1_0::IRadio::descriptor)),
26 android::hardware::PrintInstanceNameToString);
27
Sanket Padawee4c63232017-02-07 15:58:34 -080028int main(int argc, char** argv) {
sqian42c66f72017-05-30 13:30:08 -070029 ::testing::InitGoogleTest(&argc, argv);
Sanket Padawee4c63232017-02-07 15:58:34 -080030
sqian42c66f72017-05-30 13:30:08 -070031 // setup seed for rand function
32 int seedSrand = time(NULL);
33 std::cout << "seed setup for random function (radio):" + std::to_string(seedSrand) << std::endl;
34 srand(seedSrand);
Sanket Padawee4c63232017-02-07 15:58:34 -080035
sqian42c66f72017-05-30 13:30:08 -070036 int status = RUN_ALL_TESTS();
37 LOG(INFO) << "Test result = " << status;
38
39 return status;
Zhuoyao Zhang21b0a0a2018-02-08 21:03:03 -080040}