New issue
Advanced search Search tips

Issue 826949 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Need to add post-install hook to build processes to capture clang-tidy logs

Project Member Reported by cmt...@chromium.org, Mar 28 2018

Issue description

When packages are built with the environment variable WITH_TIDY=1, clang-tidy is run during the compilation phase and the clang-tidy warnings are generated inside the normal build log.

We need to add a hook to the build process to copy such build logs (containing clang-tidy warnings) to a special directory, where they can be properly processed later.  The build hook needs to come after the compilation phase has completely finished, so making it a pre-install hook makes sense.
 

Comment 1 by vapier@chromium.org, Mar 29 2018

there's no need to hook this.  the logs are already captured & stored & retained after builds finish on a per-board basis in $PORT_LOGDIR.

Comment 2 by cmt...@chromium.org, Mar 29 2018

My understanding is that ALL build logs go into the $PORT_LOGDIR, regardless of whether or not they have been built with clang-tidy.  They purpose of this install-hook would be to capture those build logs where the package was built with clang-tidy, and ONLY those build logs, and put them into a special place where they can later be processed and uploaded.

I do not see how knowing that all of the current build logs are stored in $PORT_LOGDIR helps with this in any way.

(Perhaps you were unaware that, although Chrome is the only package we currently build with clang-tidy, there are plans to possibly build other packages with clang-tidy as well in the future).
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/b3000753b91f9c0a53ae2b54409d5a1cfc4d672b

commit b3000753b91f9c0a53ae2b54409d5a1cfc4d672b
Author: Caroline Tice <cmtice@google.com>
Date: Sat Mar 31 02:46:37 2018

Add pre-install hook for clang-tidy build logs.

This adds a pre-install hook so that when a package is emerged with
WITH_TIDY=1 (which invokes the clang-tidy analyzer) the build log

BUG= chromium:826949 
TEST=Ran ebuild-caroline ... install (with USE=clang-tidy), and this
created the appropriate directories and copied the build log there.

Change-Id: Ie320da10ff6f58476f6bc7b8c642c1ec896d8e08
Reviewed-on: https://chromium-review.googlesource.com/984827
Commit-Ready: Caroline Tice <cmtice@chromium.org>
Tested-by: Caroline Tice <cmtice@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>

[modify] https://crrev.com/b3000753b91f9c0a53ae2b54409d5a1cfc4d672b/profiles/base/profile.bashrc

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/acb007b22b7913e85b7dbe6a3400e682b5f70dfb

commit acb007b22b7913e85b7dbe6a3400e682b5f70dfb
Author: Caroline Tice <cmtice@google.com>
Date: Tue Apr 03 03:12:57 2018

[clang-tidy] Update pre-install hook.

Since the builders clean up the chroot after each build there
is no reason not to always to the copy in the clang-tidy
pre-install hook.

BUG= chromium:826949 
TEST=None

Change-Id: I46b7e89c17794b7987399ee6d5055a814bee5799
Reviewed-on: https://chromium-review.googlesource.com/990073
Commit-Ready: Caroline Tice <cmtice@chromium.org>
Tested-by: Caroline Tice <cmtice@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>

[modify] https://crrev.com/acb007b22b7913e85b7dbe6a3400e682b5f70dfb/profiles/base/profile.bashrc

Status: Fixed (was: Assigned)

Comment 6 by cmt...@chromium.org, May 15 2018

Status: Verified (was: Fixed)

Sign in to add a comment