Commit 866b9218 authored by Sören Tempel's avatar Sören Tempel
Browse files

community/rippled: fix tests

parent d103c6e9
......@@ -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"
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");
}
}
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment