gnu: terminology: Run test suite.

* gnu/packages/enlightenment.scm (terminology)[arguments]: Add
configure-flag to build the test binary.  Use custom 'check phase.  Add
phase to remove test binary.
This commit is contained in:
Efraim Flashner 2019-04-07 10:48:49 +03:00
parent 31d663a14b
commit 32c055fd32
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 15 additions and 2 deletions

View File

@ -204,11 +204,24 @@ removable devices or support for multimedia.")
#t))))
(build-system meson-build-system)
(arguments
'(#:phases
`(#:configure-flags '("-Dtests=true")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'set-home-directory
;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
(lambda _ (setenv "HOME" "/tmp") #t)))))
(lambda _ (setenv "HOME" "/tmp") #t))
(replace 'check
(lambda _
(with-directory-excursion
(string-append "../" ,name "-" ,version "/tests")
(invoke "sh" "run_tests.sh" "--verbose"
"-t" "../../build/src/bin/tytest"))))
(add-after 'install 'remove-test-binary
(lambda* (#:key outputs #:allow-other-keys)
;; This file is not meant to be installed.
(delete-file (string-append (assoc-ref outputs "out")
"/bin/tytest"))
#t)))))
(native-inputs
`(("gettext" ,gettext-minimal)
("perl" ,perl)