Skip to content

Expose '--filter-tags <comma-separated-tag-list>' to the setup functions #1006

@debarshiray

Description

@debarshiray

I have a Bats test suite that's inherently disk and network I/O intensive. To cut down on the running times, I have split them into two with tags, so that they can be run in parallel on two CI nodes.

My setup_suite function does a lot of network I/O to avoid repeating them for each test again and again. Depending on which subset of the test suite is being run by --filter-tags <comma-separated-tag-list>, I can avoid doing some work in setup_suite.

If my setup function(s) knew which subset is being run, then I could do the above optimization.

One alternative to having Bats expose this information is to assign the <comma-separated-tag-list> to an environment variable and read it. It's not a terrible alternative, so I am happy to do it. I just thought that I'd throw out this idea and see what everybody else made of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Bash CodeEverything regarding the bash codePriority: HighBroken behavior in specific environments like in parallel mode or only on some operating systemsSize: MediumChanges in the same fileType: Enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions