pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

git-cinnabar-devel: Run the cram tests too.



Module Name:	pkgsrc-wip
Committed By:	Taylor R Campbell <riastradh%NetBSD.org@localhost>
Pushed By:	riastradh
Date:		Thu Dec 5 01:41:54 2024 +0000
Changeset:	691f8ae6962c941a9e9cecc0be80c71bafe6a2c2

Modified Files:
	git-cinnabar-devel/Makefile
	git-cinnabar-devel/distinfo
Added Files:
	git-cinnabar-devel/patches/patch-tests_cinnabarclone.t
	git-cinnabar-devel/patches/patch-tests_push-refs.t

Log Message:
git-cinnabar-devel: Run the cram tests too.

All the tests should pass on NetBSD 9 now (probably 10 too).  Issues
filed upstream for the patches needed to make this work.

Tidy Makefile style a little while here.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=691f8ae6962c941a9e9cecc0be80c71bafe6a2c2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 git-cinnabar-devel/Makefile                          | 20 ++++++++++++++++++--
 git-cinnabar-devel/distinfo                          |  2 ++
 .../patches/patch-tests_cinnabarclone.t              | 16 ++++++++++++++++
 git-cinnabar-devel/patches/patch-tests_push-refs.t   | 16 ++++++++++++++++
 4 files changed, 52 insertions(+), 2 deletions(-)

diffs:
diff --git a/git-cinnabar-devel/Makefile b/git-cinnabar-devel/Makefile
index a7427727b9..a38ad097a5 100644
--- a/git-cinnabar-devel/Makefile
+++ b/git-cinnabar-devel/Makefile
@@ -10,6 +10,7 @@ CATEGORIES=	devel
 GIT_REPO=	https://github.com/glandium/git-cinnabar.git
 GIT_BRANCH=	try
 #GIT_REVISION=	4fb9f8dcf2f566d6fb411adb198cfeb73f2cb564
+
 DEFAULT_DISTFILES=	# empty
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
@@ -49,14 +50,29 @@ do-install:
 
 CARGO_TEST_ARGS=	test ${DEFAULT_CARGO_ARGS}
 
-do-test:
+do-test: do-test-cargo
+do-test-cargo: .PHONY
+	@${STEP_MSG} Running cargo test
 	${RUN} cd ${CARGO_WRKSRC} && \
 	${SETENV} ${MAKE_ENV} ${PREFIX}/bin/cargo ${CARGO_TEST_ARGS}
 
+TEST_DEPENDS+=		${PYPKGPREFIX}-cram>=0:../../devel/py-cram
+
+# this.cannot.possibly.exist.invalid-tld appears in some tests that
+# check for exact error messages, so let that bypass the fake proxy.
+do-test: do-test-cram
+do-test-cram: .PHONY
+	@${STEP_MSG} Running cram tests
+	${RUN} cd ${CARGO_WRKSRC} && \
+	${SETENV} ${MAKE_ENV} PATH=${CARGO_WRKSRC}/target/release:${PATH:Q} \
+	    no_proxy=localhost,this.cannot.possibly.exist.invalid-tld \
+	    ${PREFIX}/bin/cram ${PKG_VERBOSE:D--verbose} tests
+
 .include "cargo-depends.mk"
 
+.include "../../archivers/zstd/buildlink3.mk"
+.include "../../lang/python/application.mk"
 .include "../../lang/rust/cargo.mk"
 .include "../../www/curl/buildlink3.mk"
-.include "../../archivers/zstd/buildlink3.mk"
 .include "../../wip/mk/git-package.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/git-cinnabar-devel/distinfo b/git-cinnabar-devel/distinfo
index f17db094b4..2879111048 100644
--- a/git-cinnabar-devel/distinfo
+++ b/git-cinnabar-devel/distinfo
@@ -406,3 +406,5 @@ BLAKE2s (zstd-sys-2.0.13+zstd.1.5.6.crate) = df71c3b7a2dd396817e8e71eee920caccb9
 SHA512 (zstd-sys-2.0.13+zstd.1.5.6.crate) = c1f0176ebd0914879d0060796776c7fe376293ce9bc9f8f07ee3b809932a75aa033881d59a1bc99b6cd9af85b8e225fc09bcfc96013e556d7c11f155b759ecbf
 Size (zstd-sys-2.0.13+zstd.1.5.6.crate) = 749090 bytes
 SHA1 (patch-git-core_ci_run-test-slice.sh) = 9c7bc2b52c677d96d77a4d842650828a23c3eccc
+SHA1 (patch-tests_cinnabarclone.t) = 054754e932eb52a04001da5cae96c5582dfacddc
+SHA1 (patch-tests_push-refs.t) = c6de59558337c8fe193df7166a9a4179cf3e14ca
diff --git a/git-cinnabar-devel/patches/patch-tests_cinnabarclone.t b/git-cinnabar-devel/patches/patch-tests_cinnabarclone.t
new file mode 100644
index 0000000000..e64d51c6b9
--- /dev/null
+++ b/git-cinnabar-devel/patches/patch-tests_cinnabarclone.t
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Work around NetBSD differences in test output.
+https://github.com/glandium/git-cinnabar/issues/340
+
+--- tests/cinnabarclone.t.orig	2023-10-07 12:16:45.000000000 +0000
++++ tests/cinnabarclone.t
+@@ -110,7 +110,7 @@ TODO: Ideally, the error message would s
+   Cloning into 'repo-git'...
+   Fetching cinnabar metadata from http://localhost:8080/
+   \r (no-eol) (esc)
+-  ERROR unable to access 'http://localhost:8080/': Failed to connect to localhost port 8080.* (re)
++  ERROR unable to access 'http://localhost:8080/': .* (re)
+   \r (no-eol) (esc)
+   WARNING Falling back to normal clone.
+ 
diff --git a/git-cinnabar-devel/patches/patch-tests_push-refs.t b/git-cinnabar-devel/patches/patch-tests_push-refs.t
new file mode 100644
index 0000000000..dcbff5447e
--- /dev/null
+++ b/git-cinnabar-devel/patches/patch-tests_push-refs.t
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Don't rely on ~/.gitconfig to set user.name:
+https://github.com/glandium/git-cinnabar/issues/339
+
+--- tests/push-refs.t.orig	2024-10-22 18:57:11.000000000 +0000
++++ tests/push-refs.t
+@@ -375,7 +375,7 @@ Removing heads or branches is not suppor
+ 
+ Pushing/deleting tags is not supported.
+ 
+-  $ git -C repo-git -c user.email=foo@bar tag -m 'Tagged' the-tag
++  $ git -C repo-git -c user.name=foobar -c user.email=foo@bar tag -m 'Tagged' the-tag
+   $ git -C repo-git push origin --tags
+   To hg::.*/push-refs.t/repo-from-git (re)
+    ! [remote rejected] the-tag -> the-tag (Pushing tags is unsupported)


Home | Main Index | Thread Index | Old Index