Skip to content

Enable copying test binaries to a canonical location #4654

Closed

Description

@iand675

General summary/comments (optional)

I would like to be able to store builds of a project's test suites as artifacts for usage on other machines. While stack is able to do this for normal executables, there doesn't seem to be a supported way to do this for test binaries. I can of course dig around in the .stack-work directories for each project, but it's not ideal.

Steps to reproduce

Run stack build --fast --test --no-run-tests --local-bin-path check --copy-bins in a project with tests and look at the contents of the check directory. There will be no test bins for the local packages.

Expected

If --copy-bins doesn't provide the functionality, I'd hope for a separate flag to support easy access to test bins.

Actual

No test bins.

Stack version

$ stack --version
Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository

Activity

  1. mattaudesse commented on Mar 25, 2019

    @mattaudesse
    Member

    Thanks @iand675 - even though there are existing workarounds this seems like it'd be a nice feature to have, and it makes sense given that you can already do this with regular binaries.

    Any chance you'd like to submit a pull request to implement the behavior you're asking for above?

    As it happens, we're in the midst of rolling out a new policy for feature requests:
    https://docs.haskellstack.org/en/stable/maintainers/team_process/#feature-request

  2. EncodePanda commented on Apr 30, 2019

    @EncodePanda

    @malteneuss it seems that the issue is about providing similar functionality to what currently --copy-bins is doing, the change is that if --test is present, then we should also copy the test executables? Do I understand this correctly?

  3. EncodePanda commented on May 1, 2019

    @EncodePanda

    @iand675 ^^ is the above comment correct assumption?

  4. mattaudesse commented on May 3, 2019

    @mattaudesse
    Member

    I think your interpretation is right @rabbitonweb.

    I'm going to close based on the new policy I mentioned above since it's been more than 30 days and nobody has submitted a PR, but I'll add this idea as a feature request on our wishlist wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions