From 2378947c725130c5fc13aa8cbdc82bb66d7bae4b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 9 Jun 2022 13:26:37 -0400 Subject: [PATCH] Run media cluster tests in tv-app in CI. (#19325) * Run media cluster tests in tv-app in CI. all-clusters-app does not have the media clusters configured in a spec-compliant way (e.g. is missing mandatory things), and definitely does not have them implemented in a spec-compliant way. * Address review comments. --- scripts/tests/chiptest/__init__.py | 2 +- .../suites/certification/Test_TC_MC_1_10.yaml | 3 +- .../suites/certification/Test_TC_MC_1_12.yaml | 3 +- .../suites/certification/Test_TC_MC_9_1.yaml | 3 +- .../chip-tool/zap-generated/test/Commands.h | 34 +++++++++---------- .../zap-generated/test/Commands.h | 34 +++++++++---------- 6 files changed, 41 insertions(+), 38 deletions(-) diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 0b32c373f70ecf..fbf3fcac09f8ea 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -30,7 +30,7 @@ def AllTests(chip_tool: str): if not name: continue - if name.startswith('TV_'): + if name.startswith('TV_') or name.startswith('Test_TC_MC_'): target = TestTarget.TV elif name.startswith('DL_'): target = TestTarget.LOCK diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_10.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_10.yaml index 7ce9159a902219..0570d9549a8f8c 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_10.yaml @@ -19,7 +19,8 @@ name: config: nodeId: 0x12344321 cluster: "Application Basic" - endpoint: 1 + # Default endpoint is 3, since that's where tv-app has this cluster. + endpoint: 3 tests: - label: "Wait for the commissioned device to be retrieved" diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_12.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_12.yaml index 30fbca15bd4796..67f89129746fd1 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_12.yaml @@ -19,7 +19,8 @@ name: config: nodeId: 0x12344321 cluster: "Account Login" - endpoint: 1 + # Default endpoint is 3, since that's where tv-app has this cluster. + endpoint: 3 tests: - label: "Wait for the commissioned device to be retrieved" diff --git a/src/app/tests/suites/certification/Test_TC_MC_9_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_9_1.yaml index f2d5eeca83dfe2..85f3f9e09684fd 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_9_1.yaml @@ -19,7 +19,8 @@ name: config: nodeId: 0x12344321 cluster: "Application Basic" - endpoint: 1 + # Default endpoint is 3, since that's where tv-app has this cluster. + endpoint: 3 tests: - label: "Wait for the commissioned device to be retrieved" diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 98d170a4be67ef..a538e0dde397c3 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -17957,18 +17957,18 @@ class Test_TC_MC_1_10Suite : public TestCommand } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { @@ -17985,13 +17985,13 @@ class Test_TC_MC_1_10Suite : public TestCommand case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 6: { LogStep(6, "Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 7: { @@ -18343,12 +18343,12 @@ class Test_TC_MC_1_12Suite : public TestCommand } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AccountLogin::Id, AccountLogin::Attributes::ClusterRevision::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AccountLogin::Id, AccountLogin::Attributes::AttributeList::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::AttributeList::Id, true, chip::NullOptional); } case 3: { @@ -18365,13 +18365,13 @@ class Test_TC_MC_1_12Suite : public TestCommand case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AccountLogin::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AccountLogin::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 6: { @@ -20862,43 +20862,43 @@ class Test_TC_MC_9_1Suite : public TestCommand } case 2: { LogStep(2, "Reads the VendorName attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorName::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorName::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Reads the VendorID attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorID::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorID::Id, true, chip::NullOptional); } case 4: { LogStep(4, "Reads the ApplicationName attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::ApplicationName::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Reads the ProductID attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, ApplicationBasic::Attributes::ProductID::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::ProductID::Id, true, chip::NullOptional); } case 6: { LogStep(6, "Reads the Application attribute"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Application::Id, true, chip::NullOptional); } case 7: { LogStep(7, "Reads the Status attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, true, chip::NullOptional); } case 8: { LogStep(8, "Reads the ApplicationVersion attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::ApplicationVersion::Id, true, chip::NullOptional); } case 9: { LogStep(9, "Reads the AllowedVendorList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::AllowedVendorList::Id, true, chip::NullOptional); } } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index e46614de0afb94..08cebc76fb2357 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -30371,7 +30371,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30395,7 +30395,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30415,7 +30415,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30462,7 +30462,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30489,7 +30489,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30964,7 +30964,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -30987,7 +30987,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -31024,7 +31024,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -31050,7 +31050,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -34847,7 +34847,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34868,7 +34868,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34888,7 +34888,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34909,7 +34909,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34929,7 +34929,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34950,7 +34950,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34976,7 +34976,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34997,7 +34997,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 + endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE);