diff --git a/tests/common.py b/tests/common.py index 275ef28d..1ede6f1c 100644 --- a/tests/common.py +++ b/tests/common.py @@ -194,5 +194,18 @@ def requires_fullFeature(self): self.client.features.firmware_variant == "EmulatorBTC": self.skipTest("Full feature firmware required to run this test") + def requires_bitcoinOnly(self): + """Inverse of requires_fullFeature(): skip unless this IS the + bitcoin-only product. + + Usable since the firmware learned to report the variant honestly -- + variant_getName() used to answer "Emulator" for both products, so a + bitcoin-only emulator was indistinguishable from a full one and this + guard could not be written. + """ + if self.client.features.firmware_variant not in ("KeepKeyBTC", + "EmulatorBTC"): + self.skipTest("Bitcoin-only firmware required to run this test") + diff --git a/tests/test_msg_bitcoin_only_variant.py b/tests/test_msg_bitcoin_only_variant.py index 3f8327b9..9b2d14a7 100644 --- a/tests/test_msg_bitcoin_only_variant.py +++ b/tests/test_msg_bitcoin_only_variant.py @@ -100,6 +100,12 @@ class TestBitcoinOnlyVariant(common.KeepKeyTest): def setUp(self): super(TestBitcoinOnlyVariant, self).setUp() self.requires_firmware("7.15.0") + # This whole file describes the BITCOIN-ONLY product. Several tests + # assert screen sequences that differ on the multi-chain build -- the + # OP_RETURN one decodes a THORChain memo there and draws more screens -- + # so running them against a full-feature device is a category error, not + # a finding. CI points the pyk suite at the full emulator image. + self.requires_bitcoinOnly() self.screens = [] # Refuse (press NO) on the Nth ButtonRequest of the current flow; # None means confirm everything.