aboutsummaryrefslogtreecommitdiffstats
path: root/community/rippled
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2018-11-08 23:57:41 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2018-11-08 23:58:05 +0100
commit866b9218921c22d317340e4e1e580a7cd5f084b8 (patch)
treeefd86ed6e19be3d8d01d202c6e03bcc8555cc3d0 /community/rippled
parentd103c6e96b8aa8a7fe28db2f48b8e7ff0e4cd686 (diff)
downloadaports-866b9218921c22d317340e4e1e580a7cd5f084b8.tar.bz2
aports-866b9218921c22d317340e4e1e580a7cd5f084b8.tar.xz
community/rippled: fix tests
Diffstat (limited to 'community/rippled')
-rw-r--r--community/rippled/APKBUILD6
-rw-r--r--community/rippled/fix-tests.patch35
2 files changed, 39 insertions, 2 deletions
diff --git a/community/rippled/APKBUILD b/community/rippled/APKBUILD
index 96722b1412..895d605f77 100644
--- a/community/rippled/APKBUILD
+++ b/community/rippled/APKBUILD
@@ -10,8 +10,9 @@ license="ISC"
makedepends="cmake openssl-dev boost-dev protobuf-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ripple/$pkgname/archive/$pkgver.tar.gz
- musl-fixes.patch
- "
+ fix-tests.patch
+ musl-fixes.patch
+ "
builddir="$srcdir/"$pkgname-$pkgver
build() {
@@ -35,4 +36,5 @@ package() {
}
sha512sums="1ec63bb2615d15e20e5adf28f9598b84c842181a948e9bdb7eb78632a5189f27b7d88539697f7f1b5dea698331928373fc9fc7883751e624bea3ea559a4716bb rippled-1.0.1.tar.gz
+cc038e87adf97e4dcd5ea60ff6f45fc988177358b02c116134b65b08dd69a0079f38b56e0dc11c4faaeadc2d707ba5eeeb1a5869dbe95a0cf616599926566d58 fix-tests.patch
fb063fa49278a5ffbe3fb3f2c348e83f0b936bc35cab181ef02575f4a3a2ad08997dad970b101b5d9796706757e29cd1d1546da1b550e875be08d01c7e31ef16 musl-fixes.patch"
diff --git a/community/rippled/fix-tests.patch b/community/rippled/fix-tests.patch
new file mode 100644
index 0000000000..8e11f002f3
--- /dev/null
+++ b/community/rippled/fix-tests.patch
@@ -0,0 +1,35 @@
+From ab6163e989e93a67afb13285539fd89e60a1c11a Mon Sep 17 00:00:00 2001
+From: Mike Ellery <mellery451@gmail.com>
+Date: Thu, 13 Sep 2018 08:25:02 -0700
+Subject: [PATCH] Remove test sensitivity to error text from OpenSSL
+
+---
+ src/test/beast/beast_asio_error_test.cpp | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/src/test/beast/beast_asio_error_test.cpp b/src/test/beast/beast_asio_error_test.cpp
+index 4a3400ea70..5aeb925cba 100644
+--- a/src/test/beast/beast_asio_error_test.cpp
++++ b/src/test/beast/beast_asio_error_test.cpp
+@@ -32,13 +32,14 @@ class error_test : public unit_test::suite
+ boost::system::error_code ec =
+ boost::system::error_code (335544539,
+ boost::asio::error::get_ssl_category ());
+- std::string const s = beast::error_message_with_ssl(ec);
+-
+-#ifdef SSL_R_SHORT_READ
+- BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines:short read");
+-#else
+- BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines:reason(219)");
+-#endif
++ std::string s = beast::error_message_with_ssl(ec);
++ // strip away last part of the error message since
++ // it can vary with openssl versions and/or compile
++ // flags
++ auto const lastColon = s.find_last_of(':');
++ if (lastColon != s.npos)
++ s = s.substr(0, lastColon);
++ BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines");
+ }
+ }
+ };