Skip to content

Commit

Permalink
Do check variable PRODUCT_DIR before any ant targets
Browse files Browse the repository at this point in the history
Use fail and condition to do check firstly before any targets

BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10696189

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146540 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
yongsheng.zhu@intel.com committed Jul 13, 2012
1 parent 2ec5bf3 commit 78c7bfa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
19 changes: 7 additions & 12 deletions content/shell/android/java/content_shell_apk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,13 @@

<!-- We expect PRODUCT_DIR to be set like the gyp var
(e.g. $ROOT/out/Debug) -->
<!-- TODO(satish): ideally we need this to run before -build-setup, where
directories are made based on this variable. -->
<target name="-pre-build">
<if>
<condition>
<isset property="PRODUCT_DIR" />
</condition>
<else>
<fail message="PRODUCT_DIR env var not set?" />
</else>
</if>
</target>
<fail message="PRODUCT_DIR env var not set?">
<condition>
<not>
<isset property="PRODUCT_DIR"/>
</not>
</condition>
</fail>

<target name="-post-compile">
<!-- copy gdbserver to main libs directory if building debug.
Expand Down
19 changes: 7 additions & 12 deletions testing/android/native_test_apk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,13 @@ found in the LICENSE file.

<!-- We expect PRODUCT_DIR to be set like the gyp var
(e.g. $ROOT/out/Debug) -->
<!-- TODO(jrg): ideally we need this to run before -build-setup, where
directories are made based on this variable. -->
<target name="-pre-build">
<if>
<condition>
<isset property="PRODUCT_DIR" />
</condition>
<else>
<fail message="PRODUCT_DIR env var not set?" />
</else>
</if>
</target>
<fail message="PRODUCT_DIR env var not set?">
<condition>
<not>
<isset property="PRODUCT_DIR"/>
</not>
</condition>
</fail>

<property name="out.dir" location="${PRODUCT_DIR}/replaceme_apk"/>

Expand Down

0 comments on commit 78c7bfa

Please sign in to comment.