cabal-test: add install_args and build_args role var

This change adds new role vars to enable setting
custom cabal arguments.

Change-Id: I4e4174117608bb76ca6e497687753cfdbc3acc02
This commit is contained in:
Tristan Cacqueray 2021-02-25 19:15:21 +00:00 committed by Andreas Jaeger
parent a31d70e6df
commit 8bde6d3504
2 changed files with 12 additions and 2 deletions

View File

@ -6,6 +6,14 @@ Run the cabal test command.
The cabal target(s) to test. The cabal target(s) to test.
.. zuul:rolevar:: cabal_install_args
Install command line arguments, for example to skip executable using "--lib".
.. zuul:rolevar:: cabal_build_args
Build command line arguments, for example to write hie files using "-fwrite-ide-info".
.. zuul:rolevar:: zuul_work_dir .. zuul:rolevar:: zuul_work_dir
:default: {{ zuul.project.src_dir }} :default: {{ zuul.project.src_dir }}

View File

@ -1,7 +1,9 @@
cabal_target: "" cabal_target: ""
cabal_install_args: ""
cabal_build_args: ""
zuul_work_dir: "{{ zuul.project.src_dir }}" zuul_work_dir: "{{ zuul.project.src_dir }}"
_cabal_install_args: "--only-dependencies {{ cabal_target }}" _cabal_install_args: "--only-dependencies {{ cabal_install_args }} {{ cabal_target }}"
_cabal_build_args: "--enable-tests {{ cabal_target }}" _cabal_build_args: "--enable-tests {{ cabal_build_args }} {{ cabal_target }}"
_cabal_test_args: "{{ cabal_target }}" _cabal_test_args: "{{ cabal_target }}"