diff --git a/roles/cabal-test/README.rst b/roles/cabal-test/README.rst index a546de0a9..daf616e07 100644 --- a/roles/cabal-test/README.rst +++ b/roles/cabal-test/README.rst @@ -6,6 +6,14 @@ Run the cabal test command. 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 :default: {{ zuul.project.src_dir }} diff --git a/roles/cabal-test/defaults/main.yaml b/roles/cabal-test/defaults/main.yaml index 7065db023..543a230c5 100644 --- a/roles/cabal-test/defaults/main.yaml +++ b/roles/cabal-test/defaults/main.yaml @@ -1,7 +1,9 @@ cabal_target: "" +cabal_install_args: "" +cabal_build_args: "" zuul_work_dir: "{{ zuul.project.src_dir }}" -_cabal_install_args: "--only-dependencies {{ cabal_target }}" -_cabal_build_args: "--enable-tests {{ cabal_target }}" +_cabal_install_args: "--only-dependencies {{ cabal_install_args }} {{ cabal_target }}" +_cabal_build_args: "--enable-tests {{ cabal_build_args }} {{ cabal_target }}" _cabal_test_args: "{{ cabal_target }}"