summaryrefslogtreecommitdiff
path: root/guix/tests/git.scm
Commit message (Collapse)AuthorAge
* tests: git: Avoid ambiguous module import.Leo Famulari2021-12-23
| | | | | | | | | | Fixes this warning: WARNING: (guix tests git): `reset' imported from both (git) and (ice-9 control) This is a followup to commit 07145c8a8cef3860a6c522d81e387bd0485c83ce. * guix/tests/git.scm: Only import LET/EC from (ice-9 control).
* tests: Smarten up git repository testing framework.Attila Lendvai2021-12-23
| | | | | | | | | * guix/tests/git.scm (with-git-repository): New macro, exported. It can be used repeatedly inside a WITH-TEMPORARY-GIT-REPOSITORY. (populate-git-repository): Extend the DSL with (ADD "some-noise"), (RESET "[commit hash]"), (CHECKOUT "branch" ORPHAN). Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* tests: git: Make 'tag' directive non-interactive.Xinglu Chen2021-09-18
| | | | | | | | | | | When running 'git tag TAGNAME', Git will open up the user's default text editor to make them write a message. This is not desirable when running tests. * guix/tests/git.scm (populate-git-repository): Add a 'tag' directive that takes an additional argument, and pass it to the '-m' flag. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* tests: git: Don't read from the users global Git config file.Xinglu Chen2021-09-18
| | | | | | | * guix/tests/git (populate-git-repository): Set the GIT_CONFIG_GLOBAL environment variable to the temporary Git config file. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* git-authenticate: Prevent removal of '.guix-authorizations'.Ludovic Courtès2020-06-07
| | | | | | | | | | | * guix/git-authenticate.scm (commit-authorized-keys) [parents-have-authorizations-file?, assert-parents-lack-authorizations]: New procedures. Use the latter before returning DEFAULT-AUTHORIZATIONS. * guix/git.scm (false-if-git-not-found): Export. * guix/tests/git.scm (populate-git-repository): Add 'remove' clause. * tests/git-authenticate.scm ("signed commits, .guix-authorizations removed"): New test.
* utils: Add 'with-environment-variables'.Ludovic Courtès2020-06-06
| | | | | | | * guix/tests/gnupg.scm (call-with-environment-variables) (with-environment-variables): Move to... * guix/utils.scm: ... here. * guix/tests/git.scm: Adjust accordingly.
* git-authenticate: Add tests.Ludovic Courtès2020-06-05
| | | | | | | | | | | | | * guix/tests/git.scm (call-with-environment-variables) (with-environment-variables): Remove. * guix/tests/git.scm (populate-git-repository): Add clauses for signed commits and signed merges. * guix/tests/gnupg.scm: New file. * tests/git-authenticate.scm: New file. * tests/ed25519bis.key, tests/ed25519bis.sec: New files. * Makefile.am (dist_noinst_DATA): Add 'guix/tests/gnupg.scm'. (SCM_TESTS): Add 'tests/git-authenticate.scm'. (EXTRA_DIST): Add tests/ed25519bis.{key,sec}.
* tests: Invoke 'git' with a custom '.gitconfig' and ignore the system config.Ludovic Courtès2020-04-19
| | | | | | | | | | Fixes <https://bugs.gnu.org/37679>. Reported by Gábor Boskovits <boskovits@gmail.com>. * guix/tests/git.scm (call-with-environment-variables): New procedure. (with-environment-variables): New macro. (populate-git-repository)[git]: Wrap (git-command) invocation in 'call-with-temporary-directory' and 'with-environment-variables'.
* channels: Allow news entries to refer to a tag.Ludovic Courtès2019-09-23
| | | | | | | | | | | | | | | | Suggested by Ricardo Wurmus <rekado@elephly.net>. * guix/channels.scm (<channel-news-entry>)[tag]: New field. (sexp->channel-news-entry): Accept either 'commit' or 'tag' in 'entry' forms. (resolve-channel-news-entry-tag): New procedure. (channel-news-for-commit): Move 'with-repository' form one level higher. Call 'resolve-channel-news-entry-tag' on all the news entries. * guix/tests/git.scm (populate-git-repository): Add clause for 'tag'. * tests/channels.scm ("channel-news, one entry"): Create a tag and add an entry with a tag. Check that the tag is resolved and also visible in the <channel-news-entry> record. * doc/guix.texi (Channels): Mention tags in news entries.
* channels: Add support for a news file.Ludovic Courtès2019-09-23
| | | | | | | | | | | | | | * guix/channels.scm (<channel-metadata>)[news-file]: New field. (read-channel-metadata): Set the 'news-file' field. (read-channel-metadata-from-source): Likewise. (<channel-news>, <channel-news-entry>): New record types. (sexp->channel-news-entry, read-channel-news) (channel-news-for-commit): New procedures. * guix/tests/git.scm (populate-git-repository): For 'add', allow CONTENTS to be a procedure. * tests/channels.scm ("channel-news, no news") ("channel-news, one entry"): New tests. * doc/guix.texi (Channels): Document it.
* git: Add 'commit-difference'.Ludovic Courtès2019-09-23
* guix/git.scm (commit-closure, commit-difference): New procedures. * guix/tests/git.scm, tests/git.scm: New files. * Makefile.am (dist_noinst_DATA): Add guix/tests/git.scm. (SCM_TESTS): Add tests/git.scm.