Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: test/mjsunit/testcfg.py

Issue 11035053: Rollback trunk to bleeding_edge revision 12525 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/regress/regress-undefined-store-keyed-fast-element.js ('k') | test/mozilla/testcfg.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/testcfg.py
diff --git a/test/mjsunit/testcfg.py b/test/mjsunit/testcfg.py
index 21139562e7bf539c64464f8180553a6e55279243..5a2f31481edeb43d4130351bae600bb143b69c60 100644
--- a/test/mjsunit/testcfg.py
+++ b/test/mjsunit/testcfg.py
@@ -25,88 +25,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import test
import os
+from os.path import join, dirname, exists
import re
-
-from testrunner.local import testsuite
-from testrunner.objects import testcase
+import tempfile
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
FILES_PATTERN = re.compile(r"//\s+Files:(.*)")
SELF_SCRIPT_PATTERN = re.compile(r"//\s+Env: TEST_FILE_NAME")
-class MjsunitTestSuite(testsuite.TestSuite):
-
- def __init__(self, name, root):
- super(MjsunitTestSuite, self).__init__(name, root)
-
- def ListTests(self, context):
- tests = []
- for dirname, dirs, files in os.walk(self.root):
- for dotted in [x for x in dirs if x.startswith('.')]:
- dirs.remove(dotted)
- dirs.sort()
- files.sort()
- for filename in files:
- if filename.endswith(".js") and filename != "mjsunit.js":
- testname = join(dirname[len(self.root) + 1:], filename[:-3])
- test = testcase.TestCase(self, testname)
- tests.append(test)
- return tests
-
- def GetFlagsForTestCase(self, testcase, context):
- source = self.GetSourceForTest(testcase)
- flags = []
- flags_match = re.findall(FLAGS_PATTERN, source)
- for match in flags_match:
- flags += match.strip().split()
- flags += context.mode_flags
-
- files_list = [] # List of file names to append to command arguments.
- files_match = FILES_PATTERN.search(source);
- # Accept several lines of 'Files:'.
- while True:
- if files_match:
- files_list += files_match.group(1).strip().split()
- files_match = FILES_PATTERN.search(source, files_match.end())
- else:
- break
- files = [ os.path.normpath(os.path.join(self.root, '..', '..', f))
- 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]
- files = env + files
- files.append(os.path.join(self.root, "mjsunit.js"))
- files.append(testfilename)
-
- flags += files
- if context.isolates:
- flags.append("--isolate")
- flags += files
-
- return testcase.flags + flags
-
- def GetSourceForTest(self, testcase):
- filename = os.path.join(self.root, testcase.path + self.suffix())
- with open(filename) as f:
- return f.read()
-
-
-def GetSuite(name, root):
- return MjsunitTestSuite(name, root)
-
-
-# Deprecated definitions below.
-# TODO(jkummerow): Remove when SCons is no longer supported.
-
-
-from os.path import dirname, exists, join, normpath
-import tempfile
-import test
-
-
class MjsunitTestCase(test.TestCase):
def __init__(self, path, file, mode, context, config, isolates):
« no previous file with comments | « test/mjsunit/regress/regress-undefined-store-keyed-fast-element.js ('k') | test/mozilla/testcfg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698