[PATCH] automation: Enable parallel build with cppcheck analysis

Michal Orzel posted 1 patch 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230518122415.8698-1-michal.orzel@amd.com
automation/scripts/build | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
[PATCH] automation: Enable parallel build with cppcheck analysis
Posted by Michal Orzel 1 year ago
The limitation was fixed by the commit:
45bfff651173d538239308648c6a6cd7cbe37172

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
---
 automation/scripts/build | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/automation/scripts/build b/automation/scripts/build
index 9085cba35281..38c48ae6d826 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -39,10 +39,8 @@ cp xen/.config xen-config
 mkdir -p binaries
 
 if [[ "${CPPCHECK}" == "y" ]] && [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
-    # Cppcheck analysis invokes Xen-only build.
-    # Known limitation: cppcheck generates inconsistent reports when running
-    # in parallel mode, therefore do not specify -j<n>.
-    xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra
+    # Cppcheck analysis invokes Xen-only build
+    xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra -- -j$(nproc)
 
     # Preserve artefacts
     cp xen/xen binaries/xen
-- 
2.25.1
Re: [PATCH] automation: Enable parallel build with cppcheck analysis
Posted by Stefano Stabellini 1 year ago
On Thu, 18 May 2023, Michal Orzel wrote:
> The limitation was fixed by the commit:
> 45bfff651173d538239308648c6a6cd7cbe37172
> 
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  automation/scripts/build | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/automation/scripts/build b/automation/scripts/build
> index 9085cba35281..38c48ae6d826 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -39,10 +39,8 @@ cp xen/.config xen-config
>  mkdir -p binaries
>  
>  if [[ "${CPPCHECK}" == "y" ]] && [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
> -    # Cppcheck analysis invokes Xen-only build.
> -    # Known limitation: cppcheck generates inconsistent reports when running
> -    # in parallel mode, therefore do not specify -j<n>.
> -    xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra
> +    # Cppcheck analysis invokes Xen-only build
> +    xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra -- -j$(nproc)
>  
>      # Preserve artefacts
>      cp xen/xen binaries/xen
> -- 
> 2.25.1
>
Re: [PATCH] automation: Enable parallel build with cppcheck analysis
Posted by Luca Fancellu 1 year ago

> On 18 May 2023, at 13:24, Michal Orzel <michal.orzel@amd.com> wrote:
> 
> The limitation was fixed by the commit:
> 45bfff651173d538239308648c6a6cd7cbe37172
> 
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>

Hi Michal,

Looks good!

Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>



> ---
> automation/scripts/build | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/automation/scripts/build b/automation/scripts/build
> index 9085cba35281..38c48ae6d826 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -39,10 +39,8 @@ cp xen/.config xen-config
> mkdir -p binaries
> 
> if [[ "${CPPCHECK}" == "y" ]] && [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
> -    # Cppcheck analysis invokes Xen-only build.
> -    # Known limitation: cppcheck generates inconsistent reports when running
> -    # in parallel mode, therefore do not specify -j<n>.
> -    xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra
> +    # Cppcheck analysis invokes Xen-only build
> +    xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra -- -j$(nproc)
> 
>     # Preserve artefacts
>     cp xen/xen binaries/xen
> -- 
> 2.25.1
>