From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web08.5246.1611018609261219853 for ; Mon, 18 Jan 2021 17:10:11 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 19 Jan 2021 09:10:05 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , References: <010101d6ea0f$ad1a0160$074e0420$@byosoft.com.cn> <15493.1610592378547060035@groups.io> <01a501d6eadb$89a7eef0$9cf7ccd0$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0g5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BhdGNoIDAvMl0gQ29udmVydCBTcGxpdCB0b29sIHRvIHB5dGhvbg==?= Date: Tue, 19 Jan 2021 09:10:05 +0800 Message-ID: <000c01d6edff$d28a2300$779e6900$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQD9eqvyC5RGdXjCf8SbXt1jII5EDgI+9vqsAVTvQIoCHnISlgFkOpLzq6hVOeA= Content-Type: multipart/alternative; boundary="----=_NextPart_000_000D_01D6EE42.E0AF37C0" Content-Language: zh-cn ------=_NextPart_000_000D_01D6EE42.E0AF37C0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Bob: The code logic is fine. This is a big change. I suggest to update tool ve= rsion from 1.0 to 2.0. With this change, Reviewed-by: Liming Gao =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+70509+4905953+8761045@groups.io = =E4=BB=A3=E8=A1=A8 Bob Feng =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B41=E6=9C=8819=E6=97=A5 7= :57 =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaoliming@byosoft.com.c= n =E4=B8=BB=E9=A2=98: Re: [edk2-devel] =E5=9B=9E=E5=A4=8D: [edk2-devel] [Pat= ch 0/2] Convert Split tool to python =20 Liming, =20 I have sent the patch V3 that is to move the unit test to tests/Split fold= er. =20 Do you have any other concerns about this patch? =20 Thanks, Bob =20 From: Feng, Bob C=20 Sent: Friday, January 15, 2021 9:50 AM To: devel@edk2.groups.io ; gaoliming@byosoft= .com.cn =20 Cc: Feng, Bob C > Subject: RE: [edk2-devel] =E5=9B=9E=E5=A4=8D: [edk2-devel] [Patch 0/2] Con= vert Split tool to python =20 Hi Liming, =20 1. The test framework can be used for both incremental test and functional= ity test. We can do more discussion when I send out this framework for revi= ew. 2. Yes, I agree to add a sub folder under the test folder. I=E2=80=99ll up= date the patch. =20 Is there any other comments before I send the patch V2? =20 Thanks, Bob =20 From: devel@edk2.groups.io > On Behalf Of gaoliming Sent: Friday, January 15, 2021 9:13 AM To: Feng, Bob C >; dev= el@edk2.groups.io =20 Subject: =E5=9B=9E=E5=A4=8D: [edk2-devel] =E5=9B=9E=E5=A4=8D: [edk2-devel]= [Patch 0/2] Convert Split tool to python =20 Bob: Thanks for your planning sharing. For BaseTools test, I still have some q= uestions.=20 =20 1. For test framework, is it the incremental test framework or the fu= nctionality test framework or both?=20 2. For BaseTools\Source\Python\tests\test_split.py, it creates new di= rectory =E2=80=98tests=E2=80=99 for test case scripts, and use test_split.p= y for split tool. So, new tool test script will follow the same style. Besi= des, split tool is simple. It may not have its special test case. But, Fce/= FMMT are too complex. They need the different bios images as their test cas= es. Then, where are those test cases placed into? I would prefer to place t= he test script and its test cases into the same directory. So, I would prop= ose to create the subdirectory in =E2=80=98tests=E2=80=99 for each tool tes= t, such as Split for this case. Then, every tool can place its test script = and test case into its own directory.=20 =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: tosubbounce+27952+0+0+0@groups.io > =E4=BB=A3=E8=A1=A8 Bob Feng =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B41=E6=9C=8814=E6=97=A5 1= 0:46 =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming >; devel@edk2.groups.io =20 =E4=B8=BB=E9=A2=98: Re: [edk2-devel] =E5=9B=9E=E5=A4=8D: [edk2-devel] [Pat= ch 0/2] Convert Split tool to python =20 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 benefit and process of moving BaseTools= out of the edk2 repo for reference. https://edk2.groups.io/g/devel/topic/76572200#64993=20 https://edk2.groups.io/g/rfc/topic/74009714#270=20 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 t= he edk2 BaseTools. 2. Prepare to publish the Basetools incremental build regression test case= s and test framework. And, I see you also add unittest for new split tool. Can you introduce 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://doc= s.python.org/3/library/unittest.html=20 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.=20 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 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 = =20 > =E4=BB=A3=E8=A1=A8 Bob Feng =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B41=E6=9C=8813=E6=97=A5 1= 7:56 =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =20 =E4=B8=BB=E9=A2=98: [edk2-devel] [Patch 0/2] Convert Split tool to python 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 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 BaseTools: Add unittest for Split tool 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 -- 2.29.1.windows.1 -=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/70232 Mute This Topic: https://groups.io/mt/79647273/4905953 Group Owner: devel+owner@edk2.groups.io =20 Unsubscribe: https://edk2.groups.io/g/devel/unsub [gaoliming@byosoft.com.cn] -=3D-=3D-=3D-=3D-=3D-=3D ------=_NextPart_000_000D_01D6EE42.E0AF37C0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Bob:

=C2= =A0The code logic is fine. This is a big change. I suggest to update tool = version from 1.0 to 2.0. With this change, Reviewed-by: Liming Gao <gaol= iming@byosoft.com.cn>

&= nbsp;

Thanks

Liming

=E5=8F=91=E4=BB=B6=E4=BA=BA: bounce= +27952+70509+4905953+8761045@groups.io <bounce+27952+70509+4905953+87610= 45@groups.io> =E4=BB=A3=E8=A1=A8 Bob Feng
=E5=8F=91=E9= =80=81=E6=97=B6=E9=97=B4: 2021=E5=B9= = =B41=E6=9C=8819=E6=97= =A5 7:57
=E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaolimin= g@byosoft.com.cn
=E4=B8=BB=E9=A2=98:= Re: [edk2-devel] =E5=9B=9E=E5=A4=8D: [edk2-devel] [Patch 0/2] Convert Split tool to python

 

Liming,<= /p>

 

I have sent the patch V3 that is to move the unit test to tests/Split= folder.

 

Do you have any other concerns about this= patch?

 

Thanks,

Bob

 <= /o:p>

From:<= span lang=3DEN-US style=3D'font-size:11.0pt;font-family:"Calibri",sans-seri= f'> Feng, Bob C
Sent: Friday, January 15, 2021 9:50 AM
To:= devel@edk2.groups.io; gaoliming@byosoft.com.cn
= Cc: Feng, Bob C <bob.c.feng@= intel.com>
Subject: RE: [edk2-devel] =E5=9B=9E=E5=A4=8D: [edk2-devel] [Patch 0/2] Convert Split= tool to python

 

Hi Li= ming,

 

1. The test framework can be used for both in= cremental test and functionality test. We can do more discussion when I sen= d out this framework for review.

= 2. Yes, I agree to add a sub folder under the test folder. I=E2=80=99ll= update the patch.

 = ;

Is there any other comments befo= re I send the patch V2?

=  

Thanks,

Bob

 

Fro= m: devel@edk2.groups= .io <devel@edk2.groups.io> On Behalf Of gaoliming
Sent: Friday, January 15, 202= 1 9:13 AM
To: Feng, Bob C <
bob.c.feng@intel.com>; = devel@edk2.groups.io
Subject:
=E5= =9B=9E=E5=A4=8D: [edk2-devel] =E5=9B= = =9E=E5=A4=8D: [edk2-devel] [Patch 0/2] Convert Split tool to py= thon

 

Bob:

&nb= sp;Thanks for your planning sharing. For BaseTools test, I stil= l have some questions.

&n= bsp;

1.=       For test fr= amework, is it the incremental test framework or the functionality test fra= mework or both?

2.      For BaseTools\Source\Python\tests\test_split.py, it creates new di= rectory =E2=80=98tests=E2=80=99 = for test case scripts, and use test_split.py for split tool. So, new tool t= est script will follow the same style. Besides, split tool is simple. It ma= y not have its special test case. But, Fce/FMMT are too complex. They need = the different bios images as their test cases. Then, where are those test c= ases placed into? I would prefer to place the test script and its test case= s into the same directory. So, I would propose to create the subdirectory i= n =E2=80=98tests=E2=80=99 for each tool test, such as Split for this case. Then, every tool can pl= ace its test script and test case into its own directory.

 

Thanks

Liming<= /o:p>

=E5=8F=91=E4=BB=B6=E4=BA= =BA: tosubbounce+27952+0+0+0@groups.io <tosubbounce+27952+0+0+0@groups.i= o> =E4=BB=A3=E8=A1=A8 Bob Feng
=E5=8F=91=E9=80=81= =E6=97=B6=E9=97=B4: 2021=E5=B9=B41=E6=9C=8814=E6=97=A5 10:46
=E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io
=E4=B8=BB=E9=A2=98: Re: [edk2-devel] =E5= = =9B=9E=E5=A4=8D: [edk2-devel] [Patch 0/2] Convert Split= tool to python

 

Good questions. I answer them inline.

Thanks,
Bob
On Thu, Jan 14, 2021 at 08:53 AM, gaoliming wrote:<= /p>

Bob:
Have you plan to convert all C tools to = Python tools? Or only some ones?

I am still investigating the feasibility o= f converting the C tools to Python tools. Some C tools are simple but some = are complex. I hope all the C tools can be converted to Python tools so tha= t all the tools can be moved to the BaseTools separate repo. I think we can= file some BZs to track the progress of the C tools conversion. And I hope = there could be more volunteers to be involved in this work.

Here are= the discussions about the benefit and process of moving BaseTools out of t= he edk2 repo for reference.

Can you shar= e your planning for the changes in BaseTools?

Except for this patch, my current work for Basetools are:
1. Re-write t= he FMMT/FCE with Python and propose to add these 2 tools to the edk2 BaseTo= ols.
2. Prepare to publish the Basetools incremental build regression te= st cases and test framework.

A= nd, I see you also add unittest for new split tool. Can you introduce theunittest framework for python tool? If so, new added tool can follow the<= br>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 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 c= ode development, we can try our best to follow this document. https://edk2-docs.gitbook.io/edk-ii-python-devel= opment-process-specification/ 


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+87= 61045@groups.io
<bounce+27952+70232+4905953+8761045@groups.io> =E4=BB=A3=E8=A1=A8 Bob Feng
=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 Sp= lit tool to python

There are 2 reasons to convert Split tool from C = to Python.

1. We are in the process of moving the Basetools Python c= ode

to a separate repository. But there still are many C tools under=

edk2/BaseTools. To make all Basetools be in the separate repo,
<= br>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
BaseTools: Add unit= test for Split tool

BaseTools/Source/C/Split/Split.c | 466 ---------= -----------
BaseTools/BinWrappers/PosixLike/Split | 31 +-
BaseTools/B= inWrappers/WindowsLike/Split.bat | 3 +
BaseTools/Source/C/GNUmakefile | = 1 -
BaseTools/Source/C/Makefile | 1 -
BaseTools/Source/C/Split/GNUmak= efile | 17 -
BaseTools/Source/C/Split/Makefile | 16 -
BaseTools/Sourc= e/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 10= 0644 BaseTools/Source/C/Split/Split.c
create mode 100644 BaseTools/BinWr= appers/WindowsLike/Split.bat
delete mode 100644 BaseTools/Source/C/Split= /GNUmakefile
delete mode 100644 BaseTools/Source/C/Split/Makefile
cre= ate mode 100644 BaseTools/Source/Python/Split/Split.py
create mode 10064= 4 BaseTools/Source/Python/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 = sent to this group.
View/Reply Online (#70232): https://edk2.groups.io/g= /devel/message/70232
Mute This Topic: https://groups.io/mt/79647273/4905953=
Group Owner: devel+ow= ner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub
= [gaoliming@byosoft.com.cn]
-=3D-=3D-=3D-=3D-=3D-=3D

------=_NextPart_000_000D_01D6EE42.E0AF37C0--