forked from pool/libssh
Updating link to change in openSUSE:Factory/libssh revision 47.0
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libssh?expand=0&rev=fc01fb48475f33aa3f28dac7c487fc28
This commit is contained in:
committed by
Git OBS Bridge
parent
ff8b37ee68
commit
0725c05bc2
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)
|
Reference in New Issue
Block a user