No Bug - Guard PJS tests to only apply to Nightly. (a=test-only)
authorShu-yu Guo <shu@rfrn.org>
Mon, 05 Aug 2013 16:03:48 -0700
changeset 153655 b2293e04b93f4d6e51edade1e7e67b592ed8fbf6
parent 153654 f4b65a8f45b27e9bb31df90b09caa028ba805fb6
child 153656 88cf59869d5e521878f5767c9813f654f9f7cb2e
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
milestone25.0a2
No Bug - Guard PJS tests to only apply to Nightly. (a=test-only)
js/src/jit-test/tests/collections/Array-build-basic.js
js/src/jit-test/tests/collections/Array-build-surfaces.js
js/src/jit-test/tests/parallel/bug890465.js
js/src/jit-test/tests/parallel/bug894782.js
js/src/jit-test/tests/parallel/bug895782.js
--- a/js/src/jit-test/tests/collections/Array-build-basic.js
+++ b/js/src/jit-test/tests/collections/Array-build-basic.js
@@ -1,20 +1,22 @@
 // Array.build basics
 
-load(libdir + "asserts.js");
-load(libdir + "eqArrayHelper.js");
+if (getBuildConfiguration().parallelJS) {
+  load(libdir + "asserts.js");
+  load(libdir + "eqArrayHelper.js");
 
-function myBuild(l, f) {
-  var a = [];
-  for (var i = 0; i < l; i++)
-    a.push(f(i));
-  return a;
+  function myBuild(l, f) {
+    var a = [];
+    for (var i = 0; i < l; i++)
+      a.push(f(i));
+    return a;
+  }
+
+  // Test that build returns an identical, but new array.
+  var a1 = [];
+  for (var i = 0; i < 100; i++)
+    a1[i] = Math.random();
+  var a2 = Array.build(a1.length, (i) => a1[i]);
+
+  assertEq(a1 === a2, false);
+  assertEqArray(a2, a1);
 }
-
-// Test that build returns an identical, but new array.
-var a1 = [];
-for (var i = 0; i < 100; i++)
-  a1[i] = Math.random();
-var a2 = Array.build(a1.length, (i) => a1[i]);
-
-assertEq(a1 === a2, false);
-assertEqArray(a2, a1);
--- a/js/src/jit-test/tests/collections/Array-build-surfaces.js
+++ b/js/src/jit-test/tests/collections/Array-build-surfaces.js
@@ -1,21 +1,23 @@
 // Check superficial features of Array.build.
 
-load(libdir + "asserts.js");
+if (getBuildConfiguration().parallelJS) {
+  load(libdir + "asserts.js");
 
-var desc = Object.getOwnPropertyDescriptor(Array, "build");
-assertEq(desc.configurable, true);
-assertEq(desc.enumerable, false);
-assertEq(desc.writable, true);
-assertEq(Array.build.length, 2);
-assertThrowsInstanceOf(() => new Array.build(), TypeError);  // not a constructor
+  var desc = Object.getOwnPropertyDescriptor(Array, "build");
+  assertEq(desc.configurable, true);
+  assertEq(desc.enumerable, false);
+  assertEq(desc.writable, true);
+  assertEq(Array.build.length, 2);
+  assertThrowsInstanceOf(() => new Array.build(), TypeError);  // not a constructor
 
-// Must pass a function to second argument.
-for (let v of [undefined, null, false, "cow"])
-  assertThrowsInstanceOf(() => Array.build(1, v), TypeError);
+  // Must pass a function to second argument.
+  for (let v of [undefined, null, false, "cow"])
+    assertThrowsInstanceOf(() => Array.build(1, v), TypeError);
 
-// The first argument must be a legal length.
-assertThrowsInstanceOf(() => Array.build(-1, function() {}), RangeError);
+  // The first argument must be a legal length.
+  assertThrowsInstanceOf(() => Array.build(-1, function() {}), RangeError);
 
-// When the this-value passed in is not a constructor, the result is an array.
-for (let v of [undefined, null, false, "cow"])
-  assertEq(Array.isArray(Array.build.call(v, 1, function() {})), true);
+  // When the this-value passed in is not a constructor, the result is an array.
+  for (let v of [undefined, null, false, "cow"])
+    assertEq(Array.isArray(Array.build.call(v, 1, function() {})), true);
+}
--- a/js/src/jit-test/tests/parallel/bug890465.js
+++ b/js/src/jit-test/tests/parallel/bug890465.js
@@ -1,4 +1,6 @@
-x = Uint8ClampedArray()
-ParallelArray([320], function() {
-    return x[8]
-})
\ No newline at end of file
+if (getBuildConfiguration().parallelJS) {
+  x = Uint8ClampedArray()
+  ParallelArray([320], function() {
+      return x[8]
+  })
+}
--- a/js/src/jit-test/tests/parallel/bug894782.js
+++ b/js/src/jit-test/tests/parallel/bug894782.js
@@ -1,4 +1,6 @@
 // Don't crash
 
-print(ParallelArray())
-String(Object.create(ParallelArray(8077, function() {})))
+if (getBuildConfiguration().parallelJS) {
+  print(ParallelArray())
+  String(Object.create(ParallelArray(8077, function() {})))
+}
--- a/js/src/jit-test/tests/parallel/bug895782.js
+++ b/js/src/jit-test/tests/parallel/bug895782.js
@@ -1,10 +1,12 @@
 // Don't crash
 
-Object.defineProperty(this, "y", {
-  get: function() {
-    return Object.create(x)
-  }
-})
-x = ParallelArray([1142], function() {})
-x = x.partition(2)
-y + y
+if (getBuildConfiguration().parallelJS) {
+  Object.defineProperty(this, "y", {
+    get: function() {
+      return Object.create(x)
+    }
+  })
+  x = ParallelArray([1142], function() {})
+  x = x.partition(2)
+  y + y
+}