summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild/android/adb_logcat_monitor.py2
-rwxr-xr-xbuild/android/adb_logcat_printer.py2
-rwxr-xr-xbuild/android/device_status_check.py6
-rwxr-xr-xbuild/android/emulator.py5
-rwxr-xr-xbuild/android/enable_asserts.py32
-rw-r--r--build/android/pylib/__init__.py4
-rwxr-xr-xbuild/android/pylib/android_commands.py (renamed from build/android/android_commands.py)28
-rw-r--r--build/android/pylib/base_test_runner.py (renamed from build/android/base_test_runner.py)0
-rw-r--r--build/android/pylib/base_test_sharder.py (renamed from build/android/base_test_sharder.py)0
-rw-r--r--build/android/pylib/chrome_test_server_spawner.py (renamed from build/android/chrome_test_server_spawner.py)8
-rwxr-xr-xbuild/android/pylib/cmd_helper.py (renamed from build/android/cmd_helper.py)2
-rw-r--r--build/android/pylib/debug_info.py (renamed from build/android/debug_info.py)2
-rw-r--r--build/android/pylib/flag_changer.py (renamed from build/android/flag_changer.py)0
-rw-r--r--build/android/pylib/perf_tests_helper.py (renamed from build/android/perf_tests_helper.py)2
-rw-r--r--build/android/pylib/run_tests_helper.py (renamed from build/android/run_tests_helper.py)2
-rw-r--r--build/android/pylib/single_test_runner.py (renamed from build/android/single_test_runner.py)0
-rw-r--r--build/android/pylib/test_package.py (renamed from build/android/test_package.py)0
-rw-r--r--build/android/pylib/test_package_apk.py (renamed from build/android/test_package_apk.py)0
-rw-r--r--build/android/pylib/test_package_executable.py (renamed from build/android/test_package_executable.py)0
-rw-r--r--build/android/pylib/test_result.py (renamed from build/android/test_result.py)0
-rw-r--r--build/android/pylib/valgrind_tools.py (renamed from build/android/valgrind_tools.py)2
-rwxr-xr-xbuild/android/run_tests.py17
-rwxr-xr-xtesting/android/generate_native_test.py5
23 files changed, 66 insertions, 53 deletions
diff --git a/build/android/adb_logcat_monitor.py b/build/android/adb_logcat_monitor.py
index 7c5f369..aeaef0b 100755
--- a/build/android/adb_logcat_monitor.py
+++ b/build/android/adb_logcat_monitor.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
#
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
diff --git a/build/android/adb_logcat_printer.py b/build/android/adb_logcat_printer.py
index 6ea4797..5194668 100755
--- a/build/android/adb_logcat_printer.py
+++ b/build/android/adb_logcat_printer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
#
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
diff --git a/build/android/device_status_check.py b/build/android/device_status_check.py
index 5b45628..267c1d9 100755
--- a/build/android/device_status_check.py
+++ b/build/android/device_status_check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
#
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -10,8 +10,8 @@ import optparse
import os
import sys
-from android_commands import GetAttachedDevices
-from cmd_helper import GetCmdOutput
+from pylib.android_commands import GetAttachedDevices
+from pylib.cmd_helper import GetCmdOutput
def DeviceInfo(serial):
diff --git a/build/android/emulator.py b/build/android/emulator.py
index 224d31b..e08b760 100755
--- a/build/android/emulator.py
+++ b/build/android/emulator.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+#
# 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.
@@ -18,13 +19,13 @@ import subprocess
import sys
import time
-import android_commands
+from pylib import android_commands
+from pylib import cmd_helper
# adb_interface.py is under ../../third_party/android_testrunner/
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..',
'..', 'third_party', 'android_testrunner'))
import adb_interface
-import cmd_helper
import errors
import run_command
diff --git a/build/android/enable_asserts.py b/build/android/enable_asserts.py
new file mode 100755
index 0000000..37afd3f
--- /dev/null
+++ b/build/android/enable_asserts.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+#
+# 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.
+
+"""Enables dalvik vm asserts in the android device."""
+
+from pylib import android_commands
+import optparse
+import os
+import sys
+
+
+def main(argv):
+ option_parser = optparse.OptionParser()
+ option_parser.add_option('--enable_asserts', dest='set_asserts',
+ action='store_true', default=None,
+ help='Sets the dalvik.vm.enableassertions property to "all"')
+ option_parser.add_option('--disable_asserts', dest='set_asserts',
+ action='store_false', default=None,
+ help='Removes the dalvik.vm.enableassertions property')
+ options, args = option_parser.parse_args(argv)
+
+ commands = android_commands.AndroidCommands()
+ if options.set_asserts != None:
+ if commands.SetJavaAssertsEnabled(options.set_asserts):
+ commands.Reboot(full_reboot=False)
+
+
+if __name__ == '__main__':
+ main(sys.argv)
diff --git a/build/android/pylib/__init__.py b/build/android/pylib/__init__.py
new file mode 100644
index 0000000..727e987
--- /dev/null
+++ b/build/android/pylib/__init__.py
@@ -0,0 +1,4 @@
+# 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.
+
diff --git a/build/android/android_commands.py b/build/android/pylib/android_commands.py
index 209ffed..9fefffa 100755
--- a/build/android/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# 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.
@@ -23,9 +22,9 @@ import sys
import tempfile
import time
-# adb_interface.py is under ../../third_party/android_testrunner/
+# adb_interface.py is under ../../../third_party/android_testrunner/
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..',
- '..', 'third_party', 'android_testrunner'))
+ '..', '..', 'third_party', 'android_testrunner'))
import adb_interface
import cmd_helper
import errors # is under ../../third_party/android_testrunner/errors.py
@@ -755,26 +754,3 @@ class AndroidCommands(object):
# If the screen wasn't locked the previous command will bring up the menu,
# which this will dismiss. Otherwise this shouldn't change anything.
self.SendKeyEvent(KEYCODE_BACK)
-
-
-def main(argv):
- option_parser = optparse.OptionParser()
- option_parser.add_option('-w', '--wait_for_pm', action='store_true',
- default=False, dest='wait_for_pm',
- help='Waits for Device Package Manager to become available')
- option_parser.add_option('--enable_asserts', dest='set_asserts',
- action='store_true', default=None,
- help='Sets the dalvik.vm.enableassertions property to "all"')
- option_parser.add_option('--disable_asserts', dest='set_asserts',
- action='store_false', default=None,
- help='Removes the dalvik.vm.enableassertions property')
- options, args = option_parser.parse_args(argv)
-
- commands = AndroidCommands(wait_for_pm=options.wait_for_pm)
- if options.set_asserts != None:
- if commands.SetJavaAssertsEnabled(options.set_asserts):
- commands.Reboot(full_reboot=False)
-
-
-if __name__ == '__main__':
- main(sys.argv)
diff --git a/build/android/base_test_runner.py b/build/android/pylib/base_test_runner.py
index 33e0741..33e0741 100644
--- a/build/android/base_test_runner.py
+++ b/build/android/pylib/base_test_runner.py
diff --git a/build/android/base_test_sharder.py b/build/android/pylib/base_test_sharder.py
index 3be45ea..3be45ea 100644
--- a/build/android/base_test_sharder.py
+++ b/build/android/pylib/base_test_sharder.py
diff --git a/build/android/chrome_test_server_spawner.py b/build/android/pylib/chrome_test_server_spawner.py
index 85864dada..75a61c1 100644
--- a/build/android/chrome_test_server_spawner.py
+++ b/build/android/pylib/chrome_test_server_spawner.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# 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.
@@ -17,12 +17,12 @@ import time
import urlparse
# Path that are needed to import testserver
-cr_src = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', '..')
+cr_src = os.path.join(os.path.abspath(os.path.dirname(__file__)),
+ '..', '..', '..')
sys.path.append(os.path.join(cr_src, 'third_party'))
sys.path.append(os.path.join(cr_src, 'third_party', 'tlslite'))
sys.path.append(os.path.join(cr_src, 'third_party', 'pyftpdlib', 'src'))
-sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..',
- '..', 'net', 'tools', 'testserver'))
+sys.path.append(os.path.join(cr_src, 'net', 'tools', 'testserver'))
import testserver
_test_servers = []
diff --git a/build/android/cmd_helper.py b/build/android/pylib/cmd_helper.py
index 9d688f7..8b50130 100755
--- a/build/android/cmd_helper.py
+++ b/build/android/pylib/cmd_helper.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-#
# 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.
diff --git a/build/android/debug_info.py b/build/android/pylib/debug_info.py
index 9a836e3..91e2d1b 100644
--- a/build/android/debug_info.py
+++ b/build/android/pylib/debug_info.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# 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.
diff --git a/build/android/flag_changer.py b/build/android/pylib/flag_changer.py
index 79fa073..79fa073 100644
--- a/build/android/flag_changer.py
+++ b/build/android/pylib/flag_changer.py
diff --git a/build/android/perf_tests_helper.py b/build/android/pylib/perf_tests_helper.py
index 740c455..0952beb 100644
--- a/build/android/perf_tests_helper.py
+++ b/build/android/pylib/perf_tests_helper.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# 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.
diff --git a/build/android/run_tests_helper.py b/build/android/pylib/run_tests_helper.py
index 45e3afd..6a3937a 100644
--- a/build/android/run_tests_helper.py
+++ b/build/android/pylib/run_tests_helper.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# 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.
diff --git a/build/android/single_test_runner.py b/build/android/pylib/single_test_runner.py
index 48e92ea3..48e92ea3 100644
--- a/build/android/single_test_runner.py
+++ b/build/android/pylib/single_test_runner.py
diff --git a/build/android/test_package.py b/build/android/pylib/test_package.py
index 92c3da1..92c3da1 100644
--- a/build/android/test_package.py
+++ b/build/android/pylib/test_package.py
diff --git a/build/android/test_package_apk.py b/build/android/pylib/test_package_apk.py
index e5d2151..e5d2151 100644
--- a/build/android/test_package_apk.py
+++ b/build/android/pylib/test_package_apk.py
diff --git a/build/android/test_package_executable.py b/build/android/pylib/test_package_executable.py
index 270b90e..270b90e 100644
--- a/build/android/test_package_executable.py
+++ b/build/android/pylib/test_package_executable.py
diff --git a/build/android/test_result.py b/build/android/pylib/test_result.py
index 7d9b216..7d9b216 100644
--- a/build/android/test_result.py
+++ b/build/android/pylib/test_result.py
diff --git a/build/android/valgrind_tools.py b/build/android/pylib/valgrind_tools.py
index bc917e6..a2ada9d 100644
--- a/build/android/valgrind_tools.py
+++ b/build/android/pylib/valgrind_tools.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# 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.
diff --git a/build/android/run_tests.py b/build/android/run_tests.py
index ac71644..dfa66ac 100755
--- a/build/android/run_tests.py
+++ b/build/android/run_tests.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+#
# 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.
@@ -56,15 +57,15 @@ import subprocess
import sys
import time
-import android_commands
-from base_test_sharder import BaseTestSharder
-import cmd_helper
-import debug_info
+from pylib import android_commands
+from pylib.base_test_sharder import BaseTestSharder
+from pylib import cmd_helper
+from pylib import debug_info
import emulator
-import run_tests_helper
-from single_test_runner import SingleTestRunner
-from test_package_executable import TestPackageExecutable
-from test_result import BaseTestResult, TestResults
+from pylib import run_tests_helper
+from pylib.single_test_runner import SingleTestRunner
+from pylib.test_package_executable import TestPackageExecutable
+from pylib.test_result import BaseTestResult, TestResults
_TEST_SUITES = ['base_unittests',
'content_unittests',
diff --git a/testing/android/generate_native_test.py b/testing/android/generate_native_test.py
index 79f21d0..84780f0 100755
--- a/testing/android/generate_native_test.py
+++ b/testing/android/generate_native_test.py
@@ -1,4 +1,5 @@
-#!/usr/bin/python
+#!/usr/bin/env python
+#
# 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.
@@ -24,7 +25,7 @@ import sys
# cmd_helper.py is under ../../build/android/
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..',
'..', 'build', 'android')))
-import cmd_helper # pylint: disable=F0401
+from pylib import cmd_helper # pylint: disable=F0401
class NativeTestApkGenerator(object):