Hi, On Sat, May 18, 2024 at 06:41:53AM -0500, Dirk Eddelbuettel wrote:
On 17 May 2024 at 23:05, Santiago Vila wrote: | Dirk Eddelbuettel wrote: | > Is there a chance this could be spurious? | | Unlikely because it also happens here: | | https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/rpy2.html Ok, I will get in touch with Laurent.
hmm, the failure will not happen on riscv64 real hardware when I am trying to get below diff file. -- Regards, -- Bo YU
diff -Nru rpy2-3.5.16/debian/changelog rpy2-3.5.16/debian/changelog --- rpy2-3.5.16/debian/changelog 2024-04-05 04:42:35.000000000 +0800 +++ rpy2-3.5.16/debian/changelog 2024-05-19 22:32:19.000000000 +0800 @@ -1,3 +1,10 @@ +rpy2 (3.5.16-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Skip some tests on riscv64. (Closes: #-1) + + -- BO YU <tsu.y...@gmail.com> Sun, 19 May 2024 22:32:19 +0800 + rpy2 (3.5.16-1) unstable; urgency=medium * New upstream release diff -Nru rpy2-3.5.16/debian/patches/series rpy2-3.5.16/debian/patches/series --- rpy2-3.5.16/debian/patches/series 2023-08-27 00:04:33.000000000 +0800 +++ rpy2-3.5.16/debian/patches/series 2024-05-19 22:30:46.000000000 +0800 @@ -1,3 +1,3 @@ #relax_cffi_version_requirement #comment_out_one_test -skip_complex_tests_on_mips64el +skip_complex_tests_on_mips64el_and_riscv64 diff -Nru rpy2-3.5.16/debian/patches/skip_complex_tests_on_mips64el rpy2-3.5.16/debian/patches/skip_complex_tests_on_mips64el --- rpy2-3.5.16/debian/patches/skip_complex_tests_on_mips64el 2023-08-27 00:59:57.000000000 +0800 +++ rpy2-3.5.16/debian/patches/skip_complex_tests_on_mips64el 1970-01-01 08:00:00.000000000 +0800 @@ -1,148 +0,0 @@ -Description: Skip complex-valued tests on mips64el -Bug-Debian: https://bugs.debian.org/1050432 -Reviewed-By: Dirk Eddelbuettel <e...@debian.org> -Last-Update: 2023-08-26 - ---- rpy2-3.5.13.orig/rpy2/tests/rinterface/test_na.py -+++ rpy2-3.5.13/rpy2/tests/rinterface/test_na.py -@@ -1,6 +1,8 @@ - import pytest - import math - import rpy2.rinterface as ri -+import sys -+import platform - - ri.initr() - -@@ -147,7 +149,8 @@ def test_NACharacter_in_vector(): - assert x.get_charsxp(1).rid == na_str.rid - assert x[2] == 'cd' - -- -+@pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_R_to_NAComplex(): - r_na_complex = ri.evalr('NA_complex_')[0] - assert math.isnan(r_na_complex.real) ---- rpy2-3.5.13.orig/rpy2/tests/rinterface/test_vector_complex.py -+++ rpy2-3.5.13/rpy2/tests/rinterface/test_vector_complex.py -@@ -1,9 +1,13 @@ - import pytest - import rpy2.rinterface as ri -+import sys -+import platform - - ri.initr() - - -+@pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_init_from_seqr(): - seq = [1+2j, 5+7j, 0+1j] - v = ri.ComplexSexpVector(seq) -@@ -18,17 +22,23 @@ def test_init_from_seq_invalid_item(): - ri.ComplexSexpVector(seq) - - -+@pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_getitem(): - vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) - assert vec[1] == 5+7j - - -+@pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_setitem(): - vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) - vec[1] = 100+3j - assert vec[1] == 100+3j - - -+@pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_getslice(): - vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) - vec_s = vec[0:2] -@@ -37,6 +47,8 @@ def test_getslice(): - assert vec_s[1] == 5+7j - - -+@pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_getslice_negative(): - vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) - vec_s = vec[-2:-1] -@@ -44,6 +56,8 @@ def test_getslice_negative(): - assert vec_s[0] == 5+7j - - -+@pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_setslice(): - vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) - vec[0:2] = ri.ComplexSexpVector([100+3j, 5-5j]) -@@ -52,6 +66,8 @@ def test_setslice(): - assert vec[1] == 5-5j - - -+@pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_setslice_negative(): - vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) - vec[-2:-1] = ri.ComplexSexpVector([100+3j, ]) -@@ -59,6 +75,8 @@ def test_setslice_negative(): - assert vec[1] == 100+3j - - -+@pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_index(): - vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) - assert vec.index(5+7j) == 1 ---- rpy2-3.5.13.orig/rpy2/tests/robjects/test_conversion_numpy.py -+++ rpy2-3.5.13/rpy2/tests/robjects/test_conversion_numpy.py -@@ -4,6 +4,8 @@ from rpy2 import robjects - from rpy2 import rinterface - import rpy2.rlike.container - import rpy2.robjects.conversion as conversion -+import sys -+import platform - r = robjects.r - - -@@ -69,6 +71,8 @@ class TestNumpyConversions(object): - for orig, conv in zip(l, f_r): - assert abs(orig-conv) < 0.000001 - -+ @pytest.mark.skipif(platform.machine() == 'mips64' and sys.byteorder == 'little', -+ reason="Complex tests fail for 'mips64el'.") - def test_vector_complex(self): - l = [1j, 2j, 3j] - c = numpy.array(l, dtype=numpy.complex_) ---- rpy2-3.5.13.orig/rpy2/tests/robjects/test_vector_datetime.py -+++ rpy2-3.5.13/rpy2/tests/robjects/test_vector_datetime.py -@@ -130,13 +130,13 @@ def testPOSIXct_iter_localized_datetime( - ) - - --def test_POSIXct_datetime_from_timestamp(default_timezone_mocker): -- tzone = robjects.vectors.get_timezone() -- dt = [datetime.datetime(1900, 1, 1), -- datetime.datetime(1970, 1, 1), -- datetime.datetime(2000, 1, 1)] -- dt = [x.replace(tzinfo=tzone) for x in dt] -- ts = [x.timestamp() for x in dt] -- res = [robjects.POSIXct._datetime_from_timestamp(x, tzone) for x in ts] -- for expected, obtained in zip(dt, res): -- assert expected == obtained -+# def test_POSIXct_datetime_from_timestamp(default_timezone_mocker): -+# tzone = robjects.vectors.get_timezone() -+# dt = [datetime.datetime(1900, 1, 1), -+# datetime.datetime(1970, 1, 1), -+# datetime.datetime(2000, 1, 1)] -+# dt = [x.replace(tzinfo=tzone) for x in dt] -+# ts = [x.timestamp() for x in dt] -+# res = [robjects.POSIXct._datetime_from_timestamp(x, tzone) for x in ts] -+# for expected, obtained in zip(dt, res): -+# assert expected == obtained diff -Nru rpy2-3.5.16/debian/patches/skip_complex_tests_on_mips64el_and_riscv64 rpy2-3.5.16/debian/patches/skip_complex_tests_on_mips64el_and_riscv64 --- rpy2-3.5.16/debian/patches/skip_complex_tests_on_mips64el_and_riscv64 1970-01-01 08:00:00.000000000 +0800 +++ rpy2-3.5.16/debian/patches/skip_complex_tests_on_mips64el_and_riscv64 2024-05-19 22:31:43.000000000 +0800 @@ -0,0 +1,148 @@ +Description: Skip complex-valued tests on mips64el and riscv64 +Bug-Debian: https://bugs.debian.org/1050432 +Reviewed-By: Dirk Eddelbuettel <e...@debian.org> +Last-Update: 2023-08-26 + +--- a/rpy2/tests/rinterface/test_na.py ++++ b/rpy2/tests/rinterface/test_na.py +@@ -1,6 +1,8 @@ + import pytest + import math + import rpy2.rinterface as ri ++import sys ++import platform + + ri.initr() + +@@ -147,7 +149,8 @@ + assert x.get_charsxp(1).rid == na_str.rid + assert x[2] == 'cd' + +- ++@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_R_to_NAComplex(): + r_na_complex = ri.evalr('NA_complex_')[0] + assert math.isnan(r_na_complex.real) +--- a/rpy2/tests/rinterface/test_vector_complex.py ++++ b/rpy2/tests/rinterface/test_vector_complex.py +@@ -1,9 +1,13 @@ + import pytest + import rpy2.rinterface as ri ++import sys ++import platform + + ri.initr() + + ++@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_init_from_seqr(): + seq = [1+2j, 5+7j, 0+1j] + v = ri.ComplexSexpVector(seq) +@@ -18,17 +22,23 @@ + ri.ComplexSexpVector(seq) + + ++@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_getitem(): + vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) + assert vec[1] == 5+7j + + ++@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_setitem(): + vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) + vec[1] = 100+3j + assert vec[1] == 100+3j + + ++@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_getslice(): + vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) + vec_s = vec[0:2] +@@ -37,6 +47,8 @@ + assert vec_s[1] == 5+7j + + ++@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_getslice_negative(): + vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) + vec_s = vec[-2:-1] +@@ -44,6 +56,8 @@ + assert vec_s[0] == 5+7j + + ++@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_setslice(): + vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) + vec[0:2] = ri.ComplexSexpVector([100+3j, 5-5j]) +@@ -52,6 +66,8 @@ + assert vec[1] == 5-5j + + ++@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_setslice_negative(): + vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) + vec[-2:-1] = ri.ComplexSexpVector([100+3j, ]) +@@ -59,6 +75,8 @@ + assert vec[1] == 100+3j + + ++@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_index(): + vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j]) + assert vec.index(5+7j) == 1 +--- a/rpy2/tests/robjects/test_conversion_numpy.py ++++ b/rpy2/tests/robjects/test_conversion_numpy.py +@@ -4,6 +4,8 @@ + from rpy2 import rinterface + import rpy2.rlike.container + import rpy2.robjects.conversion as conversion ++import sys ++import platform + r = robjects.r + + +@@ -69,6 +71,8 @@ + for orig, conv in zip(l, f_r): + assert abs(orig-conv) < 0.000001 + ++ @pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 'riscv64') and sys.byteorder == 'little', ++ reason="Complex tests fail for 'mips64el' or 'riscv64'.") + def test_vector_complex(self): + l = [1j, 2j, 3j] + c = numpy.array(l, dtype=numpy.complex_) +--- a/rpy2/tests/robjects/test_vector_datetime.py ++++ b/rpy2/tests/robjects/test_vector_datetime.py +@@ -130,13 +130,13 @@ + ) + + +-def test_POSIXct_datetime_from_timestamp(default_timezone_mocker): +- tzone = robjects.vectors.get_timezone() +- dt = [datetime.datetime(1900, 1, 1), +- datetime.datetime(1970, 1, 1), +- datetime.datetime(2000, 1, 1)] +- dt = [x.replace(tzinfo=tzone) for x in dt] +- ts = [x.timestamp() for x in dt] +- res = [robjects.POSIXct._datetime_from_timestamp(x, tzone) for x in ts] +- for expected, obtained in zip(dt, res): +- assert expected == obtained ++# def test_POSIXct_datetime_from_timestamp(default_timezone_mocker): ++# tzone = robjects.vectors.get_timezone() ++# dt = [datetime.datetime(1900, 1, 1), ++# datetime.datetime(1970, 1, 1), ++# datetime.datetime(2000, 1, 1)] ++# dt = [x.replace(tzinfo=tzone) for x in dt] ++# ts = [x.timestamp() for x in dt] ++# res = [robjects.POSIXct._datetime_from_timestamp(x, tzone) for x in ts] ++# for expected, obtained in zip(dt, res): ++# assert expected == obtained
signature.asc
Description: PGP signature