From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: =?UTF-8?B?UmU6IFtlZGsyLWRldmVsXSDlm57lpI06IFtlZGsyLWRldmVsXSBbUGF0Y2ggMC8yXSBDb252ZXJ0IFNwbGl0IHRvb2wgdG8gcHl0aG9u?= To: gaoliming ,devel@edk2.groups.io From: "Bob Feng" X-Originating-Location: CN (192.102.204.37) X-Originating-Platform: Windows Chrome 87 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Wed, 13 Jan 2021 18:46:18 -0800 References: <010101d6ea0f$ad1a0160$074e0420$@byosoft.com.cn> In-Reply-To: <010101d6ea0f$ad1a0160$074e0420$@byosoft.com.cn> Message-ID: <15493.1610592378547060035@groups.io> Content-Type: multipart/alternative; boundary="S7B43Ym5DJfnNZWOGK1M" --S7B43Ym5DJfnNZWOGK1M Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Good questions. I answer them inline. Thanks, Bob On Thu, Jan 14, 2021 at 08:53 AM, gaoliming wrote: >=20 > Bob: > Have you plan to convert all C tools to Python tools? Or only some ones? I am still investigating the feasibility of converting the C tools to Pyth= on tools. Some C tools are simple but some are complex. I hope all the C to= ols can be converted to Python tools so that all the tools can be moved to = the BaseTools separate repo. I think we can file some BZs to track the prog= ress of the C tools conversion. And I hope there could be more volunteers t= o be involved in this work. Here are the discussions about the benefit and process of moving BaseTools= out of the edk2 repo for reference. https://edk2.groups.io/g/devel/topic/76572200#64993 https://edk2.groups.io/g/rfc/topic/74009714#270 https://edk2.groups.io/g/devel/topic/73069134#58048 >=20 > Can you share your planning for the changes in BaseTools? Except for this patch, my current work for Basetools are: 1. Re-write the FMMT/FCE with Python and propose to add these 2 tools to t= he edk2 BaseTools. 2. Prepare to publish the Basetools incremental build regression test case= s and test framework. >=20 > And, I see you also add unittest for new split tool. Can you introduce t= he >=20 > unittest framework for python tool? If so, new added tool can follow the > same way to add unittest. The unittest is the python build-in library for the unit test. https://doc= s.python.org/3/library/unittest.html I provide the unit test is to help you to review this patch. From the unit= test case, it will be easy to see if this tool's behavior is as expected. I think for the python code development, we can try our best to follow thi= s document. https://edk2-docs.gitbook.io/edk-ii-python-development-process-= specification/ >=20 >=20 > Thanks > Liming >=20 >> -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- >> =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+70232+4905953+8761045@groups.= io >> =E4=BB=A3=E8=A1=A8 Bob F= eng >> =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B41=E6=9C=8813=E6=97= =A5 17:56 >> =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io >> =E4=B8=BB=E9=A2=98: [edk2-devel] [Patch 0/2] Convert Split tool to pyth= on >>=20 >> There are 2 reasons to convert Split tool from C to Python. >>=20 >> 1. We are in the process of moving the Basetools Python code >>=20 >> to a separate repository. But there still are many C tools under >>=20 >> edk2/BaseTools. To make all Basetools be in the separate repo, >>=20 >> we can convert the C tools to Python tools. >>=20 >> 2. The original Split tool is very slow. This python tool can reduce >>=20 >> 90% time >>=20 >> Bob Feng (2): >> BaseTools: Convert Split tool to python >> BaseTools: Add unittest for Split tool >>=20 >> BaseTools/Source/C/Split/Split.c | 466 -------------------- >> BaseTools/BinWrappers/PosixLike/Split | 31 +- >> BaseTools/BinWrappers/WindowsLike/Split.bat | 3 + >> BaseTools/Source/C/GNUmakefile | 1 - >> BaseTools/Source/C/Makefile | 1 - >> BaseTools/Source/C/Split/GNUmakefile | 17 - >> BaseTools/Source/C/Split/Makefile | 16 - >> BaseTools/Source/Python/Split/Split.py | 203 +++++++++ >> BaseTools/Source/Python/Split/__init__.py | 10 + >> BaseTools/Source/Python/tests/test_split.py | 101 +++++ >> 10 files changed, 325 insertions(+), 524 deletions(-) >> delete mode 100644 BaseTools/Source/C/Split/Split.c >> create mode 100644 BaseTools/BinWrappers/WindowsLike/Split.bat >> delete mode 100644 BaseTools/Source/C/Split/GNUmakefile >> delete mode 100644 BaseTools/Source/C/Split/Makefile >> create mode 100644 BaseTools/Source/Python/Split/Split.py >> create mode 100644 BaseTools/Source/Python/Split/__init__.py >> create mode 100644 BaseTools/Source/Python/tests/test_split.py >>=20 >> -- >> 2.29.1.windows.1 >>=20 >>=20 >>=20 >> -=3D-=3D-=3D-=3D-=3D-=3D >> Groups.io Links: You receive all messages sent to this group. >> View/Reply Online (#70232): https://edk2.groups.io/g/devel/message/7023= 2 >> Mute This Topic: https://groups.io/mt/79647273/4905953 >> Group Owner: devel+owner@edk2.groups.io >> Unsubscribe: https://edk2.groups.io/g/devel/unsub >> [gaoliming@byosoft.com.cn] >> -=3D-=3D-=3D-=3D-=3D-=3D >=20 > --S7B43Ym5DJfnNZWOGK1M Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Good questions. I answer them inline.

Thanks,
Bob

On Thu, Jan 14, 2021 at 08:53 AM, gaoliming wrote:
Bob:
Have you plan to convert all C tools to Python tools= ? Or only some ones?
I am still investigating the feasibility of converting the C tools to Pyth= on tools. Some C tools are simple but some are complex. I hope all the C to= ols can be converted to Python tools so that all the tools can be moved to = the BaseTools separate repo. I think we can file some BZs to track the prog= ress of the C tools conversion. And I hope there could be more volunteers t= o be involved in this work.

Here are the discussions about the b= enefit and process of moving BaseTools out of the edk2 repo for reference.<= br />
https://edk2.groups.io/g/devel/topic/76572200= #64993 
https://edk2.groups.io/g/rfc/topic/74009714#270 
https://edk2.groups.io/g/devel/topic/73069134= #58048

Can you share your planning for the changes in BaseTools? Except for this patch, my current work for Basetools are:
1. Re-write= the FMMT/FCE with Python and propose to add these 2 tools to the edk2 Base= Tools.
2. Prepare to publish the Basetools incremental build regressio= n test cases and test framework.

And, I see you also add unittest for new split tool. Can you i= ntroduce the
unittest framework for python tool? If so, new added tool= can follow the
same way to add unittest.
The unittest is the python build-in library for the unit test. https://docs.python.org/3/library/unittest.html 
I p= rovide the unit test is to help you to review this patch. From the unit tes= t case, it will be easy to
see if this tool's behavior is as expected.=  

I think for the python code development, we can try our b= est to follow this document. https://edk2-docs.gitbook.io/edk-ii-python-development-process-spe= cification/ 


Thanks
Liming
-----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6-----
=E5=8F=91= =E4=BB=B6=E4=BA=BA: bounce+27952+70232+4905953+8761045@groups.io
<= bounce+27952+70232+4905953+8761045@groups.io> =E4=BB=A3=E8=A1=A8 Bob Fen= g
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B41=E6=9C=8813=E6= =97=A5 17:56
=E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io
= =E4=B8=BB=E9=A2=98: [edk2-devel] [Patch 0/2] Convert Split tool to python<= br />
There are 2 reasons to convert Split tool from C to Python.

1. We are in the process of moving the Basetools Python code
to a separate repository. But there still are many C tools under
<= br />edk2/BaseTools. To make all Basetools be in the separate repo,
we can convert the C tools to Python tools.

2. The original = Split tool is very slow. This python tool can reduce

90% time
Bob Feng (2):
BaseTools: Convert Split tool to python
Ba= seTools: Add unittest for Split tool

BaseTools/Source/C/Split/Sp= lit.c | 466 --------------------
BaseTools/BinWrappers/PosixLike/Split= | 31 +-
BaseTools/BinWrappers/WindowsLike/Split.bat | 3 +
BaseTo= ols/Source/C/GNUmakefile | 1 -
BaseTools/Source/C/Makefile | 1 -
= BaseTools/Source/C/Split/GNUmakefile | 17 -
BaseTools/Source/C/Split/M= akefile | 16 -
BaseTools/Source/Python/Split/Split.py | 203 +++++++++<= br />BaseTools/Source/Python/Split/__init__.py | 10 +
BaseTools/Source= /Python/tests/test_split.py | 101 +++++
10 files changed, 325 insertio= ns(+), 524 deletions(-)
delete mode 100644 BaseTools/Source/C/Split/Sp= lit.c
create mode 100644 BaseTools/BinWrappers/WindowsLike/Split.batdelete mode 100644 BaseTools/Source/C/Split/GNUmakefile
delete mod= e 100644 BaseTools/Source/C/Split/Makefile
create mode 100644 BaseTool= s/Source/Python/Split/Split.py
create mode 100644 BaseTools/Source/Pyt= hon/Split/__init__.py
create mode 100644 BaseTools/Source/Python/tests= /test_split.py

--
2.29.1.windows.1



-= = =3D-=3D-=3D-=3D-=3D-=3D
Groups.io Links: You receive all messages sen= t to this group.
View/Reply Online (#70232): https://= edk2.groups.io/g/devel/message/70232
Mute This Topic: ht= tps://groups.io/mt/79647273/4905953
Group Owner: devel+owner@edk2.= groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub
[gaoliming@byosoft.com.cn]
-=3D-=3D-=3D-=3D-=3D-=3D
--S7B43Ym5DJfnNZWOGK1M--