Skip to content

Commit c594568

Browse files
beckerzitoprakashecerestyled-commits
authored
Add oven opstate yaml (#31557)
* Adding OvenOpState test scripts and ciTests.json file * Restyled by whitespace * Restyled by prettier-json * Restyled by prettier-yaml * Restyled by autopep8 * added OvenOpstate2_4 and updated other files * Delete src/app/tests/suites/certification/Test_TC_OVENOPSTATE_1_1.yml * Delete src/app/tests/suites/certification/Test_TC_OVENOPSTATE_2_2.yml * Restyled by whitespace * Restyled by prettier-json * Restyled by prettier-yaml * updated test scripts * updated Test_TC_OVENOPSTATE_2_2.yaml * Restyled by prettier-yaml * updated yamls and ran zap regen * Restyled by isort * Restyled by isort * updated __init__.py * updated citests and mannual tests * updated python scripts * Restyled by autopep8 * updated step3 to automated test in 2_2 * updated citests.json * updated Tests and ciTest file * Revert "updated Tests and ciTest file" This reverts commit 163c810. * updated according review * zap regen * Revert "zap regen" This reverts commit b057c11. * removed zap gen * revert zap gen * Fix opstate pics * Updated commands * Fix white space * fix for PR * Update commands * fixes PR * fix * fix test cases * Restyled by prettier-yaml * fixed place for test case * fixed test json * zap regen * added Ovenopstate2_2 and 2_5 yaml and python files. Also some associated changed files * Removed YAML test * added python tests * Updated zap all cluster app * improvements opstte 1_1 * improvement base code * update example app * improvements on ovenopstate * ci pics update * ci pics updates * fix matter testing support * improvements on test cases * Adding commads for example app * added TC 2.2 to the base test * enabled all tests for oven cavity opstate * added app id to the CI parameters * Blocking start when in fault * added tests for CI * Fix lints * Added test 2.3 * Updated business rules on application * Added app pid parameter to mobile test script * fix pipe * fix lint * Added test 2.4 * fixed parameter from run python script * Fixed Lint * Deleted OVENOPSTATE YAMLs * Fix run python script * Fix lint * Added opstate test cases * Fixed opstate app * removed opstate from YAML * fixes according test plan update * Fixed missing test errors * added countdown behavior to opstate * clean up command line linux * Added TC 2.5 automated * Added OPSTATE and OVENOPSTATE to CI * fixed according review * Restyled by whitespace * Restyled by clang-format * Restyled by autopep8 * Restyled by isort * Updates according review * Restyled by autopep8 * Restyled by isort --------- Co-authored-by: Prakash Ravi <RAVIP1@na.ad.whirlpool.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Prakash Ravi <68609205+prakashece@users.noreply.github.com>
1 parent 7113c98 commit c594568

33 files changed

+2255
-1281
lines changed

.github/workflows/tests.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,18 @@ jobs:
526526
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
527527
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestSpecParsingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
528528
scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py'
529+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_1_1.py" --script-args "--endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
530+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_1.py" --script-args "--endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
531+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_2.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
532+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_3.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
533+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_4.py" --script-args "--endpoint 1 --int-arg PIXIT.OPSTATE.ErrorEventGen:1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
534+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OPSTATE_2_5.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.REBOOT:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
535+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_1_1.py" --script-args "--endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
536+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_1.py" --script-args "--endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
537+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_2.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
538+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_3.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
539+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_4.py" --script-args "--endpoint 1 --int-arg PIXIT.OVENOPSTATE.ErrorEventGen:1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
540+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_5.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.REBOOT:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
529541
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
530542
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
531543
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+10-1
Original file line numberDiff line numberDiff line change
@@ -7831,8 +7831,11 @@ endpoint 1 {
78317831
}
78327832

78337833
server cluster OvenCavityOperationalState {
7834+
emits event OperationalError;
7835+
emits event OperationCompletion;
78347836
callback attribute phaseList;
78357837
callback attribute currentPhase;
7838+
callback attribute countdownTime;
78367839
callback attribute operationalStateList;
78377840
callback attribute operationalState;
78387841
callback attribute operationalError;
@@ -7842,6 +7845,12 @@ endpoint 1 {
78427845
callback attribute attributeList;
78437846
ram attribute featureMap default = 0;
78447847
ram attribute clusterRevision default = 1;
7848+
7849+
handle command Pause;
7850+
handle command Stop;
7851+
handle command Start;
7852+
handle command Resume;
7853+
handle command OperationalCommandResponse;
78457854
}
78467855

78477856
server cluster OvenMode {
@@ -8076,7 +8085,7 @@ endpoint 1 {
80768085
callback attribute acceptedCommandList;
80778086
callback attribute attributeList;
80788087
ram attribute featureMap default = 0;
8079-
ram attribute clusterRevision default = 1;
8088+
ram attribute clusterRevision default = 2;
80808089

80818090
handle command Pause;
80828091
handle command Stop;

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+81-7
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
}
1818
],
1919
"package": [
20+
{
21+
"pathRelativity": "relativeToZap",
22+
"path": "../../../src/app/zap-templates/app-templates.json",
23+
"type": "gen-templates-json",
24+
"version": "chip-v1"
25+
},
2026
{
2127
"pathRelativity": "relativeToZap",
2228
"path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json",
2329
"type": "zcl-properties",
2430
"category": "matter",
2531
"version": 1,
2632
"description": "Matter SDK ZCL data with some extensions"
27-
},
28-
{
29-
"pathRelativity": "relativeToZap",
30-
"path": "../../../src/app/zap-templates/app-templates.json",
31-
"type": "gen-templates-json",
32-
"version": "chip-v1"
3333
}
3434
],
3535
"endpointTypes": [
@@ -8227,6 +8227,48 @@
82278227
"side": "server",
82288228
"enabled": 1,
82298229
"apiMaturity": "provisional",
8230+
"commands": [
8231+
{
8232+
"name": "Pause",
8233+
"code": 0,
8234+
"mfgCode": null,
8235+
"source": "client",
8236+
"isIncoming": 1,
8237+
"isEnabled": 1
8238+
},
8239+
{
8240+
"name": "Stop",
8241+
"code": 1,
8242+
"mfgCode": null,
8243+
"source": "client",
8244+
"isIncoming": 1,
8245+
"isEnabled": 1
8246+
},
8247+
{
8248+
"name": "Start",
8249+
"code": 2,
8250+
"mfgCode": null,
8251+
"source": "client",
8252+
"isIncoming": 1,
8253+
"isEnabled": 1
8254+
},
8255+
{
8256+
"name": "Resume",
8257+
"code": 3,
8258+
"mfgCode": null,
8259+
"source": "client",
8260+
"isIncoming": 1,
8261+
"isEnabled": 1
8262+
},
8263+
{
8264+
"name": "OperationalCommandResponse",
8265+
"code": 4,
8266+
"mfgCode": null,
8267+
"source": "server",
8268+
"isIncoming": 0,
8269+
"isEnabled": 1
8270+
}
8271+
],
82308272
"attributes": [
82318273
{
82328274
"name": "PhaseList",
@@ -8260,6 +8302,22 @@
82608302
"maxInterval": 65534,
82618303
"reportableChange": 0
82628304
},
8305+
{
8306+
"name": "CountdownTime",
8307+
"code": 2,
8308+
"mfgCode": null,
8309+
"side": "server",
8310+
"type": "elapsed_s",
8311+
"included": 1,
8312+
"storageOption": "External",
8313+
"singleton": 0,
8314+
"bounded": 0,
8315+
"defaultValue": "",
8316+
"reportable": 1,
8317+
"minInterval": 1,
8318+
"maxInterval": 65534,
8319+
"reportableChange": 0
8320+
},
82638321
{
82648322
"name": "OperationalStateList",
82658323
"code": 3,
@@ -8404,6 +8462,22 @@
84048462
"maxInterval": 65534,
84058463
"reportableChange": 0
84068464
}
8465+
],
8466+
"events": [
8467+
{
8468+
"name": "OperationalError",
8469+
"code": 0,
8470+
"mfgCode": null,
8471+
"side": "server",
8472+
"included": 1
8473+
},
8474+
{
8475+
"name": "OperationCompletion",
8476+
"code": 1,
8477+
"mfgCode": null,
8478+
"side": "server",
8479+
"included": 1
8480+
}
84078481
]
84088482
},
84098483
{
@@ -11176,7 +11250,7 @@
1117611250
"storageOption": "RAM",
1117711251
"singleton": 0,
1117811252
"bounded": 0,
11179-
"defaultValue": "1",
11253+
"defaultValue": "2",
1118011254
"reportable": 1,
1118111255
"minInterval": 1,
1118211256
"maxInterval": 65534,

examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h

+27-1
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@ namespace OperationalState {
3333
class GenericOperationalStateDelegateImpl : public Delegate
3434
{
3535
public:
36+
uint32_t mRunningTime = 0;
37+
uint32_t mPausedTime = 0;
38+
app::DataModel::Nullable<uint32_t> mCountDownTime;
39+
3640
/**
3741
* Get the countdown time. This attribute is not used in this application.
3842
* @return The current countdown time.
3943
*/
40-
app::DataModel::Nullable<uint32_t> GetCountdownTime() override { return {}; };
44+
app::DataModel::Nullable<uint32_t> GetCountdownTime() override;
4145

4246
/**
4347
* Fills in the provided GenericOperationalState with the state at index `index` if there is one,
@@ -104,11 +108,33 @@ class OperationalStateDelegate : public GenericOperationalStateDelegateImpl
104108
GenericOperationalState(to_underlying(OperationalStateEnum::kError)),
105109
};
106110

111+
const uint32_t kExampleCountDown = 30;
112+
107113
public:
108114
OperationalStateDelegate()
109115
{
110116
GenericOperationalStateDelegateImpl::mOperationalStateList = Span<const GenericOperationalState>(opStateList);
111117
}
118+
119+
/**
120+
* Handle Command Callback in application: Start
121+
* @param[out] get operational error after callback.
122+
*/
123+
void HandleStartStateCallback(GenericOperationalError & err) override
124+
{
125+
mCountDownTime.SetNonNull(static_cast<uint32_t>(kExampleCountDown));
126+
GenericOperationalStateDelegateImpl::HandleStartStateCallback(err);
127+
}
128+
129+
/**
130+
* Handle Command Callback in application: Stop
131+
* @param[out] get operational error after callback.
132+
*/
133+
void HandleStopStateCallback(GenericOperationalError & err) override
134+
{
135+
GenericOperationalStateDelegateImpl::HandleStopStateCallback(err);
136+
mCountDownTime.SetNull();
137+
}
112138
};
113139

114140
Instance * GetOperationalStateInstance();

0 commit comments

Comments
 (0)