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

Commit 535f0a39 authored by Dan Shi's avatar Dan Shi Committed by android-build-merger
Browse files

Merge "Convert VtsHalRadioV1_*TargetTest to be parameterized test" am: 745d7d7d am: 6edef874

am: 9d509696

Change-Id: I80c623970e24362851b1a18b2f048d5274896258
parents 59d7a1a1 9d509696
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ cc_test {
    static_libs: [
        "android.hardware.radio@1.0",
    ],
    test_suites: ["general-tests"],
    test_config: "vts_hal_radio_target_test.xml",
    test_suites: ["general-tests", "vts-core"],
}

cc_test {
@@ -47,7 +48,8 @@ cc_test {
    static_libs: [
        "android.hardware.radio@1.0",
    ],
    test_suites: ["general-tests"],
    test_config: "vts_hal_sap_target_test.xml",
    test_suites: ["general-tests", "vts-core"],
}

cc_library_static {
+8 −2
Original line number Diff line number Diff line
@@ -14,12 +14,18 @@
 * limitations under the License.
 */

#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
#include <radio_hidl_hal_utils_v1_0.h>

INSTANTIATE_TEST_SUITE_P(PerInstance, RadioHidlTest,
                         testing::ValuesIn(android::hardware::getAllHalInstanceNames(
                                 ::android::hardware::radio::V1_0::IRadio::descriptor)),
                         android::hardware::PrintInstanceNameToString);

int main(int argc, char** argv) {
    ::testing::AddGlobalTestEnvironment(RadioHidlEnvironment::Instance());
    ::testing::InitGoogleTest(&argc, argv);
    RadioHidlEnvironment::Instance()->init(&argc, argv);

    // setup seed for rand function
    int seedSrand = time(NULL);
+8 −2
Original line number Diff line number Diff line
@@ -14,12 +14,18 @@
 * limitations under the License.
 */

#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
#include <sap_hidl_hal_utils.h>

INSTANTIATE_TEST_SUITE_P(PerInstance, SapHidlTest,
                         testing::ValuesIn(android::hardware::getAllHalInstanceNames(
                                 ::android::hardware::radio::V1_0::ISap::descriptor)),
                         android::hardware::PrintInstanceNameToString);

int main(int argc, char** argv) {
    ::testing::AddGlobalTestEnvironment(SapHidlEnvironment::Instance());
    ::testing::InitGoogleTest(&argc, argv);
    SapHidlEnvironment::Instance()->init(&argc, argv);

    // setup seed for rand function
    int seedSrand = time(NULL);
+6 −6
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ using namespace ::android::hardware::radio::V1_0;
/*
 * Test IRadio.setGsmBroadcastConfig() for the response returned.
 */
TEST_F(RadioHidlTest, setGsmBroadcastConfig) {
TEST_P(RadioHidlTest, setGsmBroadcastConfig) {
    serial = GetRandomSerialNumber();

    // Create GsmBroadcastSmsConfigInfo #1
@@ -84,7 +84,7 @@ TEST_F(RadioHidlTest, setGsmBroadcastConfig) {
/*
 * Test IRadio.getGsmBroadcastConfig() for the response returned.
 */
TEST_F(RadioHidlTest, getGsmBroadcastConfig) {
TEST_P(RadioHidlTest, getGsmBroadcastConfig) {
    serial = GetRandomSerialNumber();

    radio->getGsmBroadcastConfig(serial);
@@ -104,7 +104,7 @@ TEST_F(RadioHidlTest, getGsmBroadcastConfig) {
/*
 * Test IRadio.setCdmaBroadcastConfig() for the response returned.
 */
TEST_F(RadioHidlTest, setCdmaBroadcastConfig) {
TEST_P(RadioHidlTest, setCdmaBroadcastConfig) {
    serial = GetRandomSerialNumber();

    CdmaBroadcastSmsConfigInfo cbSmsConfig;
@@ -131,7 +131,7 @@ TEST_F(RadioHidlTest, setCdmaBroadcastConfig) {
/*
 * Test IRadio.getCdmaBroadcastConfig() for the response returned.
 */
TEST_F(RadioHidlTest, getCdmaBroadcastConfig) {
TEST_P(RadioHidlTest, getCdmaBroadcastConfig) {
    serial = GetRandomSerialNumber();

    radio->getCdmaBroadcastConfig(serial);
@@ -149,7 +149,7 @@ TEST_F(RadioHidlTest, getCdmaBroadcastConfig) {
/*
 * Test IRadio.setCdmaBroadcastActivation() for the response returned.
 */
TEST_F(RadioHidlTest, setCdmaBroadcastActivation) {
TEST_P(RadioHidlTest, setCdmaBroadcastActivation) {
    serial = GetRandomSerialNumber();
    bool activate = false;

@@ -169,7 +169,7 @@ TEST_F(RadioHidlTest, setCdmaBroadcastActivation) {
/*
 * Test IRadio.setGsmBroadcastActivation() for the response returned.
 */
TEST_F(RadioHidlTest, setGsmBroadcastActivation) {
TEST_P(RadioHidlTest, setGsmBroadcastActivation) {
    serial = GetRandomSerialNumber();
    bool activate = false;

+7 −7
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ using namespace ::android::hardware::radio::V1_0;
/*
 * Test IRadio.getDataRegistrationState() for the response returned.
 */
TEST_F(RadioHidlTest, getDataRegistrationState) {
TEST_P(RadioHidlTest, getDataRegistrationState) {
    serial = GetRandomSerialNumber();

    radio->getDataRegistrationState(serial);
@@ -99,7 +99,7 @@ TEST_F(RadioHidlTest, getDataRegistrationState) {
/*
 * Test IRadio.setupDataCall() for the response returned.
 */
TEST_F(RadioHidlTest, setupDataCall) {
TEST_P(RadioHidlTest, setupDataCall) {
    serial = GetRandomSerialNumber();

    RadioTechnology radioTechnology = RadioTechnology::LTE;
@@ -147,7 +147,7 @@ TEST_F(RadioHidlTest, setupDataCall) {
/*
 * Test IRadio.deactivateDataCall() for the response returned.
 */
TEST_F(RadioHidlTest, deactivateDataCall) {
TEST_P(RadioHidlTest, deactivateDataCall) {
    serial = GetRandomSerialNumber();
    int cid = 1;
    bool reasonRadioShutDown = false;
@@ -169,7 +169,7 @@ TEST_F(RadioHidlTest, deactivateDataCall) {
/*
 * Test IRadio.getDataCallList() for the response returned.
 */
TEST_F(RadioHidlTest, getDataCallList) {
TEST_P(RadioHidlTest, getDataCallList) {
    serial = GetRandomSerialNumber();

    radio->getDataCallList(serial);
@@ -188,7 +188,7 @@ TEST_F(RadioHidlTest, getDataCallList) {
/*
 * Test IRadio.setInitialAttachApn() for the response returned.
 */
TEST_F(RadioHidlTest, setInitialAttachApn) {
TEST_P(RadioHidlTest, setInitialAttachApn) {
    serial = GetRandomSerialNumber();

    DataProfileInfo dataProfileInfo;
@@ -231,7 +231,7 @@ TEST_F(RadioHidlTest, setInitialAttachApn) {
/*
 * Test IRadio.setDataAllowed() for the response returned.
 */
TEST_F(RadioHidlTest, setDataAllowed) {
TEST_P(RadioHidlTest, setDataAllowed) {
    serial = GetRandomSerialNumber();
    bool allow = true;

@@ -249,7 +249,7 @@ TEST_F(RadioHidlTest, setDataAllowed) {
/*
 * Test IRadio.setDataProfile() for the response returned.
 */
TEST_F(RadioHidlTest, setDataProfile) {
TEST_P(RadioHidlTest, setDataProfile) {
    serial = GetRandomSerialNumber();

    // Create a dataProfileInfo
Loading