[staging-next] jq: disable failing time conversion test on 32 bit (#415317)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
diff --git a/tests/optional.test b/tests/optional.test
|
||||
index 2623731..85bc9e9 100644
|
||||
--- a/tests/optional.test
|
||||
+++ b/tests/optional.test
|
||||
@@ -12,11 +12,6 @@ last(range(365 * 67)|("1970-03-01T01:02:03Z"|strptime("%Y-%m-%dT%H:%M:%SZ")|mkti
|
||||
null
|
||||
[2037,1,11,1,2,3,3,41]
|
||||
|
||||
-# Regression test for #3276
|
||||
-fromdate
|
||||
-"2038-01-19T03:14:08Z"
|
||||
-2147483648
|
||||
-
|
||||
# %e is not available on mingw/WIN32
|
||||
strftime("%A, %B %e, %Y")
|
||||
1435677542.822351
|
||||
@@ -30,6 +30,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"out"
|
||||
];
|
||||
|
||||
# tortured syntax to avoid rebuilds
|
||||
# needed because epoch conversion test here is right at the end of 32 bit integer space
|
||||
# See also: https://github.com/jqlang/jq/blob/859a8073ee8a21f2133154eea7c2bd5e0d60837f/tests/optional.test#L15-L18
|
||||
# "-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" would be preferrable, but breaks with dynamic linking,
|
||||
# unless done globally in stdenv for all of 32 bit.
|
||||
${if stdenv.hostPlatform.is32bit then "patches" else null} = [
|
||||
./disable-end-of-epoch-conversion-test.patch
|
||||
];
|
||||
|
||||
# https://github.com/jqlang/jq/issues/2871
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isFreeBSD ''
|
||||
substituteInPlace Makefile.am --replace-fail "tests/mantest" "" --replace-fail "tests/optionaltest" ""
|
||||
|
||||
Reference in New Issue
Block a user