summaryrefslogtreecommitdiff
path: root/src/3rdparty/v8/test/mozilla
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/v8/test/mozilla')
-rw-r--r--src/3rdparty/v8/test/mozilla/mozilla.status99
-rw-r--r--src/3rdparty/v8/test/mozilla/testcfg.py125
2 files changed, 137 insertions, 87 deletions
diff --git a/src/3rdparty/v8/test/mozilla/mozilla.status b/src/3rdparty/v8/test/mozilla/mozilla.status
index c30be5e..4f2fbde 100644
--- a/src/3rdparty/v8/test/mozilla/mozilla.status
+++ b/src/3rdparty/v8/test/mozilla/mozilla.status
@@ -126,13 +126,13 @@ ecma/Date/15.9.2.2-5: PASS || FAIL
ecma/Date/15.9.2.2-6: PASS || FAIL
# 1026139: These date tests fail on arm and mips
-ecma/Date/15.9.5.29-1: PASS || (($ARM || $MIPS) && FAIL)
-ecma/Date/15.9.5.34-1: PASS || (($ARM || $MIPS) && FAIL)
-ecma/Date/15.9.5.28-1: PASS || (($ARM || $MIPS) && FAIL)
+ecma/Date/15.9.5.29-1: PASS || FAIL if ($arch == arm || $arch == mipsel)
+ecma/Date/15.9.5.34-1: PASS || FAIL if ($arch == arm || $arch == mipsel)
+ecma/Date/15.9.5.28-1: PASS || FAIL if ($arch == arm || $arch == mipsel)
# 1050186: Arm/MIPS vm is broken; probably unrelated to dates
-ecma/Array/15.4.4.5-3: PASS || (($ARM || $MIPS) && FAIL)
-ecma/Date/15.9.5.22-2: PASS || (($ARM || $MIPS) && FAIL)
+ecma/Array/15.4.4.5-3: PASS || FAIL if ($arch == arm || $arch == mipsel)
+ecma/Date/15.9.5.22-2: PASS || FAIL if ($arch == arm || $arch == mipsel)
# Flaky test that fails due to what appears to be a bug in the test.
# Occurs depending on current time
@@ -245,9 +245,6 @@ js1_5/Function/regress-338121-03: FAIL_OK
# Expectes 'prototype' property of functions to be enumerable.
js1_5/Function/10.1.6-01: FAIL_OK
-# Length of objects whose prototype chain includes a function
-ecma_3/Function/regress-313570: FAIL_OK
-
# toPrecision argument restricted to range 1..21 in JSC/V8
js1_5/Regress/regress-452346: FAIL_OK
ecma_3/Number/15.7.4.7-1: FAIL_OK
@@ -371,6 +368,10 @@ ecma/GlobalObject/15.1.2.6: FAIL_OK
ecma/GlobalObject/15.1.2.7: FAIL_OK
+# Leading zero no longer signal octal numbers (ECMA-262 Annex E 15.1.2.2).
+ecma/GlobalObject/15.1.2.2-2: FAIL_OK
+
+
# Tests that rely on specific details of function decompilation or
# print strings for errors. Non-ECMA behavior.
js1_2/function/tostring-2: FAIL_OK
@@ -606,6 +607,10 @@ ecma_2/RegExp/function-001: FAIL_OK
ecma_2/RegExp/properties-001: FAIL_OK
+# Negative hexadecimal literals are parsed as NaN. This test is outdated.
+ecma/TypeConversion/9.3.1-3: FAIL_OK
+
+
##################### FAILING TESTS #####################
# This section is for tests that fail in V8 and pass in JSC.
@@ -636,7 +641,7 @@ js1_5/Expressions/regress-394673: FAIL
# Bug 762: http://code.google.com/p/v8/issues/detail?id=762
# We do not correctly handle assignments within "with"
-/ecma_3/Statements/12.10-01: FAIL
+ecma_3/Statements/12.10-01: FAIL
# We do not throw an exception when a const is redeclared.
# (We only fail section 1 of the test.)
@@ -751,7 +756,6 @@ js1_5/extensions/regress-90596-001: FAIL_OK
js1_5/extensions/regress-90596-002: FAIL_OK
js1_5/extensions/regress-96284-001: FAIL_OK
js1_5/extensions/regress-96284-002: FAIL_OK
-js1_5/extensions/scope-001: FAIL_OK
js1_5/extensions/toLocaleFormat-01: FAIL_OK
js1_5/extensions/toLocaleFormat-02: FAIL_OK
@@ -822,12 +826,6 @@ js1_5/decompilation/regress-383721: PASS || FAIL
js1_5/decompilation/regress-406555: PASS || FAIL
js1_5/decompilation/regress-460870: PASS || FAIL
-# These tests take an unreasonable amount of time so we skip them
-# in fast mode.
-
-js1_5/Regress/regress-312588: TIMEOUT || SKIP if $FAST == yes
-js1_5/Regress/regress-271716-n: PASS || SKIP if $FAST == yes
-
[ $arch == arm ]
@@ -852,40 +850,7 @@ js1_5/Regress/regress-451322: SKIP
js1_5/GC/regress-203278-2: PASS || TIMEOUT
-[ $fast == yes && $arch == arm ]
-
-# In fast mode on arm we try to skip all tests that would time out,
-# since running the tests takes so long in the first place.
-
-js1_5/Regress/regress-280769-2: SKIP
-js1_5/Regress/regress-280769-3: SKIP
-js1_5/Regress/regress-244470: SKIP
-js1_5/Regress/regress-203278-1: SKIP
-js1_5/Regress/regress-290575: SKIP
-js1_5/Regress/regress-159334: SKIP
-js1_5/Regress/regress-321971: SKIP
-js1_5/Regress/regress-347306-01: SKIP
-js1_5/Regress/regress-280769-1: SKIP
-js1_5/Regress/regress-280769-5: SKIP
-js1_5/GC/regress-306788: SKIP
-js1_5/GC/regress-278725: SKIP
-js1_5/GC/regress-203278-3: SKIP
-js1_5/GC/regress-311497: SKIP
-js1_5/Array/regress-99120-02: SKIP
-ecma/Date/15.9.5.22-1: SKIP
-ecma/Date/15.9.5.20: SKIP
-ecma/Date/15.9.5.12-2: SKIP
-ecma/Date/15.9.5.8: SKIP
-ecma/Date/15.9.5.9: SKIP
-ecma/Date/15.9.5.11-2: SKIP
-ecma/Expressions/11.7.2: SKIP
-ecma/Expressions/11.10-2: SKIP
-ecma/Expressions/11.7.3: SKIP
-ecma/Expressions/11.10-3: SKIP
-ecma/Expressions/11.7.1: SKIP
-ecma_3/RegExp/regress-209067: SKIP
-
-[ $arch == mips ]
+[ $arch == mipsel ]
# Times out and print so much output that we need to skip it to not
# hang the builder.
@@ -906,37 +871,3 @@ js1_5/Regress/regress-451322: SKIP
# BUG(1040): Allow this test to timeout.
js1_5/GC/regress-203278-2: PASS || TIMEOUT
-
-
-[ $fast == yes && $arch == mips ]
-
-# In fast mode on mips we try to skip all tests that would time out,
-# since running the tests takes so long in the first place.
-
-js1_5/Regress/regress-280769-2: SKIP
-js1_5/Regress/regress-280769-3: SKIP
-js1_5/Regress/regress-244470: SKIP
-js1_5/Regress/regress-203278-1: SKIP
-js1_5/Regress/regress-290575: SKIP
-js1_5/Regress/regress-159334: SKIP
-js1_5/Regress/regress-321971: SKIP
-js1_5/Regress/regress-347306-01: SKIP
-js1_5/Regress/regress-280769-1: SKIP
-js1_5/Regress/regress-280769-5: SKIP
-js1_5/GC/regress-306788: SKIP
-js1_5/GC/regress-278725: SKIP
-js1_5/GC/regress-203278-3: SKIP
-js1_5/GC/regress-311497: SKIP
-js1_5/Array/regress-99120-02: SKIP
-ecma/Date/15.9.5.22-1: SKIP
-ecma/Date/15.9.5.20: SKIP
-ecma/Date/15.9.5.12-2: SKIP
-ecma/Date/15.9.5.8: SKIP
-ecma/Date/15.9.5.9: SKIP
-ecma/Date/15.9.5.11-2: SKIP
-ecma/Expressions/11.7.2: SKIP
-ecma/Expressions/11.10-2: SKIP
-ecma/Expressions/11.7.3: SKIP
-ecma/Expressions/11.10-3: SKIP
-ecma/Expressions/11.7.1: SKIP
-ecma_3/RegExp/regress-209067: SKIP
diff --git a/src/3rdparty/v8/test/mozilla/testcfg.py b/src/3rdparty/v8/test/mozilla/testcfg.py
index 587781d..5aeac4c 100644
--- a/src/3rdparty/v8/test/mozilla/testcfg.py
+++ b/src/3rdparty/v8/test/mozilla/testcfg.py
@@ -26,12 +26,19 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import test
import os
-from os.path import join, exists
+import shutil
+import subprocess
+import tarfile
+
+from testrunner.local import testsuite
+from testrunner.objects import testcase
+
+MOZILLA_VERSION = "2010-06-29"
-EXCLUDED = ['CVS']
+
+EXCLUDED = ["CVS"]
FRAMEWORK = """
@@ -54,6 +61,117 @@ TEST_DIRS = """
""".split()
+class MozillaTestSuite(testsuite.TestSuite):
+
+ def __init__(self, name, root):
+ super(MozillaTestSuite, self).__init__(name, root)
+ self.testroot = os.path.join(root, "data")
+
+ def ListTests(self, context):
+ tests = []
+ for testdir in TEST_DIRS:
+ current_root = os.path.join(self.testroot, testdir)
+ for dirname, dirs, files in os.walk(current_root):
+ for dotted in [x for x in dirs if x.startswith(".")]:
+ dirs.remove(dotted)
+ for excluded in EXCLUDED:
+ if excluded in dirs:
+ dirs.remove(excluded)
+ dirs.sort()
+ files.sort()
+ for filename in files:
+ if filename.endswith(".js") and not filename in FRAMEWORK:
+ testname = os.path.join(dirname[len(self.testroot) + 1:],
+ filename[:-3])
+ case = testcase.TestCase(self, testname)
+ tests.append(case)
+ return tests
+
+ def GetFlagsForTestCase(self, testcase, context):
+ result = []
+ result += context.mode_flags
+ result += ["--expose-gc"]
+ result += [os.path.join(self.root, "mozilla-shell-emulation.js")]
+ testfilename = testcase.path + ".js"
+ testfilepath = testfilename.split(os.path.sep)
+ for i in xrange(len(testfilepath)):
+ script = os.path.join(self.testroot,
+ reduce(os.path.join, testfilepath[:i], ""),
+ "shell.js")
+ if os.path.exists(script):
+ result.append(script)
+ result.append(os.path.join(self.testroot, testfilename))
+ return testcase.flags + result
+
+ def GetSourceForTest(self, testcase):
+ filename = join(self.testroot, testcase.path + ".js")
+ with open(filename) as f:
+ return f.read()
+
+ def IsNegativeTest(self, testcase):
+ return testcase.path.endswith("-n")
+
+ def IsFailureOutput(self, output, testpath):
+ if output.exit_code != 0:
+ return True
+ return "FAILED!" in output.stdout
+
+ def DownloadData(self):
+ old_cwd = os.getcwd()
+ os.chdir(os.path.abspath(self.root))
+
+ # Maybe we're still up to date?
+ versionfile = "CHECKED_OUT_VERSION"
+ checked_out_version = None
+ if os.path.exists(versionfile):
+ with open(versionfile) as f:
+ checked_out_version = f.read()
+ if checked_out_version == MOZILLA_VERSION:
+ os.chdir(old_cwd)
+ return
+
+ # If we have a local archive file with the test data, extract it.
+ directory_name = "data"
+ if os.path.exists(directory_name):
+ os.rename(directory_name, "data.old")
+ archive_file = "downloaded_%s.tar.gz" % MOZILLA_VERSION
+ if os.path.exists(archive_file):
+ with tarfile.open(archive_file, "r:gz") as tar:
+ tar.extractall()
+ with open(versionfile, "w") as f:
+ f.write(MOZILLA_VERSION)
+ os.chdir(old_cwd)
+ return
+
+ # No cached copy. Check out via CVS, and pack as .tar.gz for later use.
+ command = ("cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot"
+ " co -D %s mozilla/js/tests" % MOZILLA_VERSION)
+ code = subprocess.call(command, shell=True)
+ if code != 0:
+ os.chdir(old_cwd)
+ raise Exception("Error checking out Mozilla test suite!")
+ os.rename(join("mozilla", "js", "tests"), directory_name)
+ shutil.rmtree("mozilla")
+ with tarfile.open(archive_file, "w:gz") as tar:
+ tar.add("data")
+ with open(versionfile, "w") as f:
+ f.write(MOZILLA_VERSION)
+ os.chdir(old_cwd)
+
+
+def GetSuite(name, root):
+ return MozillaTestSuite(name, root)
+
+
+# Deprecated definitions below.
+# TODO(jkummerow): Remove when SCons is no longer supported.
+
+
+from os.path import exists
+from os.path import join
+import test
+
+
class MozillaTestCase(test.TestCase):
def __init__(self, filename, path, context, root, mode, framework):
@@ -76,6 +194,7 @@ class MozillaTestCase(test.TestCase):
def GetCommand(self):
result = self.context.GetVmCommand(self, self.mode) + \
[ '--expose-gc', join(self.root, 'mozilla-shell-emulation.js') ]
+ result += [ '--es5_readonly' ] # Temporary hack until we can remove flag
result += self.framework
result.append(self.filename)
return result