New issue
Advanced search Search tips

Issue 666696 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocking:
issue 659631



Sign in to add a comment

GN cannot regenerate public_monochrome_java with EMMA coverage enabled

Project Member Reported by mvanouwe...@chromium.org, Nov 18 2016

Issue description

I'm using EMMA coverage as documented here:
https://chromium.googlesource.com/chromium/src/+/master/build/android/docs/coverage.md

Since https://codereview.chromium.org/2501153002 this fails as follows:


ninja: Entering directory `out/android_debug_coverage'
[1/1] Regenerating ninja files
FAILED: build.ninja 
/usr/local/google/code/clank1/src/buildtools/linux64/gn --root=/usr/local/google/code/clank1/src -q gen .
ERROR Input to target not generated by a dependency.
The file:
  //out/android_debug_coverage/gen/chrome/android/java/templates/public_monochrome_application/org/chromium/chrome/browser/MonochromeApplication.java
is listed as an input or source for the target:
  //chrome/android/java/templates:public_monochrome_java__compile_java__emma_instr
but this file was not generated by any dependencies of the target. The target
that generates the file is:
  //chrome/android/java/templates:monochrome_application_class

If you have generated inputs, there needs to be a dependency path between the
two targets in addition to just listing the files. For indirect dependencies,
the intermediate ones must be public_deps. data_deps don't count since they're
only runtime dependencies. If you think a dependency chain exists, it might be
because the chain is private. Try "gn path" to analyze.
ninja: error: rebuilding 'build.ninja': subcommand failed


gn path out/android_debug_coverage //chrome/android/java/templates:public_monochrome_java__compile_java__emma_instr //chrome/android/java/templates:monochrome_application_class
//chrome/android/java/templates:public_monochrome_java__compile_java__emma_instr --[private]-->
//chrome/android/java/templates:public_monochrome_java__compile_java__process_prebuilt --[public]-->
//chrome/android/java/templates:public_monochrome_java__compile_java__process_prebuilt__filter --[private]-->
//chrome/android/java/templates:monochrome_application_class

Michael, could you take a look please?
 
Blocking: 659631
Cc: agrieve@chromium.org
agrieve@, any ideal how this happened?

The only special thing is the java file is generated, but it seemed that GN figured out the target, in this step, the target 'monochrome_application_class' should have no different than others.
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/123bee15a8403bd26d896f5cd5f0d5116c1b39be

commit 123bee15a8403bd26d896f5cd5f0d5116c1b39be
Author: michaelbai <michaelbai@chromium.org>
Date: Mon Nov 21 22:05:06 2016

Pass deps to emma_instr target

This makes emma_instr work with the generated Java file.

BUG= 666696 

Review-Url: https://codereview.chromium.org/2515383002
Cr-Commit-Position: refs/heads/master@{#433665}

[modify] https://crrev.com/123bee15a8403bd26d896f5cd5f0d5116c1b39be/build/config/android/internal_rules.gni

mvanouwerkerk@

The GN issue is fixed, but I still see the compile error when emma is enabled (not related to GN), Is that something you are working on?



Status: Fixed (was: Assigned)
Coverage for junit and instrumentation tests is working again, thanks!

Sign in to add a comment