diff --git a/mozjs52.spec b/mozjs52.spec index 198e065..a4fc4aa 100644 --- a/mozjs52.spec +++ b/mozjs52.spec @@ -22,10 +22,12 @@ Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/sourc # Patches from Debian mozjs52_52.3.1-4.debian.tar.xz: Patch0001: fix-soname.patch Patch0002: copy-headers.patch +Patch0003: tests-increase-timeout.patch +Patch0004: tests-snans-be.patch # Disable JS Helper threads on ppc64le # https://bugzilla.redhat.com/show_bug.cgi?id=1523121 -Patch0003: disable-extra-threads.patch +Patch0010: disable-extra-threads.patch # Patches from https://github.com/ptomato/mozjs / Debian mozjs52_52.3.1-4.debian.tar.xz Patch0101: disable-mozglue.patch @@ -72,6 +74,9 @@ pushd ../.. %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 +%patch0004 -p1 + +%patch0010 -p1 %patch0101 -p1 %patch0104 -p1 diff --git a/tests-increase-timeout.patch b/tests-increase-timeout.patch new file mode 100644 index 0000000..f51dc16 --- /dev/null +++ b/tests-increase-timeout.patch @@ -0,0 +1,16 @@ +Description: Increase the test timeout for slower buildds +Author: Adrian Bunk +Bug-Debian: https://bugs.debian.org/878284 + +--- mozjs52-52.3.1.orig/js/src/Makefile.in ++++ mozjs52-52.3.1/js/src/Makefile.in +@@ -104,7 +104,7 @@ check:: check-style check-masm check-js- + + check-jstests: + $(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/tests/jstests.py \ +- --no-progress --format=automation --timeout 300 \ ++ --no-progress --format=automation --timeout 600 \ + $(JSTESTS_EXTRA_ARGS) \ + $(DIST)/bin/$(JS_SHELL_NAME)$(BIN_SUFFIX) + + diff --git a/tests-snans-be.patch b/tests-snans-be.patch new file mode 100644 index 0000000..4e65cd9 --- /dev/null +++ b/tests-snans-be.patch @@ -0,0 +1,29 @@ +Description: Fix sort_snans.js test on big endian +Author: Adrian Bunk +Bug-Debian: https://bugs.debian.org/878285 + +--- mozjs52-52.3.1.orig/js/src/tests/ecma_6/TypedArray/sort_snans.js ++++ mozjs52-52.3.1/js/src/tests/ecma_6/TypedArray/sort_snans.js +@@ -34,8 +34,20 @@ function testFloat32NaNRanges(start, end + // and startHi, startLow and endHi, endLow should be 32-bit integers which, + // when combined (Hi + Low), form Float64 NaNs. + function testFloat64NaNRanges(startHi, startLow, endHi, endLow) { +- let skipN = 10e6; + ++ // Swap on big endian platforms ++ if ((new Uint32Array((new Uint8Array([1,2,3,4])).buffer))[0] === 0x01020304) { ++ let tmp = startHi; ++ startHi = startLow; ++ startLow = tmp; ++ ++ tmp = endHi; ++ endHi = endLow; ++ endLow = tmp; ++ } ++ ++ let skipN = 10e6; ++ + let sampleSizeHi = Math.floor((endHi - startHi)/skipN); + let sampleSizeLow = Math.floor((endLow - startLow)/skipN); + +