Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for Smoke CO Alarm #27123

Merged
merged 27 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
776f520
Fix decoding of TLV payload data
hare-siterwell Jul 10, 2023
739d0a3
Restyled by autopep8
restyled-commits Jul 10, 2023
669653f
Smoke/CO: Add test scripts
hare-siterwell Jun 28, 2023
9d6935d
Merge branch 'fix-TLVMeta' into smco_tests
hare-siterwell Jul 10, 2023
a01904e
[SMCO] Update test scripts
hare-siterwell Jul 11, 2023
8f5020c
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 12, 2023
247840d
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 13, 2023
bc6007c
SMOKECO: Revised document
hare-siterwell Jul 13, 2023
536180d
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 14, 2023
fe1c96c
Revised yaml per the documentation
hare-siterwell Jul 14, 2023
658a155
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 15, 2023
1a14fa6
Regen zap
hare-siterwell Jul 15, 2023
76cd7ee
Disable all smco tests in Darwin
hare-siterwell Jul 17, 2023
8ebe04d
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 17, 2023
4369476
Regen zap
hare-siterwell Jul 17, 2023
39b4b7b
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 18, 2023
c735396
Fix PICS
hare-siterwell Jul 19, 2023
4e51848
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 20, 2023
fe7a71c
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 20, 2023
fee0362
Update test scripts per review comments
hare-siterwell Jul 20, 2023
650370b
Remove Unit Testing Cluster
hare-siterwell Jul 20, 2023
4e1d5fd
Restyled by prettier-yaml
restyled-commits Jul 20, 2023
bc05d3d
Update test scripts per review comments
hare-siterwell Jul 20, 2023
28b453c
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 20, 2023
5b65adb
Regen zap
hare-siterwell Jul 20, 2023
52c4c47
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 21, 2023
30f51f7
Update test scripts per review comments
hare-siterwell Jul 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions examples/darwin-framework-tool/templates/tests/ciTests.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@
"Test_TC_HEPAFREMON_2_1",
"Disabled due to OperationalState not being enabled in Matter.framework for now:",
"Test_TC_OPSTATE_1_1",
"Disabled due to SmokeCOAlarm not being enabled in Matter.framework for now:",
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved
"Test_TC_SMCO_1_1",
"Test_TC_SMCO_2_1",
"Test_TC_SMCO_2_2",
"Test_TC_SMCO_2_3",
"Test_TC_SMCO_2_4",
"Test_TC_SMCO_2_5",
"Test_TC_SMCO_2_6",
"Disabled due to Events verification not supported",
"Test_TC_BINFO_2_2",
"Test_TC_ACL_2_5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1717,223 +1717,6 @@ server cluster SmokeCoAlarm = 92 {
command SelfTestRequest(): DefaultSuccess = 0;
}

/** The Test Cluster is meant to validate the generated code */
server cluster UnitTesting = 4294048773 {
enum SimpleEnum : ENUM8 {
kUnspecified = 0;
kValueA = 1;
kValueB = 2;
kValueC = 3;
}

bitmap Bitmap16MaskMap : BITMAP16 {
kMaskVal1 = 0x1;
kMaskVal2 = 0x2;
kMaskVal3 = 0x4;
kMaskVal4 = 0x4000;
}

bitmap Bitmap32MaskMap : BITMAP32 {
kMaskVal1 = 0x1;
kMaskVal2 = 0x2;
kMaskVal3 = 0x4;
kMaskVal4 = 0x40000000;
}

bitmap Bitmap64MaskMap : BITMAP64 {
kMaskVal1 = 0x1;
kMaskVal2 = 0x2;
kMaskVal3 = 0x4;
kMaskVal4 = 0x4000000000000000;
}

bitmap Bitmap8MaskMap : BITMAP8 {
kMaskVal1 = 0x1;
kMaskVal2 = 0x2;
kMaskVal3 = 0x4;
kMaskVal4 = 0x40;
}

bitmap SimpleBitmap : BITMAP8 {
kValueA = 0x1;
kValueB = 0x2;
kValueC = 0x4;
}

struct SimpleStruct {
int8u a = 0;
boolean b = 1;
SimpleEnum c = 2;
octet_string d = 3;
char_string e = 4;
SimpleBitmap f = 5;
single g = 6;
double h = 7;
}

fabric_scoped struct TestFabricScoped {
fabric_sensitive int8u fabricSensitiveInt8u = 1;
optional fabric_sensitive int8u optionalFabricSensitiveInt8u = 2;
nullable fabric_sensitive int8u nullableFabricSensitiveInt8u = 3;
optional nullable fabric_sensitive int8u nullableOptionalFabricSensitiveInt8u = 4;
fabric_sensitive char_string fabricSensitiveCharString = 5;
fabric_sensitive SimpleStruct fabricSensitiveStruct = 6;
fabric_sensitive int8u fabricSensitiveInt8uList[] = 7;
fabric_idx fabricIndex = 254;
}

struct NullablesAndOptionalsStruct {
nullable int16u nullableInt = 0;
optional int16u optionalInt = 1;
optional nullable int16u nullableOptionalInt = 2;
nullable char_string nullableString = 3;
optional char_string optionalString = 4;
optional nullable char_string nullableOptionalString = 5;
nullable SimpleStruct nullableStruct = 6;
optional SimpleStruct optionalStruct = 7;
optional nullable SimpleStruct nullableOptionalStruct = 8;
nullable SimpleEnum nullableList[] = 9;
optional SimpleEnum optionalList[] = 10;
optional nullable SimpleEnum nullableOptionalList[] = 11;
}

struct NestedStruct {
int8u a = 0;
boolean b = 1;
SimpleStruct c = 2;
}

struct NestedStructList {
int8u a = 0;
boolean b = 1;
SimpleStruct c = 2;
SimpleStruct d[] = 3;
int32u e[] = 4;
octet_string f[] = 5;
int8u g[] = 6;
}

struct DoubleNestedStructList {
NestedStructList a[] = 0;
}

struct TestListStructOctet {
int64u member1 = 0;
octet_string<32> member2 = 1;
}

info event TestEvent = 1 {
INT8U arg1 = 1;
SimpleEnum arg2 = 2;
BOOLEAN arg3 = 3;
SimpleStruct arg4 = 4;
SimpleStruct arg5[] = 5;
SimpleEnum arg6[] = 6;
}

fabric_sensitive info event TestFabricScopedEvent = 2 {
fabric_idx fabricIndex = 254;
}

attribute boolean boolean = 0;
attribute Bitmap8MaskMap bitmap8 = 1;
attribute Bitmap16MaskMap bitmap16 = 2;
attribute Bitmap32MaskMap bitmap32 = 3;
attribute Bitmap64MaskMap bitmap64 = 4;
attribute int8u int8u = 5;
attribute int16u int16u = 6;
attribute int24u int24u = 7;
attribute int32u int32u = 8;
attribute int40u int40u = 9;
attribute int48u int48u = 10;
attribute int56u int56u = 11;
attribute int64u int64u = 12;
attribute int8s int8s = 13;
attribute int16s int16s = 14;
attribute int24s int24s = 15;
attribute int32s int32s = 16;
attribute int40s int40s = 17;
attribute int48s int48s = 18;
attribute int56s int56s = 19;
attribute int64s int64s = 20;
attribute enum8 enum8 = 21;
attribute enum16 enum16 = 22;
attribute single floatSingle = 23;
attribute double floatDouble = 24;
attribute octet_string<10> octetString = 25;
attribute INT8U listInt8u[] = 26;
attribute OCTET_STRING listOctetString[] = 27;
attribute TestListStructOctet listStructOctetString[] = 28;
attribute long_octet_string<1000> longOctetString = 29;
attribute char_string<10> charString = 30;
attribute long_char_string<1000> longCharString = 31;
attribute epoch_us epochUs = 32;
attribute epoch_s epochS = 33;
attribute vendor_id vendorId = 34;
attribute NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35;
attribute SimpleEnum enumAttr = 36;
attribute SimpleStruct structAttr = 37;
attribute int8u rangeRestrictedInt8u = 38;
attribute int8s rangeRestrictedInt8s = 39;
attribute int16u rangeRestrictedInt16u = 40;
attribute int16s rangeRestrictedInt16s = 41;
attribute LONG_OCTET_STRING listLongOctetString[] = 42;
attribute TestFabricScoped listFabricScoped[] = 43;
timedwrite attribute boolean timedWriteBoolean = 48;
attribute boolean generalErrorBoolean = 49;
attribute boolean clusterErrorBoolean = 50;
attribute nullable boolean nullableBoolean = 16384;
attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385;
attribute nullable Bitmap16MaskMap nullableBitmap16 = 16386;
attribute nullable Bitmap32MaskMap nullableBitmap32 = 16387;
attribute nullable Bitmap64MaskMap nullableBitmap64 = 16388;
attribute nullable int8u nullableInt8u = 16389;
attribute nullable int16u nullableInt16u = 16390;
attribute nullable int24u nullableInt24u = 16391;
attribute nullable int32u nullableInt32u = 16392;
attribute nullable int40u nullableInt40u = 16393;
attribute nullable int48u nullableInt48u = 16394;
attribute nullable int56u nullableInt56u = 16395;
attribute nullable int64u nullableInt64u = 16396;
attribute nullable int8s nullableInt8s = 16397;
attribute nullable int16s nullableInt16s = 16398;
attribute nullable int24s nullableInt24s = 16399;
attribute nullable int32s nullableInt32s = 16400;
attribute nullable int40s nullableInt40s = 16401;
attribute nullable int48s nullableInt48s = 16402;
attribute nullable int56s nullableInt56s = 16403;
attribute nullable int64s nullableInt64s = 16404;
attribute nullable enum8 nullableEnum8 = 16405;
attribute nullable enum16 nullableEnum16 = 16406;
attribute nullable single nullableFloatSingle = 16407;
attribute nullable double nullableFloatDouble = 16408;
attribute nullable octet_string<10> nullableOctetString = 16409;
attribute nullable char_string<10> nullableCharString = 16414;
attribute nullable SimpleEnum nullableEnumAttr = 16420;
attribute nullable SimpleStruct nullableStruct = 16421;
attribute nullable int8u nullableRangeRestrictedInt8u = 16422;
attribute nullable int8s nullableRangeRestrictedInt8s = 16423;
attribute nullable int16u nullableRangeRestrictedInt16u = 16424;
attribute nullable int16s nullableRangeRestrictedInt16s = 16425;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct TestEmitTestEventRequestRequest {
INT8U arg1 = 0;
SimpleEnum arg2 = 1;
BOOLEAN arg3 = 2;
}

command Test(): DefaultSuccess = 0;
command TestNotHandled(): DefaultSuccess = 1;
command TestSpecific(): TestSpecificResponse = 2;
command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20;
}

endpoint 0 {
device type rootdevice = 22, version 1;
binding cluster OtaSoftwareUpdateProvider;
Expand Down Expand Up @@ -2236,92 +2019,6 @@ endpoint 1 {
ram attribute featureMap default = 3;
ram attribute clusterRevision default = 1;
}

server cluster UnitTesting {
emits event TestEvent;
ram attribute boolean default = false;
ram attribute bitmap8 default = 0;
ram attribute bitmap16 default = 0;
ram attribute bitmap32 default = 0;
ram attribute bitmap64 default = 0;
ram attribute int8u default = 0;
ram attribute int16u default = 0;
ram attribute int24u default = 0;
ram attribute int32u default = 0;
ram attribute int40u default = 0;
ram attribute int48u default = 0;
ram attribute int56u default = 0;
ram attribute int64u default = 0;
ram attribute int8s default = 0;
ram attribute int16s default = 0;
ram attribute int24s default = 0;
ram attribute int32s default = 0;
ram attribute int40s default = 0;
ram attribute int48s default = 0;
ram attribute int56s default = 0;
ram attribute int64s default = 0;
ram attribute enum8 default = 0;
ram attribute enum16 default = 0;
ram attribute floatSingle default = 0;
ram attribute floatDouble default = 0;
ram attribute octetString;
callback attribute listInt8u;
callback attribute listOctetString;
callback attribute listStructOctetString;
ram attribute longOctetString;
ram attribute charString;
ram attribute longCharString;
ram attribute epochUs;
ram attribute epochS;
ram attribute vendorId default = 0;
callback attribute listNullablesAndOptionalsStruct;
ram attribute enumAttr;
callback attribute structAttr;
ram attribute rangeRestrictedInt8u default = 70;
ram attribute rangeRestrictedInt8s default = -5;
ram attribute rangeRestrictedInt16u default = 200;
ram attribute rangeRestrictedInt16s default = -5;
callback attribute listLongOctetString;
callback attribute listFabricScoped;
ram attribute timedWriteBoolean;
callback attribute generalErrorBoolean;
callback attribute clusterErrorBoolean;
ram attribute nullableBoolean default = false;
ram attribute nullableBitmap8 default = 0;
ram attribute nullableBitmap16 default = 0;
ram attribute nullableBitmap32 default = 0;
ram attribute nullableBitmap64 default = 0;
ram attribute nullableInt8u default = 0;
ram attribute nullableInt16u default = 0;
ram attribute nullableInt24u default = 0;
ram attribute nullableInt32u default = 0;
ram attribute nullableInt40u default = 0;
ram attribute nullableInt48u default = 0;
ram attribute nullableInt56u default = 0;
ram attribute nullableInt64u default = 0;
ram attribute nullableInt8s default = 0;
ram attribute nullableInt16s default = 0;
ram attribute nullableInt24s default = 0;
ram attribute nullableInt32s default = 0;
ram attribute nullableInt40s default = 0;
ram attribute nullableInt48s default = 0;
ram attribute nullableInt56s default = 0;
ram attribute nullableInt64s default = 0;
ram attribute nullableEnum8 default = 0;
ram attribute nullableEnum16 default = 0;
ram attribute nullableFloatSingle default = 0;
ram attribute nullableFloatDouble default = 0;
ram attribute nullableOctetString;
ram attribute nullableCharString;
ram attribute nullableEnumAttr;
callback attribute nullableStruct;
ram attribute nullableRangeRestrictedInt8u default = 70;
ram attribute nullableRangeRestrictedInt8s default = -5;
ram attribute nullableRangeRestrictedInt16u default = 200;
ram attribute nullableRangeRestrictedInt16s default = -5;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}
}


Loading
Loading