am 09f517d4: Merge change 26976 into eclair
Merge commit '09f517d43e73a8a6bc7c7cee96ba1892b58daa0e' into eclair-plus-aosp * commit '09f517d43e73a8a6bc7c7cee96ba1892b58daa0e': Add tested.project.dir to classpath for install and debug
This commit is contained in:
@@ -230,10 +230,12 @@
|
|||||||
<!-- Compiles this project's .java files into .class files. -->
|
<!-- Compiles this project's .java files into .class files. -->
|
||||||
<target name="compile" depends="-resource-src, -aidl"
|
<target name="compile" depends="-resource-src, -aidl"
|
||||||
description="Compiles project's .java files into .class files">
|
description="Compiles project's .java files into .class files">
|
||||||
<!-- Allows to inject additional classpath from another (build|property) file.
|
<!-- If android rules are used for a test project, its classpath should include
|
||||||
As ant properties are immutable, the injected value will have priority
|
tested project's location -->
|
||||||
over the one defined below -->
|
<condition property="extensible.classpath"
|
||||||
<property name="extensible.classpath" value="." />
|
value="${tested.project.absolute.dir}/bin/classes" else=".">
|
||||||
|
<isset property="tested.project.absolute.dir" />
|
||||||
|
</condition>
|
||||||
<javac encoding="ascii" target="1.5" debug="true" extdirs=""
|
<javac encoding="ascii" target="1.5" debug="true" extdirs=""
|
||||||
destdir="${out.classes.absolute.dir}"
|
destdir="${out.classes.absolute.dir}"
|
||||||
bootclasspathref="android.target.classpath"
|
bootclasspathref="android.target.classpath"
|
||||||
@@ -278,8 +280,14 @@
|
|||||||
<package-helper sign.package="false" />
|
<package-helper sign.package="false" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="-compile-tested-if-test" if="tested.project.dir" unless="do.not.compile.again">
|
||||||
|
<subant target="compile">
|
||||||
|
<fileset dir="${tested.project.absolute.dir}" includes="build.xml" />
|
||||||
|
</subant>
|
||||||
|
</target>
|
||||||
|
|
||||||
<!-- Builds debug output package, provided all the necessary files are already dexed -->
|
<!-- Builds debug output package, provided all the necessary files are already dexed -->
|
||||||
<target name="debug" depends="-package-debug-sign"
|
<target name="debug" depends="-compile-tested-if-test, -package-debug-sign"
|
||||||
description="Builds the application and signs it with a debug key.">
|
description="Builds the application and signs it with a debug key.">
|
||||||
<zipalign-helper in.package="${out.debug.unaligned.package}"
|
<zipalign-helper in.package="${out.debug.unaligned.package}"
|
||||||
out.package="${out.debug.package}" />
|
out.package="${out.debug.package}" />
|
||||||
|
|||||||
@@ -43,27 +43,22 @@
|
|||||||
location="${instrumentation.absolute.dir}/classes" />
|
location="${instrumentation.absolute.dir}/classes" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Invoking this target sets the value of extensible.classpath, which is being added to javac
|
|
||||||
classpath in target 'compile' (android_rules.xml) -->
|
|
||||||
<target name="-set-run-tests-classpath">
|
|
||||||
<property name="extensible.classpath"
|
|
||||||
location="${tested.project.absolute.dir}/bin/classes" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Ensures that tested project is installed on the device before we run the tests.
|
<!-- Ensures that tested project is installed on the device before we run the tests.
|
||||||
Used for ordinary tests, without coverage measurement -->
|
Used for ordinary tests, without coverage measurement -->
|
||||||
<target name="-install-tested-project">
|
<target name="-install-tested-project">
|
||||||
|
<property name="do.not.compile.again" value="true" />
|
||||||
<subant target="install">
|
<subant target="install">
|
||||||
<fileset dir="${tested.project.absolute.dir}" includes="build.xml" />
|
<fileset dir="${tested.project.absolute.dir}" includes="build.xml" />
|
||||||
</subant>
|
</subant>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="run-tests" depends="-set-run-tests-classpath, -install-tested-project, install"
|
<target name="run-tests" depends="-install-tested-project, install"
|
||||||
description="Runs tests from the package defined in test.package property">
|
description="Runs tests from the package defined in test.package property">
|
||||||
<run-tests-helper />
|
<run-tests-helper />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="-install-instrumented">
|
<target name="-install-instrumented">
|
||||||
|
<property name="do.not.compile.again" value="true" />
|
||||||
<subant target="-install-with-emma">
|
<subant target="-install-with-emma">
|
||||||
<property name="out.absolute.dir" value="${instrumentation.absolute.dir}" />
|
<property name="out.absolute.dir" value="${instrumentation.absolute.dir}" />
|
||||||
<fileset dir="${tested.project.absolute.dir}" includes="build.xml" />
|
<fileset dir="${tested.project.absolute.dir}" includes="build.xml" />
|
||||||
|
|||||||
Reference in New Issue
Block a user