From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mx.groups.io with SMTP id smtpd.web10.3265.1601519106254923831 for ; Wed, 30 Sep 2020 19:25:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=vtO4OzDu; spf=pass (domain: nuviainc.com, ip: 209.85.215.182, mailfrom: rebecca@nuviainc.com) Received: by mail-pg1-f182.google.com with SMTP id s31so2728698pga.7 for ; Wed, 30 Sep 2020 19:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=BmpehYKCVarrSx6sulrm5P+Kovbv5eH1S6w7P/dhYMA=; b=vtO4OzDuWT7Y9n1BLGH4ZKt/u+kvrD3gtRYRlbLoTybWqHrAioGs1bw7nnL4PHnHNc X4NQJ95xMHAYheQMFKOXOnE63FZIQ9cxLwRKyYzDoAwN5g/je21d2QVxWlHXS4yvHiy/ Iig5lzC4i6hGboY5NuA4QQm1vTYOAj7zEe6sPBahkH70hnWV/D7PH8Q/C84ITTZfzpfO HBfaXm4SuKEPvupRxuAYZLRgkl4UaQUqO+bBA2vxXPawQ4/zzENWrWddHQht1qkHb8be DpqtB3vWMFxp9NBoiUAuHoxC4x3uTH8OsKYKa2nPTpE1ZF6bgiRETBoQ/xHuk0fmZk2/ v6jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=BmpehYKCVarrSx6sulrm5P+Kovbv5eH1S6w7P/dhYMA=; b=WdsaEPvzSWbPp1gPDG4V0BtfVQ1Sg8GkXG8NEONQiYMH+WhooCTllBzWTYlJKB+fFN s1U5mHr1UKif6xKIy09fUp4msGG5BekNfK0stXj4C0+Hcxbm2R72ilzrxznXuU7VZdGS g9k+nkgHbNCqUAgH7dkAeRtMRLASdV85GNlSqWEQf001HQbEAd4bZF6K9hBAdJZ5kAT2 HP8YnAVvnPpE0tPzv81u/vrBP7D13X6MMiObHxq7xl7+Xnm4V96s6Zn/qp/e9sLGmN4i iocYRjVknsMghmbyK9KzqIhPWf/q9yjG8+QTkbGFRI4Vy9xXyseBa/bEOBK5AQNxsEia DU/w== X-Gm-Message-State: AOAM530zKqSAH7pcqCTvM/IlqW81D/kERCEzBkqksUp2A5qKtFXbifHf gbHvC1HcWwO2HUeV+QiEbNT27A== X-Google-Smtp-Source: ABdhPJzCpe9pTn3hp0X/cqmPB0Urm7P2axJB+r+PjlrQdl7BzPrYK/S9eMU+c/3vVYeCxXDN9Nv9UQ== X-Received: by 2002:aa7:9309:0:b029:13e:d13d:a10a with SMTP id 9-20020aa793090000b029013ed13da10amr4882828pfj.38.1601519105593; Wed, 30 Sep 2020 19:25:05 -0700 (PDT) Return-Path: Received: from [192.168.156.132] ([12.17.170.136]) by smtp.gmail.com with ESMTPSA id bj2sm3602957pjb.20.2020.09.30.19.25.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Sep 2020 19:25:05 -0700 (PDT) Subject: Re: [EXTERNAL] Re: [edk2-devel] Ecc style errors when running EDK2 CI locally without specifying a target (NO-TARGET) To: Sean Brogan , devel@edk2.groups.io Cc: Sean Brogan , Bret Barkelew , Liming Gao , Michael D Kinney References: <0b04d303-655f-7f4e-88b6-d63268fe234f@nuviainc.com> From: "Rebecca Cran" Message-ID: <2b285a3e-c665-e203-3ac3-c006dd017f2b@nuviainc.com> Date: Wed, 30 Sep 2020 19:25:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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. >> >>