Bug 1312883 - Update test_ThreadHangStats.js for the new format for nativeStacks: disable test on non-Windows systems. r=xpcshell-fix
authorMike Conley <mconley@mozilla.com>
Fri, 24 Feb 2017 19:08:21 +0100
changeset 373776 30fd632d64eb0d84e4a4ebee244e9a6f4aa66e4f
parent 373775 b97d64760b3f16fbc237c8e88276c706e7f5efbc
child 373777 ed46199e1f44717991b90f82461e3d3f4c25c1dd
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxpcshell-fix
bugs1312883
milestone54.0a1
Bug 1312883 - Update test_ThreadHangStats.js for the new format for nativeStacks: disable test on non-Windows systems. r=xpcshell-fix
toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js
--- a/toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js
+++ b/toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js
@@ -79,25 +79,28 @@ function run_test() {
 
       ok(Array.isArray(endHangs.hangs));
       notEqual(endHangs.hangs.length, 0);
 
       ok(Array.isArray(endHangs.hangs[0].stack));
       notEqual(endHangs.hangs[0].stack.length, 0);
       equal(typeof endHangs.hangs[0].stack[0], "string");
 
-      // Make sure one of the hangs is a permanent
-      // hang containing a native stack.
-      ok(endHangs.hangs.some((hang) => (
-        hang.nativeStack &&
-        Array.isArray(hang.nativeStack.memoryMap) &&
-        hang.nativeStack.memoryMap.length !== 0 &&
-        Array.isArray(hang.nativeStack.stacks) &&
-        hang.nativeStack.stacks.length !== 0
-      )));
+      // Native stack gathering is only enabled on Windows.
+      if (mozinfo.os == "win") {
+        // Make sure one of the hangs is a permanent
+        // hang containing a native stack.
+        ok(endHangs.hangs.some((hang) => (
+          hang.nativeStack &&
+          Array.isArray(hang.nativeStack.memoryMap) &&
+          hang.nativeStack.memoryMap.length !== 0 &&
+          Array.isArray(hang.nativeStack.stacks) &&
+          hang.nativeStack.stacks.length !== 0
+        )));
+      }
 
       check_histogram(endHangs.hangs[0].histogram);
 
       do_test_finished();
     };
 
     check_results();
   });