pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
git-cinnabar: 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 02:02:05 2024 +0000
Changeset: 3b6835aa7d7915d97438072104e308b918d3558c
Modified Files:
git-cinnabar/COMMIT_MSG
git-cinnabar/Makefile
git-cinnabar/distinfo
Added Files:
git-cinnabar/patches/patch-tests_cinnabarclone.t
git-cinnabar/patches/patch-tests_push-refs.t
Log Message:
git-cinnabar: 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=3b6835aa7d7915d97438072104e308b918d3558c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
git-cinnabar/COMMIT_MSG | 48 +-----------------------
git-cinnabar/Makefile | 21 ++++++++++-
git-cinnabar/distinfo | 2 +
git-cinnabar/patches/patch-tests_cinnabarclone.t | 16 ++++++++
git-cinnabar/patches/patch-tests_push-refs.t | 16 ++++++++
5 files changed, 55 insertions(+), 48 deletions(-)
diffs:
diff --git a/git-cinnabar/COMMIT_MSG b/git-cinnabar/COMMIT_MSG
index 6da67279a2..72bd3bed80 100644
--- a/git-cinnabar/COMMIT_MSG
+++ b/git-cinnabar/COMMIT_MSG
@@ -1,47 +1 @@
-devel/git-cinnabar, devel/py-hg-cinnabarclone: update to 0.7.0beta2
-
-While here: Disable `version-check' feature so git-cinnabar doesn't
-phone home every time you run it.
-
-Upstream release notes:
-
-0.7.0-beta.2 Pre-release
-
-What's new since 0.7.0-beta.1?
-
- * Based on git 2.46.2.
- * Avoid showing an update notification for the current beta version when it is the latest release.
- * Fixed git push --dry-run to not report spurious errors.
- * Allow git push --dry-run to create metadata for the changesets the push would create.
- * Various changes to download.py and git cinnabar self-update.
-
-
-0.7.0-beta.1 Pre-release
-
-/!\ As of version 0.7, some corner cases in Mercurial repositories will generate different git commits than with prior versions of git-cinnabar. This means a fresh clone might have different git SHA-1s than existing clones, but this doesn't impact the use of existing clones with newer versions of git-cinnabar.
-
-Most repositories should remain non-affected by the change.
-
-You can set the cinnabar.compat git configuration to 0.6 to keep the previous behavior.
-
-What's new since 0.6.3?
-
- * Based on git 2.46.0.
- * Fixed git cinnabar fsck to avoid misreporting weird old Mercurial file history as metadata corruption.
- * Fixed the creation of empty trees for manifests.
- * Fixed access to ssh remotes with absolute paths.
- * Fixed cinnabarclone extension with Mercurial >= 6.6.
- * Fixed handling cinnabar.refs=heads,tips (backwards incompatible change).
- * Various optimizations making clones and pulls faster.
- * Made negotiation with repo with large number of heads faster for pull and push.
- * git cinnabar fetch and git cinnabar reclone now handle everything internally instead of delegating to git fetch and git remote, respectively.
- * git cinnabar reclone doesn't lose metadata history when a cinnabarclone is used.
- * A clone with cinnabarclone now only records one metadata update instead of two when there are updates after the cinnabarclone.
- * git cinnabar reclone now only records one metadata update even when pulling from several remotes at the same time.
- * git cinnabar reclone will try to restore as many of the heads it knew about, fetching from skipDefaultUpdate remotes if necessary.
- * git cinnabar reclone --rebase allows to automatically rebase local branches and detached heads when git commits change after the reclone (e.g. when switching between a plain clone to a grafted clone, or when there was a bug in the original conversion)
- * cinnabar.check=no-bundle2 now pretends the Mercurial server doesn't support bundle2.
- * Updated crate dependencies.
- * Many refactors, including the conversion of many functions from C to Rust.
- * Experimental support for tweaking the similarity level when detecting copies and renames during a push.
- * Experimental support for pushing named branches and tags.
+git-cinnabar: Add more automatic tests.
diff --git a/git-cinnabar/Makefile b/git-cinnabar/Makefile
index 4a7f1b7a3e..a0a34385a3 100644
--- a/git-cinnabar/Makefile
+++ b/git-cinnabar/Makefile
@@ -42,9 +42,28 @@ do-test:
${RUN} cd ${CARGO_WRKSRC} && \
${SETENV} ${MAKE_ENV} ${PREFIX}/bin/cargo ${CARGO_TEST_ARGS}
+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 "../../mk/bsd.pkg.mk"
diff --git a/git-cinnabar/distinfo b/git-cinnabar/distinfo
index 808c4ce4a6..19682b8f6f 100644
--- a/git-cinnabar/distinfo
+++ b/git-cinnabar/distinfo
@@ -412,3 +412,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/patches/patch-tests_cinnabarclone.t b/git-cinnabar/patches/patch-tests_cinnabarclone.t
new file mode 100644
index 0000000000..e64d51c6b9
--- /dev/null
+++ b/git-cinnabar/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/patches/patch-tests_push-refs.t b/git-cinnabar/patches/patch-tests_push-refs.t
new file mode 100644
index 0000000000..dcbff5447e
--- /dev/null
+++ b/git-cinnabar/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