Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: build/android/ant/apk-instr.xml

Issue 20210002: [Android] Sets up a coverage system for java using EMMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Gets code coverage for non-apk java working Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/android/ant/apk-package.xml » ('j') | build/android/ant/apk-package.xml » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
6 -->
7
8 <project default="instr-jar">
9 <!-- options for instr-jar -->
10 <property name="input.jar.file" location="${INPUT_JAR_FILE}" />
11 <property name="output.jar.dir" location="${OUTPUT_JAR_DIR}" />
12 <property name="output.jar.final.dir" location="${OUTPUT_JAR_FINAL_DIR}" />
13 <!-- options for instr-classes -->
14 <property name="classes.dir" location="${CLASSES_DIR}" />
15 <property name="classes.final.dir" location="${CLASSES_FINAL_DIR}" />
16
17 <property name="sdk.dir" location="${ANDROID_SDK_ROOT}"/>
18
19 <property name="emma.coverage.absolute.file" location="${EMMA_COVERAGE_FILE}" />
20 <property name="emma.sources.file" location="${EMMA_SOURCES_FILE}" />
21 <property name="java.src.dir" location="${JAVA_SRC}" />
22 <property name="additional.src.dir" value="${ADDITIONAL_SRC}" />
23 <property name="generated.src.dir" value="${GENERATED_SRC}" />
24 <filelist dir="${basedir}" id="emma.sources.filelist"
25 files="${JAVA_SRC} ${ADDITIONAL_SRC} ${GENERATED_SRC}"/>
26 <pathconvert pathsep=" " property="emma.sources" refid="emma.sources.filelist" />
27
28 <!-- jar file from where emma tasks are loaded -->
29 <path id="emma.antlibs">
30 <pathelement path="${sdk.dir}/tools/lib/emma_ant.jar" />
31 <pathelement path="${sdk.dir}/tools/lib/emma.jar" />
32 </path>
33
34 <taskdef resource="emma_ant.properties" classpathref="emma.antlibs" />
35
36 <!-- Instruments the output jar for coverage testing.
37 Also writes the accompanying source dirs into emma.sources.file -->
38 <target name="instr-jar">
39 <emma enabled="true">
40 <instr mode="fullcopy"
41 instrpath="${input.jar.file}"
42 outdir="${output.jar.dir}"
43 metadatafile="${emma.coverage.absolute.file}">
44 <!-- TODO(gkanwar): Filter things here -->
45 </instr>
46 </emma>
47 <!-- This is needed because instr fullcopy creates a 'lib' folder under the
48 destination, and we need to move the jar out of that -->
49 <copy todir="${output.jar.final.dir}">
50 <fileset dir="${output.jar.dir}/lib" />
51 </copy>
52 <echo file="${emma.sources.file}">${emma.sources}</echo>
53 </target>
54 <!-- Instruments the output classes for coverage testing.
55 Also writes the accompanying source dirs into emma.sources.file -->
56 <target name="instr-classes">
57 <emma enabled="true">
58 <instr mode="copy"
59 instrpath="${classes.dir}"
60 outdir="${classes.final.dir}"
61 metadatafile="${emma.coverage.absolute.file}">
62 <!-- TODO: Filter things here -->
63 </instr>
64 </emma>
65 <echo file="${emma.sources.file}">${emma.sources}</echo>
66 </target>
67 </project>
OLDNEW
« no previous file with comments | « no previous file | build/android/ant/apk-package.xml » ('j') | build/android/ant/apk-package.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698