Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab062a3

Browse files
andheEdward Thomson
authored and
Edward Thomson
committed
tests: fix core/stream test when built with openssl off
When passing -DUSE_OPENSSL:BOOL=OFF to cmake the testsuite will fail with the following error: core::stream::register_tls [/tmp/libgit2/tests/core/stream.c:40] Function call failed: (error) error -1 - <no message> Fix test to assume failure for tls when built without openssl. While at it also fix GIT_WIN32 cpp to check if it's defined or not.
1 parent fe1f477 commit ab062a3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/core/stream.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ void test_core_stream__register_tls(void)
3333
cl_git_pass(git_stream_register_tls(NULL));
3434
error = git_tls_stream_new(&stream, "localhost", "443");
3535

36-
/* We don't have arbitrary TLS stream support on Windows */
37-
#if GIT_WIN32
36+
/* We don't have arbitrary TLS stream support on Windows
37+
* or when openssl support is disabled (except on OSX
38+
* with Security framework).
39+
*/
40+
#if defined(GIT_WIN32) || \
41+
(!defined(GIT_SECURE_TRANSPORT) && !defined(GIT_OPENSSL))
3842
cl_git_fail_with(-1, error);
3943
#else
4044
cl_git_pass(error);

0 commit comments

Comments
 (0)