Revert of [test] Fix cctest path separators on Windows (patchset #2 id:20001 of https...
authorjkummerow <jkummerow@chromium.org>
Thu, 17 Sep 2015 12:00:13 +0000 (05:00 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 17 Sep 2015 12:00:23 +0000 (12:00 +0000)
Reason for revert:
mozilla tests are failing on Windows

Original issue's description:
> [test] Fix cctest path separators on Windows
>
> Now run-tests.py understands "suite/foo/bar" with forward slashes for
> command-line test selection on all test suites on all platforms.
>
> Previously, file-based suites like mjsunit also accepted "mjsunit/foo\bar";
> that behavior is sacrificed here in favor of unification. For the cctest
> suite, OTOH, it wasn't possible on Windows to select specific tests at all.
>
> Committed: https://crrev.com/b36cfdb39ae648b49a1396c4f669df9b1f57996c
> Cr-Commit-Position: refs/heads/master@{#30794}

TBR=machenbach@google.com,machenbach@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30795}

test/intl/testcfg.py
test/message/testcfg.py
test/mjsunit/testcfg.py
test/mozilla/testcfg.py
test/test262-es6/testcfg.py
test/test262/testcfg.py
test/webkit/testcfg.py
tools/testrunner/local/testsuite.py

index 51fa1e1a88d2fe2b350be8b7b16f1db62b9bed88..9fc087e5f523fc46eda2b3c94f9951c638447d10 100644 (file)
@@ -46,9 +46,7 @@ class IntlTestSuite(testsuite.TestSuite):
       for filename in files:
         if (filename.endswith(".js") and filename != "assert.js" and
             filename != "utils.js"):
-          fullpath = os.path.join(dirname, filename)
-          relpath = fullpath[len(self.root) + 1 : -3]
-          testname = relpath.replace(os.path.sep, "/")
+          testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3])
           test = testcase.TestCase(self, testname)
           tests.append(test)
     return tests
index bc73510c097bfc1d66c28c1cff653c86494ca781..cfe22f15d70adafc49daefcb68eaa962852132e7 100644 (file)
@@ -52,9 +52,7 @@ class MessageTestSuite(testsuite.TestSuite):
       files.sort()
       for filename in files:
         if filename.endswith(".js"):
-          fullpath = os.path.join(dirname, filename)
-          relpath = fullpath[len(self.root) + 1 : -3]
-          testname = relpath.replace(os.path.sep, "/")
+          testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3])
           test = testcase.TestCase(self, testname)
           tests.append(test)
     return tests
index 7af7acf0a927e2ac034aa459cd4aaa796618ea14..4fbdcfca26626d7867e1d920a9832e382f5fe642 100644 (file)
@@ -52,9 +52,7 @@ class MjsunitTestSuite(testsuite.TestSuite):
       files.sort()
       for filename in files:
         if filename.endswith(".js") and filename != "mjsunit.js":
-          fullpath = os.path.join(dirname, filename)
-          relpath = fullpath[len(self.root) + 1 : -3]
-          testname = relpath.replace(os.path.sep, "/")
+          testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3])
           test = testcase.TestCase(self, testname)
           tests.append(test)
     return tests
index 70665cb807d0723046ba2ad7ced9be6406b45b82..70a7ac663cde287e87f73808dd1fed2d96f41139 100644 (file)
@@ -81,9 +81,8 @@ class MozillaTestSuite(testsuite.TestSuite):
         files.sort()
         for filename in files:
           if filename.endswith(".js") and not filename in FRAMEWORK:
-            fullpath = os.path.join(dirname, filename)
-            relpath = fullpath[len(self.testroot) + 1 : -3]
-            testname = relpath.replace(os.path.sep, "/")
+            testname = os.path.join(dirname[len(self.testroot) + 1:],
+                                    filename[:-3])
             case = testcase.TestCase(self, testname)
             tests.append(case)
     return tests
index 49a9b254a09e6475c47573b2562711e890e52a7b..f9e9a3946b7ea1a7a0b427ec5e134d30b115d752 100644 (file)
@@ -119,9 +119,8 @@ class Test262TestSuite(testsuite.TestSuite):
       files.sort()
       for filename in files:
         if filename.endswith(".js"):
-          fullpath = os.path.join(dirname, filename)
-          relpath = fullpath[len(self.testroot) + 1 : -3]
-          testname = relpath.replace(os.path.sep, "/")
+          testname = os.path.join(dirname[len(self.testroot) + 1:],
+                                  filename[:-3])
           case = testcase.TestCase(self, testname)
           tests.append(case)
     return tests
index 835c1ffd0b0ff80de800556ccfa1973c6c9408d9..a0c2cd6568232524ad00742ec81eaa91bf1c3ef1 100644 (file)
@@ -66,9 +66,8 @@ class Test262TestSuite(testsuite.TestSuite):
       files.sort()
       for filename in files:
         if filename.endswith(".js"):
-          fullpath = os.path.join(dirname, filename)
-          relpath = fullpath[len(self.testroot) + 1 : -3]
-          testname = relpath.replace(os.path.sep, "/")
+          testname = os.path.join(dirname[len(self.testroot) + 1:],
+                                  filename[:-3])
           case = testcase.TestCase(self, testname)
           tests.append(case)
     return tests
index ed811d2922c54bd24b239fa28b1d5e57e7487c19..aa81964f5ef6995c5e1567de23bae411e544afdf 100644 (file)
@@ -55,9 +55,7 @@ class WebkitTestSuite(testsuite.TestSuite):
       files.sort()
       for filename in files:
         if filename.endswith(".js"):
-          fullpath = os.path.join(dirname, filename)
-          relpath = fullpath[len(self.root) + 1 : -3]
-          testname = relpath.replace(os.path.sep, "/")
+          testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3])
           test = testcase.TestCase(self, testname)
           tests.append(test)
     return tests
index e0fff0d11a3d176b3faaac43819e827c552fea0b..c8e43521e71e8e3be99842d98bb8d250e0eb15c8 100644 (file)
@@ -226,7 +226,7 @@ class TestSuite(object):
         continue
       if len(argpath) == 1 or (len(argpath) == 2 and argpath[1] == '*'):
         return  # Don't filter, run all tests in this suite.
-      path = '/'.join(argpath[1:])
+      path = os.path.sep.join(argpath[1:])
       if path[-1] == '*':
         path = path[:-1]
         globs.append(path)