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 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")
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user