summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authoryongsheng.zhu@intel.com <yongsheng.zhu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 02:32:30 +0000
committeryongsheng.zhu@intel.com <yongsheng.zhu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 02:32:30 +0000
commit65b05e976298fd31e6d56f50ea0409677ee27e9e (patch)
treee51ce3cde81f3e62b2ee665ac986e8da9b15bb3c /testing
parent89821307a1f7c5583b15deba714a0cdaf5ff6a27 (diff)
downloadchromium_src-65b05e976298fd31e6d56f50ea0409677ee27e9e.zip
chromium_src-65b05e976298fd31e6d56f50ea0409677ee27e9e.tar.gz
chromium_src-65b05e976298fd31e6d56f50ea0409677ee27e9e.tar.bz2
Place jars into the java/libs for native unittest apk
Complete the TODO for native unittests apk to place used jars into ${out.dir}/java/libs. Add the conditional check if there is no jar in that directory. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10701113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'testing')
-rwxr-xr-xtesting/android/generate_native_test.py2
-rw-r--r--testing/android/native_test_apk.xml26
2 files changed, 16 insertions, 12 deletions
diff --git a/testing/android/generate_native_test.py b/testing/android/generate_native_test.py
index 84780f0..e71fbbe 100755
--- a/testing/android/generate_native_test.py
+++ b/testing/android/generate_native_test.py
@@ -120,7 +120,7 @@ class NativeTestApkGenerator(object):
cmd_helper.RunCmd(
[strip, '--strip-unneeded', self._native_library, '-o', dest])
if self._jars:
- destdir = os.path.join(self._output_directory, 'libs')
+ destdir = os.path.join(self._output_directory, 'java/libs')
if not os.path.exists(destdir):
os.makedirs(destdir)
for jar in self._jars:
diff --git a/testing/android/native_test_apk.xml b/testing/android/native_test_apk.xml
index fff7671..03e565f 100644
--- a/testing/android/native_test_apk.xml
+++ b/testing/android/native_test_apk.xml
@@ -16,7 +16,7 @@ found in the LICENSE file.
<property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/>
<property name="toolchain.dir" location="${env.ANDROID_TOOLCHAIN}"/>
<property name="src" location="."/>
- <property name="source.dir" location="java"/>
+ <property name="source.dir" location="java/src"/>
<property name="target.abi" value="${APP_ABI}"/>
<property name="target" value="android-${env.ANDROID_SDK_VERSION}"/>
@@ -50,17 +50,21 @@ found in the LICENSE file.
<property name="resource.absolute.dir" value="res"/>
<property name="gen.absolute.dir" value="${out.dir}/gen"/>
- <!-- Nilesh: this is what we should transition to.
- TODO(jrg): make sure we transition; will involve gyp changes
- for placing jar outputs in new directory.
- When we transition we'll probably also want to change
- generate_native_test.py to copy the jars into java/libs, not
- just libs (see line 124 or so).
- -->
- <!--
- <property name="jar.libs.dir" value="${out.dir}/java/libs"/>
+ <condition property="external.jars.dir"
+ value="${out.dir}/java/libs"
+ else="">
+ <available file="${out.dir}/java/libs" type="dir"/>
+ </condition>
+ <path id="out.dex.jar.input.ref">
+ <fileset dir="${external.jars.dir}" includes="*.jar"/>
+ </path>
+ <condition property="java.compilerargs"
+ value="-classpath ${toString:out.dex.jar.input.ref}">
+ <not>
+ <equals arg1="${external.jars.dir}" arg2=""/>
+ </not>
+ </condition>
<property name="native.libs.absolute.dir" location="${out.dir}/libs" />
- -->
<target name="-post-compile">
<!-- copy gdbserver to main libs directory if building debug. -->