* Ecc style errors when running EDK2 CI locally without specifying a target (NO-TARGET) @ 2020-09-30 21:59 Rebecca Cran 2020-10-01 0:59 ` [edk2-devel] " Sean 0 siblings, 1 reply; 4+ messages in thread From: Rebecca Cran @ 2020-09-30 21:59 UTC (permalink / raw) To: devel; +Cc: Sean Brogan, Bret Barkelew, Liming Gao, Michael D Kinney Is it expected that the EDK2 CI run without errors in NO-TARGET mode - that is, when "-t" isn't specified? When I run it locally with "stuart_ci_build -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5 -a X64,AARCH64" I get lots of errors: one in ArmVirtPkg/PrePi/PrePi.c about a missing comment above a function, and then loads in DynamicTablesPkg - e.g.: PROGRESS - --Running ArmVirtPkg: EccCheck Test NO-TARGET -- ERROR - ERROR - EFI coding style error ERROR - *Error code: 8003 ERROR - *The #ifndef at the start of an include file should use both prefix and postfix underscore characters, '_' ERROR - *file: .../edk2/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h ERROR - *Line number: 41 ERROR - *The #ifndef name [AML_HANDLE] does not follow the rules ERROR - When I specify "-t DEBUG,RELEASE,NOOPT" it completes successfully. -- Rebecca Cran ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] Ecc style errors when running EDK2 CI locally without specifying a target (NO-TARGET) 2020-09-30 21:59 Ecc style errors when running EDK2 CI locally without specifying a target (NO-TARGET) Rebecca Cran @ 2020-10-01 0:59 ` Sean 2020-10-01 2:25 ` [EXTERNAL] " Rebecca Cran 0 siblings, 1 reply; 4+ messages in thread From: Sean @ 2020-10-01 0:59 UTC (permalink / raw) To: devel, rebecca; +Cc: Sean Brogan, Bret Barkelew, Liming Gao, Michael D Kinney Not sure i follow your first question but running without a "-t" specified at the command line and "-t NO-TARGET" is two different things. For edk2 ci you can see the CISettings.py file defines targets supported as a tuple of all 4 ("DEBUG", "RELEASE", "NO-TARGET", "NOOPT"). https://github.com/tianocore/edk2/blob/master/.pytool/CISettings.py#L72 and you can see that if the cli parameter for target is empty then the value is assigned to whatever is declared as supported. https://github.com/tianocore/edk2-pytool-extensions/blob/master/edk2toolext/invocables/edk2_multipkg_aware_invocable.py#L121 By creating a specific target "NO-TARGET" we could easily enable/disable their execution and thus we could control it in the matrix on the CI servers. Example here: https://github.com/tianocore/edk2/blob/master/.azurepipelines/templates/pr-gate-build-job.yml#L32 Most of the static code tests run for NO-TARGET. ECC is such a test so it only runs when NO-TARGET is run. Finally please be aware EccCheck runs git commands and can change your local workspace. This was something i recently learned and should probably be revisited as it means running it locally can be destructive to changes you don't yet have committed. Hope that helps. Thanks Sean On 9/30/2020 2:59 PM, Rebecca Cran wrote: > Is it expected that the EDK2 CI run without errors in NO-TARGET mode - > that is, when "-t" isn't specified? > > When I run it locally with "stuart_ci_build -c .pytool/CISettings.py > TOOL_CHAIN_TAG=GCC5 -a X64,AARCH64" I get lots of errors: one in > ArmVirtPkg/PrePi/PrePi.c about a missing comment above a function, and > then loads in DynamicTablesPkg - e.g.: > > PROGRESS - --Running ArmVirtPkg: EccCheck Test NO-TARGET -- > > ERROR - > ERROR - EFI coding style error > ERROR - *Error code: 8003 > ERROR - *The #ifndef at the start of an include file should use both > prefix and postfix underscore characters, '_' > ERROR - *file: .../edk2/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h > ERROR - *Line number: 41 > ERROR - *The #ifndef name [AML_HANDLE] does not follow the rules > ERROR - > > > When I specify "-t DEBUG,RELEASE,NOOPT" it completes successfully. > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [EXTERNAL] Re: [edk2-devel] Ecc style errors when running EDK2 CI locally without specifying a target (NO-TARGET) 2020-10-01 0:59 ` [edk2-devel] " Sean @ 2020-10-01 2:25 ` Rebecca Cran 2020-10-01 11:43 ` Laszlo Ersek 0 siblings, 1 reply; 4+ messages in thread From: Rebecca Cran @ 2020-10-01 2:25 UTC (permalink / raw) To: Sean Brogan, devel Cc: Sean Brogan, Bret Barkelew, Liming Gao, Michael D Kinney Ah, thanks. I made a wrong assumption about how it works. So I can get it to fail faster by running "stuart_ci_build -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5 -t NO-TARGET" - i.e. running NO-TARGET without also running DEBUG,RELEASE,NOOPT too. It turns out that because of the repo I'm running it against, where I haven't kept `master` up-to-date, it thinks almost all the files have changed - and so it runs Ecc against code that hasn't really changed for a long time. "INFO - Cmd to run is: git diff --name-status HEAD origin/master" So, now I've updated my repo's `master`, it both runs much faster, and succeeds. A weekly build which runs Ecc over all the code and compiles a report of issues might be nice. -- Rebecca Cran On 9/30/20 5:59 PM, Sean Brogan wrote: > Not sure i follow your first question but running without a "-t" > specified at the command line and "-t NO-TARGET" is two different > things. For edk2 ci you can see the CISettings.py file defines > targets supported as a tuple of all 4 ("DEBUG", "RELEASE", > "NO-TARGET", "NOOPT"). > https://github.com/tianocore/edk2/blob/master/.pytool/CISettings.py#L72 > > and you can see that if the cli parameter for target is empty then the > value is assigned to whatever is declared as supported. > https://github.com/tianocore/edk2-pytool-extensions/blob/master/edk2toolext/invocables/edk2_multipkg_aware_invocable.py#L121 > > > By creating a specific target "NO-TARGET" we could easily > enable/disable their execution and thus we could control it in the > matrix on the CI servers. Example here: > https://github.com/tianocore/edk2/blob/master/.azurepipelines/templates/pr-gate-build-job.yml#L32 > > > > Most of the static code tests run for NO-TARGET. ECC is such a test > so it only runs when NO-TARGET is run. > > Finally please be aware EccCheck runs git commands and can change your > local workspace. This was something i recently learned and should > probably be revisited as it means running it locally can be > destructive to changes you don't yet have committed. > > Hope that helps. > > Thanks > Sean > > > > > > > > On 9/30/2020 2:59 PM, Rebecca Cran wrote: >> Is it expected that the EDK2 CI run without errors in NO-TARGET mode >> - that is, when "-t" isn't specified? >> >> When I run it locally with "stuart_ci_build -c .pytool/CISettings.py >> TOOL_CHAIN_TAG=GCC5 -a X64,AARCH64" I get lots of errors: one in >> ArmVirtPkg/PrePi/PrePi.c about a missing comment above a function, >> and then loads in DynamicTablesPkg - e.g.: >> >> PROGRESS - --Running ArmVirtPkg: EccCheck Test NO-TARGET -- >> >> ERROR - >> ERROR - EFI coding style error >> ERROR - *Error code: 8003 >> ERROR - *The #ifndef at the start of an include file should use both >> prefix and postfix underscore characters, '_' >> ERROR - *file: .../edk2/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h >> ERROR - *Line number: 41 >> ERROR - *The #ifndef name [AML_HANDLE] does not follow the rules >> ERROR - >> >> >> When I specify "-t DEBUG,RELEASE,NOOPT" it completes successfully. >> >> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [EXTERNAL] Re: [edk2-devel] Ecc style errors when running EDK2 CI locally without specifying a target (NO-TARGET) 2020-10-01 2:25 ` [EXTERNAL] " Rebecca Cran @ 2020-10-01 11:43 ` Laszlo Ersek 0 siblings, 0 replies; 4+ messages in thread From: Laszlo Ersek @ 2020-10-01 11:43 UTC (permalink / raw) To: devel, rebecca, Sean Brogan Cc: Sean Brogan, Bret Barkelew, Liming Gao, Michael D Kinney On 10/01/20 04:25, Rebecca Cran wrote: > Ah, thanks. I made a wrong assumption about how it works. So I can get > it to fail faster by running "stuart_ci_build -c .pytool/CISettings.py > TOOL_CHAIN_TAG=GCC5 -t NO-TARGET" - i.e. running NO-TARGET without also > running DEBUG,RELEASE,NOOPT too. > > > It turns out that because of the repo I'm running it against, where I > haven't kept `master` up-to-date, it thinks almost all the files have > changed - and so it runs Ecc against code that hasn't really changed for > a long time. > > "INFO - Cmd to run is: git diff --name-status HEAD origin/master" > > > So, now I've updated my repo's `master`, it both runs much faster, and > succeeds. Right; a few days ago I also had to look up the "origin/master" references in ".pytool/Plugin/EccCheck/EccCheck.py" to understand how it restricts the warnings to "new" code. I have a dedicated VM for running CI locally, so whenever I push a topic branch to that, I just have to push my most recently fetched master branch reference to the VM as well. Thanks! Laszlo > > A weekly build which runs Ecc over all the code and compiles a report of > issues might be nice. > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-01 11:43 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-09-30 21:59 Ecc style errors when running EDK2 CI locally without specifying a target (NO-TARGET) Rebecca Cran 2020-10-01 0:59 ` [edk2-devel] " Sean 2020-10-01 2:25 ` [EXTERNAL] " Rebecca Cran 2020-10-01 11:43 ` Laszlo Ersek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox