summaryrefslogtreecommitdiffstats
path: root/testrunner
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-29 08:46:42 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-29 08:46:42 -0700
commit14b3c0c9a440016b996c485b820f1bd57bd63695 (patch)
tree61418e4c0c9d5ba466102c65605ec282c5178a81 /testrunner
parentafc27acae7da84453047088b7e19b07eef0dc734 (diff)
parent3ae5f8a399ef9b4e930b988040f86f403e27c7f0 (diff)
downloadandroid_development-14b3c0c9a440016b996c485b820f1bd57bd63695.tar.gz
android_development-14b3c0c9a440016b996c485b820f1bd57bd63695.tar.bz2
android_development-14b3c0c9a440016b996c485b820f1bd57bd63695.zip
Merge change 5626 into donut
* changes: Fix relative class path arg handling in runtest, and some lint errors.
Diffstat (limited to 'testrunner')
-rwxr-xr-xtestrunner/runtest.py9
-rw-r--r--testrunner/test_defs/abstract_test.py4
-rw-r--r--testrunner/test_defs/instrumentation_test.py2
-rw-r--r--testrunner/test_defs/native_test.py3
4 files changed, 11 insertions, 7 deletions
diff --git a/testrunner/runtest.py b/testrunner/runtest.py
index 34f979fc0..593d11d22 100755
--- a/testrunner/runtest.py
+++ b/testrunner/runtest.py
@@ -23,7 +23,6 @@ Based on previous <androidroot>/development/tools/runtest shell script.
import glob
import optparse
import os
-import re
from sets import Set
import sys
@@ -61,6 +60,10 @@ class TestRunner(object):
# disable logging of timestamp
self._root_path = android_build.GetTop()
logger.SetTimestampLogging(False)
+ self._adb = None
+ self._known_tests = None
+ self._options = None
+ self._test_args = None
def _ProcessOptions(self):
"""Processes command-line options."""
@@ -264,8 +267,8 @@ class TestRunner(object):
except KeyboardInterrupt:
logger.Log("Exiting...")
- except errors.AbortError, e:
- logger.Log(e.msg)
+ except errors.AbortError, error:
+ logger.Log(error.msg)
logger.SilentLog("Exiting due to AbortError...")
except errors.WaitForResponseTimedOutError:
logger.Log("Timed out waiting for response")
diff --git a/testrunner/test_defs/abstract_test.py b/testrunner/test_defs/abstract_test.py
index 7c4d63dde..e0c8db206 100644
--- a/testrunner/test_defs/abstract_test.py
+++ b/testrunner/test_defs/abstract_test.py
@@ -23,7 +23,6 @@ import xml.parsers
# local imports
import errors
-import logger
class AbstractTestSuite(object):
@@ -32,6 +31,9 @@ class AbstractTestSuite(object):
This class will parse the XML attributes common to all TestSuite's.
"""
+ # name of xml tag a test suite handles. subclasses must define this.
+ TAG_NAME = "unspecified"
+
_NAME_ATTR = "name"
_BUILD_ATTR = "build_path"
_CONTINUOUS_ATTR = "continuous"
diff --git a/testrunner/test_defs/instrumentation_test.py b/testrunner/test_defs/instrumentation_test.py
index fcc9b42c8..24b4b88fd 100644
--- a/testrunner/test_defs/instrumentation_test.py
+++ b/testrunner/test_defs/instrumentation_test.py
@@ -88,7 +88,7 @@ class InstrumentationTestSuite(AbstractTestSuite):
if options.test_class is not None:
test_class = options.test_class.lstrip()
if test_class.startswith("."):
- test_class = test_suite.GetPackageName() + test_class
+ test_class = self.GetPackageName() + test_class
if options.test_method is not None:
test_class = "%s#%s" % (test_class, options.test_method)
diff --git a/testrunner/test_defs/native_test.py b/testrunner/test_defs/native_test.py
index 1e79872ff..e27f3e6d0 100644
--- a/testrunner/test_defs/native_test.py
+++ b/testrunner/test_defs/native_test.py
@@ -1,7 +1,7 @@
#!/usr/bin/python2.4
#
#
-# Copyright 2008, The Android Open Source Project
+# Copyright 2009, The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@ import os
# local imports
from abstract_test import AbstractTestSuite
import android_build
-import errors
import logger
import run_command