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

Commit 5b948746 authored by David Drysdale's avatar David Drysdale
Browse files

Re-order skip checks for attestation tests

Put the test arm that just involves checking a property
first, so that tests which involve a round trip to the Package
Manager are only executed when they're needed.

Test: VtsAidlKeyMintTargetTest
Bug: 271026714
Change-Id: I4caad6243a3b9d511a32717fd95f58864b857eeb
parent 5196f93a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -172,8 +172,9 @@ class AttestKeyTest : public KeyMintAidlTestBase {
    //     allowing it to be launched with Android S (or later) with Keymaster 4.0
    //     in StrongBox
    void check_skip_test(void) const {
        if (is_attest_key_feature_disabled() && is_strongbox_enabled() &&
            is_chipset_allowed_km4_strongbox()) {
        // Check the chipset first as that doesn't require a round-trip to Package Manager.
        if (is_chipset_allowed_km4_strongbox() && is_strongbox_enabled() &&
            is_attest_key_feature_disabled()) {
            GTEST_SKIP() << "Test is not applicable";
        }
    }