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

Adding python code for generating data model xml .gni file #36437

Merged
merged 10 commits into from
Nov 11, 2024

Conversation

vatsalghelani-csa
Copy link
Contributor

Work for Issue #31317

PR 21 - This script generates the data_model_xmls.gni file by dynamically identifying and listing files located in various data model directories. The chip_root directory path is automatically set relative to the script’s location, ensuring portability. The Jinja2 template is used to format the output, and the generated file is saved in src/python_testing/matter_testing_infrastructure/.

Copy link

semanticdiff-com bot commented Nov 8, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  src/python_testing/matter_testing_infrastructure/generate_data_model_xmls_gni.py  0% smaller

@github-actions github-actions bot added tests matter-1.4-te2-script-change Script changes before end of Matter 1.4 TE2 labels Nov 8, 2024
Copy link

github-actions bot commented Nov 8, 2024

PR #36437: Size comparison from 18c0788 to 5bdd919

Increases above 0.2%:

platform target config section 18c0788 5bdd919 change % change
linux fabric-sync debug unknown 4880 4896 16 0.3
tv-app debug unknown 5648 5664 16 0.3
Full report (68 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 18c0788 5bdd919 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1349426 1349404 -22 -0.0
RAM 104080 104080 0 0.0
bl702 lighting-app bl702+eth FLASH 649386 649330 -56 -0.0
RAM 25321 25321 0 0.0
bl702+wifi FLASH 826966 826910 -56 -0.0
RAM 14053 14053 0 0.0
bl706+mfd+rpc+littlefs FLASH 1055164 1055108 -56 -0.0
RAM 23893 23893 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 976530 976474 -56 -0.0
RAM 16556 16556 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 837876 837828 -48 -0.0
RAM 123628 123628 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823792 823736 -56 -0.0
RAM 125516 125516 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770532 770468 -64 -0.0
RAM 113984 113984 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754736 754680 -56 -0.0
RAM 114192 114192 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 625926 625902 -24 -0.0
RAM 205780 205780 0 0.0
lock CC3235SF_LAUNCHXL FLASH 667238 667214 -24 -0.0
RAM 205932 205932 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679513 679473 -40 -0.0
RAM 78684 78684 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699357 699317 -40 -0.0
RAM 81324 81324 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699357 699317 -40 -0.0
RAM 81324 81324 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656301 656253 -48 -0.0
RAM 73752 73752 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616361 616321 -40 -0.0
RAM 71644 71644 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635989 635957 -32 -0.0
RAM 74188 74188 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635989 635957 -32 -0.0
RAM 74188 74188 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635817 635777 -40 -0.0
RAM 74692 74692 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655525 655485 -40 -0.0
RAM 77236 77236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655525 655485 -40 -0.0
RAM 77236 77236 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611213 611173 -40 -0.0
RAM 68772 68772 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631065 631025 -40 -0.0
RAM 71412 71412 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631065 631025 -40 -0.0
RAM 71412 71412 0 0.0
efr32 lock-app BRD4187C FLASH 927628 927564 -64 -0.0
RAM 160160 160160 0 0.0
BRD4338a FLASH 743696 743680 -16 -0.0
RAM 233288 233288 0 0.0
window-app BRD4187C FLASH 1018816 1018776 -40 -0.0
RAM 128260 128260 0 0.0
esp32 all-clusters-app c3devkit DRAM 95328 95328 0 0.0
FLASH 1540466 1540416 -50 -0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116256 116256 0 0.0
FLASH 1549282 1549266 -16 -0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4712 4712 0 0.0
FLASH 2698879 2698929 50 0.0
RAM 129648 129648 0 0.0
all-clusters-app debug unknown 5552 5552 0 0.0
FLASH 5992608 5992626 18 0.0
RAM 523968 523968 0 0.0
all-clusters-minimal-app debug unknown 5448 5448 0 0.0
FLASH 5328216 5328234 18 0.0
RAM 242480 242480 0 0.0
bridge-app debug unknown 5432 5432 0 0.0
FLASH 4670954 4671004 50 0.0
RAM 218416 218416 0 0.0
chip-tool debug unknown 5984 5984 0 0.0
FLASH 12872194 12872224 30 0.0
RAM 584466 584466 0 0.0
chip-tool-ipv6only arm64 unknown 21400 21400 0 0.0
FLASH 11002704 11002736 32 0.0
RAM 635368 635368 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11277239 11277237 -2 -0.0
RAM 584826 584826 0 0.0
fabric-bridge-app debug unknown 4688 4688 0 0.0
FLASH 4495222 4495240 18 0.0
RAM 205400 205400 0 0.0
fabric-sync debug unknown 4880 4896 16 0.3
FLASH 5309077 5310213 1136 0.0
RAM 466872 466872 0 0.0
lighting-app debug+rpc+ui unknown 6096 6096 0 0.0
FLASH 5606881 5606929 48 0.0
RAM 228552 228552 0 0.0
lock-app debug unknown 5368 5368 0 0.0
FLASH 4720428 4720478 50 0.0
RAM 204552 204552 0 0.0
ota-provider-app debug unknown 4744 4744 0 0.0
FLASH 4345860 4345910 50 0.0
RAM 198272 198272 0 0.0
ota-requestor-app debug unknown 4680 4680 0 0.0
FLASH 4484262 4484312 50 0.0
RAM 202840 202840 0 0.0
shell debug unknown 4240 4240 0 0.0
FLASH 3011293 3011325 32 0.0
RAM 160368 160368 0 0.0
thermostat-no-ble arm64 unknown 9440 9440 0 0.0
FLASH 4089952 4090000 48 0.0
RAM 242936 242936 0 0.0
tv-app debug unknown 5648 5664 16 0.3
FLASH 5942565 5943701 1136 0.0
RAM 596336 596336 0 0.0
tv-casting-app debug unknown 5232 5232 0 0.0
FLASH 11079389 11079421 32 0.0
RAM 694536 694536 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915372 915308 -64 -0.0
RAM 143281 143281 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 887588 887568 -20 -0.0
RAM 141468 141468 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 847628 847564 -64 -0.0
RAM 142189 142189 0 0.0
nxp contact k32w0+release FLASH 584144 584096 -48 -0.0
RAM 71044 71044 0 0.0
mcxw71+release FLASH 598696 598640 -56 -0.0
RAM 63144 63144 0 0.0
light k32w0+release FLASH 611220 611156 -64 -0.0
RAM 70436 70436 0 0.0
k32w1+release FLASH 685016 684952 -64 -0.0
RAM 48776 48776 0 0.0
lock mcxw71+release FLASH 748544 748488 -56 -0.0
RAM 67300 67300 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1642980 1642948 -32 -0.0
RAM 212056 212056 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1550180 1550164 -16 -0.0
RAM 208856 208856 0 0.0
light cy8ckit_062s2_43012 FLASH 1466620 1466588 -32 -0.0
RAM 200840 200840 0 0.0
lock cy8ckit_062s2_43012 FLASH 1464796 1464764 -32 -0.0
RAM 225200 225200 0 0.0
qpg lighting-app qpg6105+debug FLASH 662184 662120 -64 -0.0
RAM 105380 105380 0 0.0
lock-app qpg6105+debug FLASH 620284 620220 -64 -0.0
RAM 99832 99832 0 0.0
stm32 light STM32WB5MM-DK FLASH 482984 482920 -64 -0.0
RAM 144844 144844 0 0.0
telink bridge-app tlsr9258a FLASH 684684 684642 -42 -0.0
RAM 91528 91528 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 622696 622654 -42 -0.0
RAM 50464 50464 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 710622 710580 -42 -0.0
RAM 73804 73804 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 628990 628948 -42 -0.0
RAM 145384 145384 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 814878 814836 -42 -0.0
RAM 100004 100004 0 0.0
tizen all-clusters-app arm unknown 4948 4948 0 0.0
FLASH 1722580 1722468 -112 -0.0
RAM 90656 90656 0 0.0
chip-tool-ubsan arm unknown 10832 10832 0 0.0
FLASH 18007550 18006294 -1256 -0.0
RAM 7857676 7857036 -640 -0.0

@andy31415 andy31415 added fast track and removed matter-1.4-te2-script-change Script changes before end of Matter 1.4 TE2 labels Nov 11, 2024
@github-actions github-actions bot added the matter-1.4-te2-script-change Script changes before end of Matter 1.4 TE2 label Nov 11, 2024
Copy link

github-actions bot commented Nov 11, 2024

PR #36437: Size comparison from 18c0788 to b329018

Increases above 0.2%:

platform target config section 18c0788 b329018 change % change
linux fabric-sync debug unknown 4880 4896 16 0.3
tv-app debug unknown 5648 5664 16 0.3
Full report (68 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 18c0788 b329018 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1349426 1349402 -24 -0.0
RAM 104080 104080 0 0.0
bl702 lighting-app bl702+eth FLASH 649386 649330 -56 -0.0
RAM 25321 25321 0 0.0
bl702+wifi FLASH 826966 826910 -56 -0.0
RAM 14053 14053 0 0.0
bl706+mfd+rpc+littlefs FLASH 1055164 1055106 -58 -0.0
RAM 23893 23893 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 976530 976472 -58 -0.0
RAM 16556 16556 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 837876 837828 -48 -0.0
RAM 123628 123628 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823792 823736 -56 -0.0
RAM 125516 125516 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770532 770468 -64 -0.0
RAM 113984 113984 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754736 754680 -56 -0.0
RAM 114192 114192 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 625926 625902 -24 -0.0
RAM 205780 205780 0 0.0
lock CC3235SF_LAUNCHXL FLASH 667238 667214 -24 -0.0
RAM 205932 205932 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679513 679473 -40 -0.0
RAM 78684 78684 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699357 699317 -40 -0.0
RAM 81324 81324 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699357 699317 -40 -0.0
RAM 81324 81324 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656301 656253 -48 -0.0
RAM 73752 73752 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616361 616321 -40 -0.0
RAM 71644 71644 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635989 635957 -32 -0.0
RAM 74188 74188 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635989 635957 -32 -0.0
RAM 74188 74188 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635817 635777 -40 -0.0
RAM 74692 74692 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655525 655485 -40 -0.0
RAM 77236 77236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655525 655485 -40 -0.0
RAM 77236 77236 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611213 611173 -40 -0.0
RAM 68772 68772 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631065 631025 -40 -0.0
RAM 71412 71412 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631065 631025 -40 -0.0
RAM 71412 71412 0 0.0
efr32 lock-app BRD4187C FLASH 927628 927564 -64 -0.0
RAM 160160 160160 0 0.0
BRD4338a FLASH 743696 743680 -16 -0.0
RAM 233288 233288 0 0.0
window-app BRD4187C FLASH 1018816 1018776 -40 -0.0
RAM 128260 128260 0 0.0
esp32 all-clusters-app c3devkit DRAM 95328 95328 0 0.0
FLASH 1540466 1540416 -50 -0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116256 116256 0 0.0
FLASH 1549282 1549266 -16 -0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4712 4712 0 0.0
FLASH 2698879 2698929 50 0.0
RAM 129648 129648 0 0.0
all-clusters-app debug unknown 5552 5552 0 0.0
FLASH 5992608 5992626 18 0.0
RAM 523968 523968 0 0.0
all-clusters-minimal-app debug unknown 5448 5448 0 0.0
FLASH 5328216 5328234 18 0.0
RAM 242480 242480 0 0.0
bridge-app debug unknown 5432 5432 0 0.0
FLASH 4670954 4671004 50 0.0
RAM 218416 218416 0 0.0
chip-tool debug unknown 5984 5984 0 0.0
FLASH 12872194 12872224 30 0.0
RAM 584466 584466 0 0.0
chip-tool-ipv6only arm64 unknown 21400 21400 0 0.0
FLASH 11002704 11002736 32 0.0
RAM 635368 635368 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11277239 11277331 92 0.0
RAM 584826 584818 -8 -0.0
fabric-bridge-app debug unknown 4688 4688 0 0.0
FLASH 4495222 4495274 52 0.0
RAM 205400 205392 -8 -0.0
fabric-sync debug unknown 4880 4896 16 0.3
FLASH 5309077 5309749 672 0.0
RAM 466872 466872 0 0.0
lighting-app debug+rpc+ui unknown 6096 6096 0 0.0
FLASH 5606881 5606929 48 0.0
RAM 228552 228552 0 0.0
lock-app debug unknown 5368 5368 0 0.0
FLASH 4720428 4720478 50 0.0
RAM 204552 204552 0 0.0
ota-provider-app debug unknown 4744 4744 0 0.0
FLASH 4345860 4345910 50 0.0
RAM 198272 198272 0 0.0
ota-requestor-app debug unknown 4680 4680 0 0.0
FLASH 4484262 4484312 50 0.0
RAM 202840 202840 0 0.0
shell debug unknown 4240 4240 0 0.0
FLASH 3011293 3011325 32 0.0
RAM 160368 160368 0 0.0
thermostat-no-ble arm64 unknown 9440 9440 0 0.0
FLASH 4089952 4090000 48 0.0
RAM 242936 242936 0 0.0
tv-app debug unknown 5648 5664 16 0.3
FLASH 5942565 5943701 1136 0.0
RAM 596336 596336 0 0.0
tv-casting-app debug unknown 5232 5232 0 0.0
FLASH 11079389 11079421 32 0.0
RAM 694536 694536 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915372 915308 -64 -0.0
RAM 143281 143281 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 887588 887568 -20 -0.0
RAM 141468 141468 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 847628 847564 -64 -0.0
RAM 142189 142189 0 0.0
nxp contact k32w0+release FLASH 584144 584096 -48 -0.0
RAM 71044 71044 0 0.0
mcxw71+release FLASH 598696 598640 -56 -0.0
RAM 63144 63144 0 0.0
light k32w0+release FLASH 611220 611156 -64 -0.0
RAM 70436 70436 0 0.0
k32w1+release FLASH 685016 684952 -64 -0.0
RAM 48776 48776 0 0.0
lock mcxw71+release FLASH 748544 748488 -56 -0.0
RAM 67300 67300 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1642980 1642948 -32 -0.0
RAM 212056 212056 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1550180 1550164 -16 -0.0
RAM 208856 208856 0 0.0
light cy8ckit_062s2_43012 FLASH 1466620 1466588 -32 -0.0
RAM 200840 200840 0 0.0
lock cy8ckit_062s2_43012 FLASH 1464796 1464764 -32 -0.0
RAM 225200 225200 0 0.0
qpg lighting-app qpg6105+debug FLASH 662184 662120 -64 -0.0
RAM 105380 105380 0 0.0
lock-app qpg6105+debug FLASH 620284 620220 -64 -0.0
RAM 99832 99832 0 0.0
stm32 light STM32WB5MM-DK FLASH 482984 482920 -64 -0.0
RAM 144844 144844 0 0.0
telink bridge-app tlsr9258a FLASH 684684 684642 -42 -0.0
RAM 91528 91528 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 622696 622654 -42 -0.0
RAM 50464 50464 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 710622 710580 -42 -0.0
RAM 73804 73804 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 628990 628948 -42 -0.0
RAM 145384 145384 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 814878 814836 -42 -0.0
RAM 100004 100004 0 0.0
tizen all-clusters-app arm unknown 4948 4948 0 0.0
FLASH 1722580 1722468 -112 -0.0
RAM 90656 90656 0 0.0
chip-tool-ubsan arm unknown 10832 10832 0 0.0
FLASH 18007550 18006294 -1256 -0.0
RAM 7857676 7857036 -640 -0.0

@mergify mergify bot merged commit f10e90f into project-chip:master Nov 11, 2024
67 checks passed
@vatsalghelani-csa vatsalghelani-csa deleted the dataModelXmlGni branch November 12, 2024 14:14
yyzhong-g pushed a commit to yyzhong-g/connectedhomeip that referenced this pull request Dec 12, 2024
…hip#36437)

* Adding python code for granating data model xml .gni file

* Fixed python code and remove buildable

* Update src/python_testing/matter_testing_infrastructure/generate_data_model_xmls_gni.py

Co-authored-by: Andrei Litvin <[email protected]>

* Update src/python_testing/matter_testing_infrastructure/generate_data_model_xmls_gni.py

Co-authored-by: Andrei Litvin <[email protected]>

* Update src/python_testing/matter_testing_infrastructure/generate_data_model_xmls_gni.py

Co-authored-by: Andrei Litvin <[email protected]>

* Fixed mismatches and typo from suggestion commits

* Fixed file configuraton to figure out the right directory, so this can be run from anywhere

* Restyled by autopep8

* Restyled by isort

* Update src/python_testing/matter_testing_infrastructure/generate_data_model_xmls_gni.py

---------

Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants