gnu: tryton: Allow disabling the test suite.

* gnu/packages/tryton.scm
  (tryton-phases): Respect 'tests?' in the 'check' phase.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Maxime Devos 2021-05-24 22:36:06 +02:00 committed by Ludovic Courtès
parent 0ab7796f4d
commit 416f7843c4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -150,15 +150,16 @@ (define (tryton-phases module . extra-arguments)
If present, pass EXTRA-ARGUMENTS to runtest as well."
`(modify-phases %standard-phases
(replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
(let ((runtest
(string-append
(assoc-ref inputs "trytond")
"/lib/python"
,(version-major+minor (package-version python))
"/site-packages/trytond/tests/run-tests.py")))
(add-installed-pythonpath inputs outputs)
(invoke "python" runtest "-m" ,module ,@extra-arguments))))))
(when tests?
(add-installed-pythonpath inputs outputs)
(invoke "python" runtest "-m" ,module ,@extra-arguments)))))))
(define (tryton-arguments module . extra-arguments)
"Like tryton-phases, but directly return all arguments for