[tests] skip running expected fail tests (#5038)

This commit skips running expected fail tests so that it will be easier
to find real failures and saves some time.
This commit is contained in:
Yakun Xu
2020-06-02 21:32:00 -07:00
committed by GitHub
parent ced3c08a04
commit 6de8d778b7
29 changed files with 74 additions and 36 deletions
@@ -43,6 +43,8 @@ MED1 = 5
class Cert_5_3_10_AddressQuery(thread_cert.TestCase):
support_ncp = False
topology = {
LEADER: {
'mode': 'rsdn',
@@ -48,6 +48,8 @@ MTDS = [MED1, SED1]
class Cert_5_7_01_CoapDiagCommands_A(thread_cert.TestCase):
support_ncp = False
topology = {
LEADER: {
'whitelist': [ROUTER1],
@@ -41,6 +41,8 @@ JOINER = 2
class Cert_8_1_01_Commissioning(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'masterkey': '00112233445566778899aabbccddeeff',
@@ -36,6 +36,8 @@ JOINER = 2
class Cert_8_1_02_Commissioning(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'masterkey': 'deadbeefdeadbeefdeadbeefdeadbeef',
@@ -37,6 +37,8 @@ JOINER = 3
class Cert_8_2_01_JoinerRouter(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'masterkey': 'deadbeefdeadbeefdeadbeefdeadbeef',
@@ -37,6 +37,8 @@ JOINER = 3
class Cert_8_2_02_JoinerRouter(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'masterkey': 'deadbeefdeadbeefdeadbeefdeadbeef',
@@ -40,6 +40,8 @@ LEADER = 2
class Cert_9_2_02_MGMTCommissionerSet(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'mode': 'rsdn',
@@ -36,6 +36,8 @@ LEADER = 2
class Cert_9_2_04_ActiveDataset(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'active_dataset': {
@@ -47,6 +47,8 @@ COMMISSIONER_PENDING_PANID = 0xafce
class Cert_9_2_7_DelayTimer(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'active_dataset': {
@@ -49,6 +49,8 @@ MTDS = [ED, SED]
class Cert_9_2_8_PersistentDatasets(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'active_dataset': {
@@ -44,6 +44,8 @@ ROUTER2 = 4
class Cert_9_2_09_PendingPartition(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'active_dataset': {
@@ -48,6 +48,8 @@ MTDS = [ED1, SED1]
class Cert_9_2_10_PendingPartition(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'active_dataset': {
@@ -48,6 +48,8 @@ MTDS = [ED1, SED1]
class Cert_9_2_11_MasterKey(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'active_dataset': {
@@ -47,6 +47,8 @@ DATASET2_PANID = 0xafce
class Cert_9_2_12_Announce(thread_cert.TestCase):
support_ncp = False
topology = {
LEADER1: {
'active_dataset': {
@@ -38,6 +38,8 @@ ED1 = 4
class Cert_9_2_13_EnergyScan(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'mode': 'rsdn',
@@ -38,6 +38,8 @@ LEADER2 = 4
class Cert_9_2_14_PanIdQuery(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'mode': 'rsdn',
@@ -43,6 +43,8 @@ ROUTER2 = 4
class Cert_9_2_15_PendingPartition(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'active_dataset': {
@@ -44,6 +44,8 @@ ROUTER2 = 4
class Cert_9_2_16_ActivePendingPartition(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'active_dataset': {
@@ -43,6 +43,8 @@ ED1 = 3
class Cert_9_2_17_Orphan(thread_cert.TestCase):
support_ncp = False
topology = {
LEADER1: {
'active_dataset': {
@@ -49,6 +49,8 @@ MTDS = [ED1, SED1]
class Cert_9_2_18_RollBackActiveTimestamp(thread_cert.TestCase):
support_ncp = False
topology = {
COMMISSIONER: {
'active_dataset': {
-32
View File
@@ -291,36 +291,4 @@ TESTS = \
$(check_SCRIPTS) \
$(NULL)
XFAIL_NCP_TESTS = \
test_coaps.py \
test_coap_observe.py \
test_diag.py \
test_ipv6_fragmentation.py \
test_ipv6_source_selection.py \
test_reed_address_solicit_rejected.py \
test_service.py \
Cert_5_3_10_AddressQuery.py \
Cert_5_7_01_CoapDiagCommands_A.py \
Cert_8_1_01_Commissioning.py \
Cert_8_1_02_Commissioning.py \
Cert_8_2_01_JoinerRouter.py \
Cert_8_2_02_JoinerRouter.py \
Cert_9_2_02_MGMTCommissionerSet.py \
Cert_9_2_04_ActiveDataset.py \
Cert_9_2_07_DelayTimer.py \
Cert_9_2_08_PersistentDatasets.py \
Cert_9_2_09_PendingPartition.py \
Cert_9_2_10_PendingPartition.py \
Cert_9_2_11_MasterKey.py \
Cert_9_2_12_Announce.py \
Cert_9_2_13_EnergyScan.py \
Cert_9_2_14_PanIdQuery.py \
Cert_9_2_15_PendingPartition.py \
Cert_9_2_16_ActivePendingPartition.py \
Cert_9_2_17_Orphan.py \
Cert_9_2_18_RollBackActiveTimestamp.py \
$(NULL)
XFAIL_TESTS = $(if $(filter $(NODE_TYPE),ncp-sim),$(XFAIL_NCP_TESTS))
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
@@ -41,6 +41,9 @@ class TestCoapObserve(thread_cert.TestCase):
"""
Test suite for CoAP Observations (RFC7641).
"""
support_ncp = False
topology = {
LEADER: {
'mode': 'rsdn',
+2
View File
@@ -37,6 +37,8 @@ ROUTER = 2
class TestCoaps(thread_cert.TestCase):
support_ncp = False
topology = {
LEADER: {
'mode': 'rsdn',
+5 -3
View File
@@ -34,10 +34,12 @@ import thread_cert
class TestDiag(thread_cert.TestCase):
support_ncp = False
topology = {1: None}
def test(self):
self.node = self.nodes[1]
node = self.nodes[1]
cases = [
('diag\n', 'diagnostics mode is disabled\r\n'),
@@ -88,11 +90,11 @@ class TestDiag(thread_cert.TestCase):
]
for case in cases:
self.node.send_command(case[0])
node.send_command(case[0])
self.simulator.go(1)
if type(self.simulator).__name__ == 'VirtualTime':
time.sleep(0.1)
self.node._expect(case[1])
node._expect(case[1])
if __name__ == '__main__':
@@ -38,6 +38,8 @@ ROUTER = 2
class TestIPv6Fragmentation(thread_cert.TestCase):
support_ncp = False
topology = {
LEADER: {
'mode': 'rsdn',
@@ -37,6 +37,8 @@ ROUTER = 2
class TestIPv6SourceSelection(thread_cert.TestCase):
support_ncp = False
topology = {
LEADER: {
'mode': 'rsdn',
@@ -47,6 +47,8 @@ SRV_0_SERVER_DATA = 'bar'
class TestREEDAddressSolicitRejected(thread_cert.TestCase):
support_ncp = False
topology = {
LEADER: {
'mode': 'rsdn',
@@ -49,6 +49,8 @@ SRV_1_SERVER_DATA = 'qux'
class Test_Service(thread_cert.TestCase):
support_ncp = False
topology = {
LEADER: {
'channel': 12,
+16 -1
View File
@@ -28,6 +28,7 @@
#
import os
import sys
import unittest
import config
@@ -50,7 +51,21 @@ EXTENDED_ADDRESS_BASE = 0x166e0a0000000000
"""Extended address base to keep U/L bit 1. The value is borrowed from Thread Test Harness."""
class TestCase(unittest.TestCase):
class NcpSupportMixin():
""" The mixin to check whether a test case supports NCP.
"""
support_ncp = True
def __init__(self, *args, **kwargs):
if os.getenv('NODE_TYPE', 'sim') == 'ncp-sim' and not self.support_ncp:
# 77 means skip this test case in automake tests
sys.exit(77)
super().__init__(*args, **kwargs)
class TestCase(NcpSupportMixin, unittest.TestCase):
"""The base class for all thread certification test cases.
The `topology` member of sub-class is used to create test topology.