am fa0062da: Add legacy support for application.package property

Merge commit 'fa0062da90e158b18a4250a003304bf40832423a' into eclair-plus-aosp

* commit 'fa0062da90e158b18a4250a003304bf40832423a':
  Add legacy support for application.package property
This commit is contained in:
Piotr Gurgul
2009-09-22 17:53:54 -07:00
committed by Android Git Automerger
2 changed files with 8 additions and 8 deletions

View File

@@ -31,7 +31,7 @@
<property name="android.tools.dir" location="${sdk.dir}/tools" />
<!-- Name of the application package extracted from manifest file -->
<xpath input="AndroidManifest.xml" expression="/manifest/@package"
output="application.package" />
output="manifest.package" />
<!-- Input directories -->
<property name="source.dir" value="src" />
@@ -336,22 +336,22 @@
<target name="-uninstall-check">
<condition property="uninstall.run">
<isset property="application.package" />
<isset property="manifest.package" />
</condition>
</target>
<target name="-uninstall-error" depends="-uninstall-check" unless="uninstall.run">
<echo>Unable to run 'ant uninstall', application.package is not defined in build.properties
<echo>Unable to run 'ant uninstall', manifest.package property is not defined.
</echo>
</target>
<!-- Uninstalls the package from the default emulator/device -->
<target name="uninstall" depends="-uninstall-error" if="uninstall.run"
description="Uninstalls the application from a running emulator or device.">
<echo>Uninstalling ${application.package} from the default emulator or device...</echo>
<echo>Uninstalling ${manifest.package} from the default emulator or device...</echo>
<exec executable="${adb}" failonerror="true">
<arg value="uninstall" />
<arg value="${application.package}" />
<arg value="${manifest.package}" />
</exec>
</target>

View File

@@ -10,12 +10,12 @@
<property name="test.runner" value="android.test.InstrumentationTestRunner" />
<!-- Application package of the tested project extracted from its manifest file -->
<xpath input="${tested.project.absolute.dir}/AndroidManifest.xml"
expression="/manifest/@package" output="tested.application.package" />
expression="/manifest/@package" output="tested.manifest.package" />
<!-- TODO: make it more configurable in the next CL's - now it is default for auto-generated
project -->
<property name="emma.dump.file"
value="/data/data/${tested.application.package}/files/coverage.ec" />
value="/data/data/${tested.manifest.package}/files/coverage.ec" />
<macrodef name="run-tests-helper">
<attribute name="emma.enabled" default="false" />
@@ -31,7 +31,7 @@
<arg value="coverage" />
<arg value="@{emma.enabled}" />
<extra-instrument-args />
<arg value="${application.package}/${test.runner}" />
<arg value="${manifest.package}/${test.runner}" />
</exec>
</sequential>
</macrodef>