Fix relative class path arg handling in runtest, and some lint errors.
This commit is contained in:
@@ -23,7 +23,6 @@ Based on previous <androidroot>/development/tools/runtest shell script.
|
|||||||
import glob
|
import glob
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
from sets import Set
|
from sets import Set
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@@ -61,6 +60,10 @@ class TestRunner(object):
|
|||||||
# disable logging of timestamp
|
# disable logging of timestamp
|
||||||
self._root_path = android_build.GetTop()
|
self._root_path = android_build.GetTop()
|
||||||
logger.SetTimestampLogging(False)
|
logger.SetTimestampLogging(False)
|
||||||
|
self._adb = None
|
||||||
|
self._known_tests = None
|
||||||
|
self._options = None
|
||||||
|
self._test_args = None
|
||||||
|
|
||||||
def _ProcessOptions(self):
|
def _ProcessOptions(self):
|
||||||
"""Processes command-line options."""
|
"""Processes command-line options."""
|
||||||
@@ -264,8 +267,8 @@ class TestRunner(object):
|
|||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logger.Log("Exiting...")
|
logger.Log("Exiting...")
|
||||||
except errors.AbortError, e:
|
except errors.AbortError, error:
|
||||||
logger.Log(e.msg)
|
logger.Log(error.msg)
|
||||||
logger.SilentLog("Exiting due to AbortError...")
|
logger.SilentLog("Exiting due to AbortError...")
|
||||||
except errors.WaitForResponseTimedOutError:
|
except errors.WaitForResponseTimedOutError:
|
||||||
logger.Log("Timed out waiting for response")
|
logger.Log("Timed out waiting for response")
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import xml.parsers
|
|||||||
|
|
||||||
# local imports
|
# local imports
|
||||||
import errors
|
import errors
|
||||||
import logger
|
|
||||||
|
|
||||||
|
|
||||||
class AbstractTestSuite(object):
|
class AbstractTestSuite(object):
|
||||||
@@ -32,6 +31,9 @@ class AbstractTestSuite(object):
|
|||||||
This class will parse the XML attributes common to all TestSuite's.
|
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"
|
_NAME_ATTR = "name"
|
||||||
_BUILD_ATTR = "build_path"
|
_BUILD_ATTR = "build_path"
|
||||||
_CONTINUOUS_ATTR = "continuous"
|
_CONTINUOUS_ATTR = "continuous"
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class InstrumentationTestSuite(AbstractTestSuite):
|
|||||||
if options.test_class is not None:
|
if options.test_class is not None:
|
||||||
test_class = options.test_class.lstrip()
|
test_class = options.test_class.lstrip()
|
||||||
if test_class.startswith("."):
|
if test_class.startswith("."):
|
||||||
test_class = test_suite.GetPackageName() + test_class
|
test_class = self.GetPackageName() + test_class
|
||||||
if options.test_method is not None:
|
if options.test_method is not None:
|
||||||
test_class = "%s#%s" % (test_class, options.test_method)
|
test_class = "%s#%s" % (test_class, options.test_method)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python2.4
|
#!/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");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@@ -23,7 +23,6 @@ import os
|
|||||||
# local imports
|
# local imports
|
||||||
from abstract_test import AbstractTestSuite
|
from abstract_test import AbstractTestSuite
|
||||||
import android_build
|
import android_build
|
||||||
import errors
|
|
||||||
import logger
|
import logger
|
||||||
import run_command
|
import run_command
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user