Index: build/apk_test.gypi |
diff --git a/build/apk_test.gypi b/build/apk_test.gypi |
new file mode 100644 |
index 0000000000000000000000000000000000000000..567b8df599d18c79abe388bde722c1c5161abbc4 |
--- /dev/null |
+++ b/build/apk_test.gypi |
@@ -0,0 +1,54 @@ |
+# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+# This file is meant to be included into a target to provide a rule |
+# to build APK based test suites. |
+# |
+# To use this, create a gyp target with the following form: |
+# { |
+# 'target_name': 'test_suite_name_apk', |
+# 'type': 'none', |
+# 'variables': { |
+# 'test_suite_name': 'test_suite_name', |
+# 'jar_name': 'test_suite.jar', |
+# }, |
+# 'includes': ['path/to/this/gypi/file'], |
+# } |
+# |
+# Note: This assumes that there is a shlib named lib${test_suite_name}.so |
+# in ${PRODUCT_DIR}/lib.target/ |
+# |
+# TODO(nileshagrawal): Add support for including multiple jars. The underlying |
+# python native test generator does not support it yet. |
+# |
+ |
+{ |
+ 'actions': [ |
Ryan Sleevi
2012/05/23 01:00:45
I feel like you should be checking
'target_condi
nilesh
2012/05/23 22:45:20
Done.
|
+ { |
+ 'action_name': 'apk_<(test_suite_name)', |
+ 'message': 'Building <(test_suite_name) test apk.', |
+ 'inputs': [ |
+ '../testing/android/AndroidManifest.xml', |
+ '../testing/android/generate_native_test.py', |
Ryan Sleevi
2012/05/23 01:00:45
I'm pretty sure these two (line 32, 33) should be
nilesh
2012/05/23 22:45:20
Done.
|
+ '<(PRODUCT_DIR)/lib.target/lib<(test_suite_name).so', |
+ '<(PRODUCT_DIR)/lib.java/<(jar_name)', |
Ryan Sleevi
2012/05/23 01:00:45
I think I'd feel better if the caller was required
nilesh
2012/05/23 22:45:20
Done.
|
+ ], |
+ 'outputs': [ |
+ '<(PRODUCT_DIR)/<(test_suite_name)_apk/<(test_suite_name)-debug.apk', |
Ryan Sleevi
2012/05/23 01:00:45
Should this be "->(_configuration).apk" instead of
nilesh
2012/05/23 22:45:20
Currently, we always generate *-debug.apk (even fo
|
+ ], |
+ 'action': [ |
+ '../testing/android/generate_native_test.py', |
+ '--native_library', |
+ '<(PRODUCT_DIR)/lib.target/lib<(test_suite_name).so', |
Ryan Sleevi
2012/05/23 01:00:45
'/lib.target/<(SHARED_LIB_PREFIX)<(test_suite_name
nilesh
2012/05/23 22:45:20
Done.
|
+ '--jar', |
+ '<(PRODUCT_DIR)/lib.java/chromium_base.jar', |
Ryan Sleevi
2012/05/23 01:00:45
Is this right?
Did you mean to do '<(PRODUCT_DIR)
nilesh
2012/05/23 22:45:20
Yes. Thanks for catching.
|
+ '--output', |
+ '<(PRODUCT_DIR)/<(test_suite_name)_apk', |
+ '--ant-args', |
+ '-DPRODUCT_DIR=<(PRODUCT_DIR)', |
+ '--ant-compile' |
+ ], |
+ }, |
+ ], |
+} |