Skip to content

Add a way to select tests to run using pattern matching #2366

Description

@hacklschorsch

First of all, thank you for this useful and very high quality project!

I am looking for a way to only run the tests I am currently working on.

Probably I am overlooking something?
Is there a way to run a subset of a test suite, for example by using pattern matching on test names?

The best solution I found so far is:

I run the whole suite, grep for the test names I want, write them into a file rules.txt and then run oscap with a parameter like

`$(for i in `cat rules.txt`; do echo -n "--rule $i " ; done)`

yielding a long list of --rule parameters like

--rule xccdf_org.ssgproject.content_rule_file_groupowner_sshd_config --rule xccdf_org.ssgproject.content_rule_file_owner_sshd_config --rule xccdf_org.ssgproject.content_rule_file_permissions_sshd_config [...]

Is there an easier/more succinct way?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions