challenge: Support "--diff=diffoscope".
authorLudovic Courtès <ludo@gnu.org>
Sat, 7 Dec 2019 16:37:08 +0000 (17:37 +0100)
committerLudovic Courtès <ludo@gnu.org>
Thu, 12 Dec 2019 16:56:58 +0000 (17:56 +0100)
commit828a39da68a9169ef1d9f9ff02a1c66b1bcbe884
tree7b92b771e08dc03dc408eacbbe41de2c5df34304
parent5208db3a526e3fcdb8473d9bab8afe498c5f3f76
challenge: Support "--diff=diffoscope".

* guix/scripts/challenge.scm (call-with-nar): New procedure.
(narinfo-contents): Express in terms of 'call-with-nar'.
(call-with-mismatches, report-differing-files/external): New
procedures.
(%diffoscope-command): New variable.
(%options): Support "diffoscope" and a string starting with "/".
* tests/challenge.scm (call-mismatch-test): New procedure.
("differing-files"): Rewrite in terms of 'call-mismatch-test'.
("call-with-mismatches"): New test.
* doc/guix.texi (Invoking guix challenge): Document it.
doc/guix.texi
guix/scripts/challenge.scm
tests/challenge.scm