Accepting request 585127 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/585127 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libssh?expand=0&rev=47
This commit is contained in:
commit
5d6b4d2b49
57
0001-disable-timeout-test-on-slow-buildsystems.patch
Normal file
57
0001-disable-timeout-test-on-slow-buildsystems.patch
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
Index: libssh-0.7.5/tests/unittests/torture_misc.c
|
||||||
|
===================================================================
|
||||||
|
--- libssh-0.7.5.orig/tests/unittests/torture_misc.c
|
||||||
|
+++ libssh-0.7.5/tests/unittests/torture_misc.c
|
||||||
|
@@ -180,11 +180,13 @@ static void torture_timeout_elapsed(void
|
||||||
|
(void) state;
|
||||||
|
ssh_timestamp_init(&ts);
|
||||||
|
usleep(50000);
|
||||||
|
+#ifndef SLOW_TEST_SYSTEM
|
||||||
|
assert_true(ssh_timeout_elapsed(&ts,25));
|
||||||
|
assert_false(ssh_timeout_elapsed(&ts,30000));
|
||||||
|
assert_false(ssh_timeout_elapsed(&ts,75));
|
||||||
|
assert_true(ssh_timeout_elapsed(&ts,0));
|
||||||
|
assert_false(ssh_timeout_elapsed(&ts,-1));
|
||||||
|
+#endif /* SLOW_TEST_SYSTEM */
|
||||||
|
}
|
||||||
|
|
||||||
|
static void torture_timeout_update(void **state){
|
||||||
|
@@ -192,11 +194,13 @@ static void torture_timeout_update(void
|
||||||
|
(void) state;
|
||||||
|
ssh_timestamp_init(&ts);
|
||||||
|
usleep(50000);
|
||||||
|
+#ifndef SLOW_TEST_SYSTEM
|
||||||
|
assert_int_equal(ssh_timeout_update(&ts,25), 0);
|
||||||
|
assert_in_range(ssh_timeout_update(&ts,30000),29000,29960);
|
||||||
|
assert_in_range(ssh_timeout_update(&ts,75),1,40);
|
||||||
|
assert_int_equal(ssh_timeout_update(&ts,0),0);
|
||||||
|
assert_int_equal(ssh_timeout_update(&ts,-1),-1);
|
||||||
|
+#endif /* SLOW_TEST_SYSTEM */
|
||||||
|
}
|
||||||
|
|
||||||
|
int torture_run_tests(void) {
|
||||||
|
Index: libssh-0.7.5/DefineOptions.cmake
|
||||||
|
===================================================================
|
||||||
|
--- libssh-0.7.5.orig/DefineOptions.cmake
|
||||||
|
+++ libssh-0.7.5/DefineOptions.cmake
|
||||||
|
@@ -14,6 +14,8 @@ option(WITH_CLIENT_TESTING "Build with c
|
||||||
|
option(WITH_BENCHMARKS "Build benchmarks tools" OFF)
|
||||||
|
option(WITH_EXAMPLES "Build examples" ON)
|
||||||
|
option(WITH_NACL "Build with libnacl (curve25519" ON)
|
||||||
|
+option(SLOW_TEST_SYSTEM "Disable tests that fail on slow systems" OFF)
|
||||||
|
+
|
||||||
|
if (WITH_ZLIB)
|
||||||
|
set(WITH_LIBZ ON)
|
||||||
|
else (WITH_ZLIB)
|
||||||
|
@@ -30,4 +32,9 @@ endif (WITH_TESTING)
|
||||||
|
|
||||||
|
if (WITH_NACL)
|
||||||
|
set(WITH_NACL ON)
|
||||||
|
-endif (WITH_NACL)
|
||||||
|
\ No newline at end of file
|
||||||
|
+endif (WITH_NACL)
|
||||||
|
+
|
||||||
|
+if (SLOW_TEST_SYSTEM)
|
||||||
|
+ set (SLOW_TEST_SYSTEM ON)
|
||||||
|
+ add_definitions(-DSLOW_TEST_SYSTEM)
|
||||||
|
+endif (SLOW_TEST_SYSTEM)
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 9 14:12:28 UTC 2018 - jmcdonough@suse.com
|
||||||
|
|
||||||
|
- Disable timeout testing on slow build systems (bsc#1084713)
|
||||||
|
* 0001-disable-timeout-test-on-slow-buildsystems.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Dec 24 14:41:46 UTC 2017 - fabian@ritter-vogt.de
|
Sun Dec 24 14:41:46 UTC 2017 - fabian@ritter-vogt.de
|
||||||
|
|
||||||
|
14
libssh.spec
14
libssh.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libssh
|
# spec file for package libssh
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -40,6 +40,7 @@ Patch7: 0001-cmake-Use-configure-check-for-CRYPTO_ctr128_encrypt.patch
|
|||||||
# END of OpenSSL 1.1 support patches
|
# END of OpenSSL 1.1 support patches
|
||||||
# PATCH-FIX-UPSTREAM Fix parsing of config files (boo#1067782)
|
# PATCH-FIX-UPSTREAM Fix parsing of config files (boo#1067782)
|
||||||
Patch10: 0001-config-Bugfix-Dont-skip-unseen-opcodes.patch
|
Patch10: 0001-config-Bugfix-Dont-skip-unseen-opcodes.patch
|
||||||
|
Patch11: 0001-disable-timeout-test-on-slow-buildsystems.patch
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -101,15 +102,24 @@ Documentation for libssh development.
|
|||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
|
%patch11 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
%ifarch s390 s390x ppc64le
|
||||||
|
%define slow_test_system "ON"
|
||||||
|
%else
|
||||||
|
%define slow_test_system "OFF"
|
||||||
|
%endif
|
||||||
|
|
||||||
%cmake \
|
%cmake \
|
||||||
-DCMAKE_C_FLAGS:STRING="%{optflags} -DOPENSSL_LOAD_CONF" \
|
-DCMAKE_C_FLAGS:STRING="%{optflags} -DOPENSSL_LOAD_CONF" \
|
||||||
-DWITH_CLIENT_TESTING="OFF" \
|
-DWITH_CLIENT_TESTING="OFF" \
|
||||||
-DWITH_TESTING="ON" \
|
-DWITH_TESTING="ON" \
|
||||||
-DWITH_GSSAPI=ON \
|
-DWITH_GSSAPI=ON \
|
||||||
-DWITH_BENCHMARKS="OFF" \
|
-DWITH_BENCHMARKS="OFF" \
|
||||||
-DWITH_EXAMPLES="OFF"
|
-DWITH_EXAMPLES="OFF" \
|
||||||
|
-DSLOW_TEST_SYSTEM=%{slow_test_system}
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
make %{?_smp_mflags} doc
|
make %{?_smp_mflags} doc
|
||||||
|
Loading…
Reference in New Issue
Block a user