tools/run-tests.py: Fixes for Windows

Review URL: https://codereview.chromium.org/11926015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 284a28e7
......@@ -75,7 +75,7 @@ class MjsunitTestSuite(testsuite.TestSuite):
for f in files_list ]
testfilename = os.path.join(self.root, testcase.path + self.suffix())
if SELF_SCRIPT_PATTERN.search(source):
env = ["-e", "TEST_FILE_NAME=\"%s\"" % testfilename]
env = ["-e", "TEST_FILE_NAME=\"%s\"" % testfilename.replace("\\", "\\\\")]
files = env + files
files.append(os.path.join(self.root, "mjsunit.js"))
files.append(testfilename)
......
......@@ -30,6 +30,7 @@ import imp
import os
from . import statusfile
from . import utils
class TestSuite(object):
......@@ -88,6 +89,8 @@ class TestSuite(object):
used_rules = set()
for t in self.tests:
testname = self.CommonTestName(t)
if utils.IsWindows():
testname = testname.replace("\\", "/")
if testname in self.rules:
used_rules.add(testname)
outcomes = self.rules[testname]
......
......@@ -30,7 +30,6 @@ import cStringIO as StringIO
try:
import ujson as json
except ImportError:
print("You should install UltraJSON, it is much faster!")
import json
import os
import struct
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment