Reviewers: Jakob,
Message:
PTAL
Description:
Fix test runner for Android.
[email protected]
Please review this at https://chromiumcodereview.appspot.com/11193055/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M test/cctest/testcfg.py
M tools/run-tests.py
M tools/testrunner/local/commands.py
M tools/testrunner/local/execution.py
Index: test/cctest/testcfg.py
diff --git a/test/cctest/testcfg.py b/test/cctest/testcfg.py
index
b67002f53acede5f51c49703f5911923b3281394..69a5db2044fdd94363a846b8d2489c68d5b9da13
100644
--- a/test/cctest/testcfg.py
+++ b/test/cctest/testcfg.py
@@ -38,16 +38,20 @@ class CcTestSuite(testsuite.TestSuite):
def __init__(self, name, root):
super(CcTestSuite, self).__init__(name, root)
- self.serdes_dir = normpath(join(root, "..", "..", "out", ".serdes"))
- if exists(self.serdes_dir):
+ self.serdes_dir = os.path.normpath(
+ os.path.join(root, "..", "..", "out", ".serdes"))
+ if os.path.exists(self.serdes_dir):
shutil.rmtree(self.serdes_dir, True)
os.makedirs(self.serdes_dir)
def ListTests(self, context):
- shell = join(context.shell_dir, self.shell())
if utils.IsWindows():
shell += '.exe'
- output = commands.Execute([shell, '--list'])
+ shell = os.path.abspath(os.path.join(context.shell_dir, self.shell()))
+ output = commands.Execute([context.command_prefix,
+ shell,
+ '--list',
+ context.extra_flags])
if output.exit_code != 0:
print output.stdout
print output.stderr
@@ -66,7 +70,7 @@ class CcTestSuite(testsuite.TestSuite):
def GetFlagsForTestCase(self, testcase, context):
testname = testcase.path.split(os.path.sep)[-1]
- serialization_file = join(self.serdes_dir, "serdes_" + testname)
+ serialization_file = os.path.join(self.serdes_dir, "serdes_" +
testname)
serialization_file += ''.join(testcase.flags).replace('-', '_')
return (testcase.flags + [testcase.path] + context.mode_flags +
["--testing_serialization_file=" + serialization_file])
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index
5d90d1947e98efc831292d0fd251a2283d52d2a4..a49f6560a6a6062ec657620f9a91d14b4563fcdc
100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -60,6 +60,13 @@ MODE_FLAGS = {
"--enable-slow-asserts", "--debug-code", "--verify-heap"],
"release" : ["--nobreak-on-abort", "--nodead-code-elimination"]}
+SUPPORTED_ARCHS = ["android_arm",
+ "android_ia32",
+ "arm",
+ "ia32",
+ "mipsel",
+ "x64"]
+
def BuildOptions():
result = optparse.OptionParser()
@@ -150,7 +157,7 @@ def ProcessOptions(options):
options.arch = ARCH_GUESS
options.arch = options.arch.split(",")
for arch in options.arch:
- if not arch in ['ia32', 'x64', 'arm', 'mipsel']:
+ if not arch in SUPPORTED_ARCHS:
print "Unknown architecture %s" % arch
return False
Index: tools/testrunner/local/commands.py
diff --git a/tools/testrunner/local/commands.py
b/tools/testrunner/local/commands.py
index
716d7ba8fbe4cdd39e06549030726124905f1a05..01f170dc872d1bec543cf910a4d032553ef89df5
100644
--- a/tools/testrunner/local/commands.py
+++ b/tools/testrunner/local/commands.py
@@ -131,6 +131,7 @@ def CheckedUnlink(name):
def Execute(args, verbose=False, timeout=None):
+ args = [ c for c in args if c != "" ]
(fd_out, outname) = tempfile.mkstemp()
(fd_err, errname) = tempfile.mkstemp()
try:
Index: tools/testrunner/local/execution.py
diff --git a/tools/testrunner/local/execution.py
b/tools/testrunner/local/execution.py
index
0adf9c90718744d395b538dcb647f513e9891abb..6004367913099c864a701ce094e7e1daf2ff7609
100644
--- a/tools/testrunner/local/execution.py
+++ b/tools/testrunner/local/execution.py
@@ -168,11 +168,10 @@ class Runner(object):
if utils.IsWindows():
shell += ".exe"
cmd = ([self.context.command_prefix] +
- [os.path.join(self.context.shell_dir, shell)] +
+ [os.path.abspath(os.path.join(self.context.shell_dir, shell))] +
d8testflag +
test.suite.GetFlagsForTestCase(test, self.context) +
[self.context.extra_flags])
- cmd = [ c for c in cmd if c != "" ]
return cmd
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev