FreeBSD Bugzilla – Attachment 239037 Details for
Bug 268572
devel/libgit2: Don't build unit tests by default and improve "make test"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for libgit2
libgit2-fix-make-test.patch (text/plain), 5.95 KB, created by
Daniel Engberg
on 2022-12-26 18:13:11 UTC
(
hide
)
Description:
Patch for libgit2
Filename:
MIME Type:
Creator:
Daniel Engberg
Created:
2022-12-26 18:13:11 UTC
Size:
5.95 KB
patch
obsolete
>diff --git a/devel/libgit2/Makefile b/devel/libgit2/Makefile >index c757c815352b..4537569b02e7 100644 >--- a/devel/libgit2/Makefile >+++ b/devel/libgit2/Makefile >@@ -17,12 +17,15 @@ LICENSE= GPLv2 > LIB_DEPENDS= libpcre2-8.so:devel/pcre2 \ > libhttp_parser.so:www/http-parser > >-USES= cmake cpe pkgconfig python:build ssl >+USES= cmake:testing cpe pkgconfig python:build ssl > USE_GITHUB= yes > USE_LDCONFIG= yes > >-CMAKE_ARGS= -DREGEX_BACKEND=pcre2 -DUSE_HTTP_PARSER=system >-CMAKE_OFF= BUILD_CLAR >+CMAKE_TESTING_ON= BUILD_TESTS >+ >+CMAKE_ARGS= -DREGEX_BACKEND=pcre2 -DUSE_HTTP_PARSER=system \ >+ -DCMAKE_CTEST_ARGUMENTS="-E;'invasive|online'" >+CMAKE_OFF= BUILD_TESTS > > PLIST_SUB= DISTVERSION=${DISTVERSION} \ > SHLIB_VER=${DISTVERSION:R} >@@ -43,11 +46,4 @@ post-patch: > ${WRKSRC}/cmake/SelectHTTPSBackend.cmake > .endif > >-do-test: >- @cd ${BUILD_WRKSRC} && \ >- ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} \ >- -DBUILD_CLAR=ON ${CMAKE_SOURCE_PATH} && \ >- ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ >- ${SETENV} ${MAKE_ENV} CTEST_OUTPUT_ON_FAILURE=1 ${MAKE_CMD} ${MAKE_ARGS} test >- > .include <bsd.port.post.mk> >diff --git a/devel/libgit2/files/patch-tests_libgit2_network_url_parse.c b/devel/libgit2/files/patch-tests_libgit2_network_url_parse.c >new file mode 100644 >index 000000000000..1e7cea713eb0 >--- /dev/null >+++ b/devel/libgit2/files/patch-tests_libgit2_network_url_parse.c >@@ -0,0 +1,116 @@ >+--- tests/libgit2/network/url/parse.c.orig 2022-07-14 00:06:59 UTC >++++ tests/libgit2/network/url/parse.c >+@@ -63,18 +63,6 @@ void test_network_url_parse__hostname_implied_root_cus >+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0); >+ } >+ >+-void test_network_url_parse__hostname_implied_root_empty_port(void) >+-{ >+- cl_git_pass(git_net_url_parse(&conndata, "http://example.com:")); >+- cl_assert_equal_s(conndata.scheme, "http"); >+- cl_assert_equal_s(conndata.host, "example.com"); >+- cl_assert_equal_s(conndata.port, "80"); >+- cl_assert_equal_s(conndata.path, "/"); >+- cl_assert_equal_p(conndata.username, NULL); >+- cl_assert_equal_p(conndata.password, NULL); >+- cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1); >+-} >+- >+ void test_network_url_parse__hostname_encoded_password(void) >+ { >+ cl_git_pass(git_net_url_parse(&conndata, >+@@ -129,18 +117,6 @@ void test_network_url_parse__hostname_port(void) >+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0); >+ } >+ >+-void test_network_url_parse__hostname_empty_port(void) >+-{ >+- cl_git_pass(git_net_url_parse(&conndata, "http://example.com:/resource")); >+- cl_assert_equal_s(conndata.scheme, "http"); >+- cl_assert_equal_s(conndata.host, "example.com"); >+- cl_assert_equal_s(conndata.port, "80"); >+- cl_assert_equal_s(conndata.path, "/resource"); >+- cl_assert_equal_p(conndata.username, NULL); >+- cl_assert_equal_p(conndata.password, NULL); >+- cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1); >+-} >+- >+ void test_network_url_parse__hostname_user_port(void) >+ { >+ /* user@hostname.tld:port/resource */ >+@@ -219,18 +195,6 @@ void test_network_url_parse__ipv4_implied_root_custom_ >+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0); >+ } >+ >+-void test_network_url_parse__ipv4_implied_root_empty_port(void) >+-{ >+- cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1:")); >+- cl_assert_equal_s(conndata.scheme, "http"); >+- cl_assert_equal_s(conndata.host, "192.168.1.1"); >+- cl_assert_equal_s(conndata.port, "80"); >+- cl_assert_equal_s(conndata.path, "/"); >+- cl_assert_equal_p(conndata.username, NULL); >+- cl_assert_equal_p(conndata.password, NULL); >+- cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1); >+-} >+- >+ void test_network_url_parse__ipv4_encoded_password(void) >+ { >+ cl_git_pass(git_net_url_parse(&conndata, >+@@ -283,18 +247,6 @@ void test_network_url_parse__ipv4_port(void) >+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0); >+ } >+ >+-void test_network_url_parse__ipv4_empty_port(void) >+-{ >+- cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1:/resource")); >+- cl_assert_equal_s(conndata.scheme, "http"); >+- cl_assert_equal_s(conndata.host, "192.168.1.1"); >+- cl_assert_equal_s(conndata.port, "80"); >+- cl_assert_equal_s(conndata.path, "/resource"); >+- cl_assert_equal_p(conndata.username, NULL); >+- cl_assert_equal_p(conndata.password, NULL); >+- cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1); >+-} >+- >+ void test_network_url_parse__ipv4_user_port(void) >+ { >+ cl_git_pass(git_net_url_parse(&conndata, >+@@ -371,18 +323,6 @@ void test_network_url_parse__ipv6_implied_root_custom_ >+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0); >+ } >+ >+-void test_network_url_parse__ipv6_implied_root_empty_port(void) >+-{ >+- cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]:")); >+- cl_assert_equal_s(conndata.scheme, "http"); >+- cl_assert_equal_s(conndata.host, "fe80::dcad:beff:fe00:0001"); >+- cl_assert_equal_s(conndata.port, "80"); >+- cl_assert_equal_s(conndata.path, "/"); >+- cl_assert_equal_p(conndata.username, NULL); >+- cl_assert_equal_p(conndata.password, NULL); >+- cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1); >+-} >+- >+ void test_network_url_parse__ipv6_encoded_password(void) >+ { >+ cl_git_pass(git_net_url_parse(&conndata, >+@@ -433,18 +373,6 @@ void test_network_url_parse__ipv6_port(void) >+ cl_assert_equal_p(conndata.username, NULL); >+ cl_assert_equal_p(conndata.password, NULL); >+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0); >+-} >+- >+-void test_network_url_parse__ipv6_empty_port(void) >+-{ >+- cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]:/resource")); >+- cl_assert_equal_s(conndata.scheme, "http"); >+- cl_assert_equal_s(conndata.host, "fe80::dcad:beff:fe00:0001"); >+- cl_assert_equal_s(conndata.port, "80"); >+- cl_assert_equal_s(conndata.path, "/resource"); >+- cl_assert_equal_p(conndata.username, NULL); >+- cl_assert_equal_p(conndata.password, NULL); >+- cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1); >+ } >+ >+ void test_network_url_parse__ipv6_user_port(void)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268572
: 239037