| Index: test/lexer/testcfg.py
|
| diff --git a/test/mjsunit/testcfg.py b/test/lexer/testcfg.py
|
| similarity index 85%
|
| copy from test/mjsunit/testcfg.py
|
| copy to test/lexer/testcfg.py
|
| index c960ce6b30107e167ad4576f24d0e29594444fd8..2e788d062c6863cfaa76e8cd6e9110360daf6664 100644
|
| --- a/test/mjsunit/testcfg.py
|
| +++ b/test/lexer/testcfg.py
|
| @@ -33,13 +33,12 @@ from testrunner.objects import testcase
|
|
|
| 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):
|
| +class LexerTestSuite(testsuite.TestSuite):
|
|
|
| def __init__(self, name, root):
|
| - super(MjsunitTestSuite, self).__init__(name, root)
|
| + super(LexerTestSuite, self).__init__(name, root)
|
|
|
| def ListTests(self, context):
|
| tests = []
|
| @@ -49,7 +48,7 @@ class MjsunitTestSuite(testsuite.TestSuite):
|
| dirs.sort()
|
| files.sort()
|
| for filename in files:
|
| - if filename.endswith(".js") and filename != "mjsunit.js":
|
| + if filename.endswith(".js"):
|
| testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3])
|
| test = testcase.TestCase(self, testname)
|
| tests.append(test)
|
| @@ -74,16 +73,9 @@ class MjsunitTestSuite(testsuite.TestSuite):
|
| 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.replace("\\", "\\\\")]
|
| - 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
|
|
|
| @@ -92,6 +84,9 @@ class MjsunitTestSuite(testsuite.TestSuite):
|
| with open(filename) as f:
|
| return f.read()
|
|
|
| + def shell(self):
|
| + return "lexer-shell"
|
| +
|
|
|
| def GetSuite(name, root):
|
| - return MjsunitTestSuite(name, root)
|
| + return LexerTestSuite(name, root)
|
|
|