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

Commit e29e7522 authored by Kyle Hsiao's avatar Kyle Hsiao
Browse files

Disable NFC before running VtsHalSecureElement test cases

Bug: 383425198
Bug: 383426832
Test: atest VtsHalSecureElementV1_0TargetTest
Test: atest VtsHalSecureElementV1_1TargetTest
Test: atest VtsHalSecureElementV1_2TargetTest
Test: atest VtsHalSecureElementTargetTest
Change-Id: I0794d3a16cc7f0d294cf7113ecafda156480a3b8
parent 52f20815
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -210,3 +210,14 @@ INSTANTIATE_TEST_SUITE_P(
        PerInstance, SecureElementHidlTest,
        testing::ValuesIn(android::hardware::getAllHalInstanceNames(ISecureElement::descriptor)),
        android::hardware::PrintInstanceNameToString);

int main(int argc, char** argv) {
    ::testing::InitGoogleTest(&argc, argv);
    std::system("svc nfc disable"); /* Turn off NFC */
    sleep(5);
    int status = RUN_ALL_TESTS();
    LOG(INFO) << "Test result = " << status;
    std::system("svc nfc enable"); /* Turn on NFC */
    sleep(5);
    return status;
}
+11 −0
Original line number Diff line number Diff line
@@ -94,3 +94,14 @@ INSTANTIATE_TEST_SUITE_P(
        PerInstance, SecureElementHidlTest,
        testing::ValuesIn(android::hardware::getAllHalInstanceNames(ISecureElement::descriptor)),
        android::hardware::PrintInstanceNameToString);

int main(int argc, char** argv) {
    ::testing::InitGoogleTest(&argc, argv);
    std::system("svc nfc disable"); /* Turn off NFC */
    sleep(5);
    int status = RUN_ALL_TESTS();
    LOG(INFO) << "Test result = " << status;
    std::system("svc nfc enable"); /* Turn on NFC */
    sleep(5);
    return status;
}
+11 −0
Original line number Diff line number Diff line
@@ -108,3 +108,14 @@ INSTANTIATE_TEST_SUITE_P(
        PerInstance, SecureElementHidlTest,
        testing::ValuesIn(android::hardware::getAllHalInstanceNames(ISecureElement::descriptor)),
        android::hardware::PrintInstanceNameToString);

int main(int argc, char** argv) {
    ::testing::InitGoogleTest(&argc, argv);
    std::system("svc nfc disable"); /* Turn off NFC */
    sleep(5);
    int status = RUN_ALL_TESTS();
    LOG(INFO) << "Test result = " << status;
    std::system("svc nfc enable"); /* Turn on NFC */
    sleep(5);
    return status;
}
+6 −1
Original line number Diff line number Diff line
@@ -320,5 +320,10 @@ int main(int argc, char** argv) {
    ::testing::InitGoogleTest(&argc, argv);
    ABinderProcess_setThreadPoolMaxThreadCount(1);
    ABinderProcess_startThreadPool();
    return RUN_ALL_TESTS();
    std::system("/system/bin/svc nfc disable"); /* Turn off NFC */
    sleep(5);
    int status = RUN_ALL_TESTS();
    std::system("/system/bin/svc nfc enable"); /* Turn on NFC */
    sleep(5);
    return status;
}