gnu: reposurgeon: Run the test suite.

* gnu/packages/version-control.scm (reposurgeon)[arguments]: Run tests.
Add #:make-flags and extend the ‘patch-inputs’ phase to find echo.
Add new ‘set-up-test-environment’ phase.
[native-inputs]: Add cvs, git, mercurial, and subversion.
This commit is contained in:
Tobias Geerinckx-Rice 2018-01-25 02:11:14 +01:00
parent 218b94f3b8
commit 33ecc7a4d1
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 20 additions and 6 deletions

View File

@ -1330,9 +1330,9 @@ any project with more than one developer, is one of Aegis's major functions.")
"reposurgeon-add-missing-docbook-files.patch")))) "reposurgeon-add-missing-docbook-files.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:tests? #f ;no test suite distributed `(#:make-flags
#:make-flags (list "ECHO=echo"
(list (string-append "target=" (assoc-ref %outputs "out"))) (string-append "target=" (assoc-ref %outputs "out")))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'patch-inputs (add-after 'unpack 'patch-inputs
@ -1341,8 +1341,10 @@ any project with more than one developer, is one of Aegis's major functions.")
(substitute* "reposurgeon" (substitute* "reposurgeon"
(("/usr/share/zoneinfo") (("/usr/share/zoneinfo")
(string-append tzdata "/share/zoneinfo"))) (string-append tzdata "/share/zoneinfo")))
(substitute* "test/svn-to-svn"
(("/bin/echo") "echo"))
#t))) #t)))
(delete 'configure) (delete 'configure) ; no configure script
(add-before 'build 'fix-docbook (add-before 'build 'fix-docbook
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* (find-files "." "\\.xml$") (substitute* (find-files "." "\\.xml$")
@ -1350,6 +1352,11 @@ any project with more than one developer, is one of Aegis's major functions.")
(string-append (assoc-ref inputs "docbook-xml") (string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook/docbookx.dtd"))) "/xml/dtd/docbook/docbookx.dtd")))
#t)) #t))
(add-before 'check 'set-up-test-environment
(lambda* (#:key inputs #:allow-other-keys)
(let ((tzdata (assoc-ref inputs "tzdata")))
(setenv "TZDIR" (string-append tzdata "/share/zoneinfo"))
#t)))
(add-after 'install 'install-emacs-data (add-after 'install 'install-emacs-data
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(install-file "reposurgeon-mode.el" (install-file "reposurgeon-mode.el"
@ -1359,11 +1366,18 @@ any project with more than one developer, is one of Aegis's major functions.")
`(("python" ,python-wrapper) `(("python" ,python-wrapper)
("tzdata" ,tzdata))) ("tzdata" ,tzdata)))
(native-inputs (native-inputs
`(("asciidoc" ,asciidoc) `( ;; For building documentation.
("asciidoc" ,asciidoc)
("docbook-xml" ,docbook-xml) ("docbook-xml" ,docbook-xml)
("docbook-xsl" ,docbook-xsl) ("docbook-xsl" ,docbook-xsl)
("libxml2" ,libxml2) ("libxml2" ,libxml2)
("xmlto" ,xmlto))) ("xmlto" ,xmlto)
;; For tests.
("cvs" ,cvs)
("git" ,git)
("mercurial" ,mercurial)
("subversion" ,subversion)))
(home-page "http://www.catb.org/~esr/reposurgeon/") (home-page "http://www.catb.org/~esr/reposurgeon/")
(synopsis "Edit version-control repository history") (synopsis "Edit version-control repository history")
(description "Reposurgeon enables risky operations that version-control (description "Reposurgeon enables risky operations that version-control