New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 902404 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Mapping line numbers in a CQ bot checkout to the line numbers in a CL patchset on Gerrit

Project Member Reported by st...@chromium.org, Nov 6

Issue description

The base revision of a CL/patchset is different: Gerrit's base revision is the one in a developer's local checkout; CQ bot's base revision is always at HEAD when the build starts.

This is a line number mismatch issue that should be resolved for per-CL code coverage.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/2a7418a0063dcf26e6eff813abd81bdc5ae696a6

commit 2a7418a0063dcf26e6eff813abd81bdc5ae696a6
Author: Yuke Liao <liaoyuke@chromium.org>
Date: Thu Nov 08 20:03:04 2018

[code coverage] Implement rebasing git diff

This CL implements the functionality to calculate the line number
mapping of added lines by a patch given git diffs reltive to two
different revisions.

Bug:  902404 
Change-Id: Ia40cd8d7ae78f0cd60e5b8fe9a6b1b7a590fbc20
Reviewed-on: https://chromium-review.googlesource.com/c/1324751
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Shuotao Gao <stgao@chromium.org>

[add] https://crrev.com/2a7418a0063dcf26e6eff813abd81bdc5ae696a6/scripts/slave/recipe_modules/clang_coverage/unittests/rebase_git_diff_test.py
[add] https://crrev.com/2a7418a0063dcf26e6eff813abd81bdc5ae696a6/scripts/slave/recipe_modules/clang_coverage/resources/rebase_git_diff.py

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 9

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/ce40758679046d6651c1af15f1850af14ac2fbda

commit ce40758679046d6651c1af15f1850af14ac2fbda
Author: Yuke Liao <liaoyuke@chromium.org>
Date: Mon Nov 12 18:51:08 2018

[code coverage] Fix a diff mapping calculation bug for new lines

This CL fixes a bug in the function to calculate diff mapping.

Bug:  902404 
Change-Id: I82b1a47f83032e9f8642cb3252120f41594e3cd8
Reviewed-on: https://chromium-review.googlesource.com/c/1330918
Reviewed-by: Shuotao Gao <stgao@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>

[modify] https://crrev.com/ce40758679046d6651c1af15f1850af14ac2fbda/scripts/slave/recipe_modules/clang_coverage/unittests/rebase_git_diff_test.py
[modify] https://crrev.com/ce40758679046d6651c1af15f1850af14ac2fbda/scripts/slave/recipe_modules/clang_coverage/resources/rebase_git_diff.py

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/e34cd16d454bd10a5e4721d6d5f347483b044aed

commit e34cd16d454bd10a5e4721d6d5f347483b044aed
Author: Yuke Liao <liaoyuke@chromium.org>
Date: Mon Nov 12 18:51:54 2018

[code coverage] Rebase coverage metadata

This CL only rebases and dumps the flat format because it's much easier
to implement and debug as of now for the purpose of prototyping.

Eventually, the flat format should be deprecated in favor of the
compressed format and protobuf should be used explicitly so that the
formats are maintainable and tractable.

Bug:  902404 
Change-Id: I2612f5ef2953c8f3ba01e278ac3e0a784c3eaa9b
Reviewed-on: https://chromium-review.googlesource.com/c/1330926
Reviewed-by: Shuotao Gao <stgao@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>

[modify] https://crrev.com/e34cd16d454bd10a5e4721d6d5f347483b044aed/scripts/slave/recipe_modules/clang_coverage/unittests/generate_coverage_metadata_test.py
[modify] https://crrev.com/e34cd16d454bd10a5e4721d6d5f347483b044aed/scripts/slave/recipe_modules/clang_coverage/api.py
[modify] https://crrev.com/e34cd16d454bd10a5e4721d6d5f347483b044aed/scripts/slave/recipe_modules/clang_coverage/resources/generate_coverage_metadata.py

Status: Fixed (was: Assigned)

Sign in to add a comment