Skip to content

Conversation

seldridge
Copy link
Member

Add a new member function to HasTestingDirectory called withSubdirectory. This is a factory of new HasTestingDirectory objects which will return directories nested under the original.

This is intended to fit a very specific use case where a user is passing command line arguments through Scalatest's ConfigMap API (i.e., -D<key>=<value>) and they want to use the information in the ConfigMap to affect the directory structure. Because the ConfigMap is only availalbe inside the test, it cannot be used to set the test name. If a user is not passing arguments via the ConfigMap, then a user can instead structure the ScalaTest scopes in such a way to get the directory structure they want.

Release Notes

Add withSubdirectory factory to HasTestingDirectory type class. This can be used to create new HasTestingDirectory objects with directories under the original. This can be used to affect the directory inside a Scalatest test if the information a user has is only available inside the test (e.g., Scalatest's ConfigMap).

Add a new member function to `HasTestingDirectory` called
`withSubdirectory`.  This is a factory of _new_ `HasTestingDirectory`
objects which will return directories nested under the original.

This is intended to fit a very specific use case where a user is passing
command line arguments through Scalatest's ConfigMap API (i.e.,
`-D<key>=<value>`) _and they want to use the information in the ConfigMap
to affect the directory structure_.  Because the ConfigMap is only
availalbe _inside the test_, it cannot be used to set the test name.  If a
user is not passing arguments via the ConfigMap, then a user can instead
structure the ScalaTest scopes in such a way to get the directory
structure they want.

Co-authored-by: Jack Koenig <koenig@sifive.com>
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Copy link

linux-foundation-easycla bot commented Mar 5, 2025

CLA Not Signed

@seldridge seldridge added the Feature New feature, will be included in release notes label Mar 5, 2025
Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seldridge seldridge merged commit ff328c4 into main Mar 6, 2025
14 of 15 checks passed
@seldridge seldridge deleted the dev/seldridge/testing-add-HasTestingDirectory-withSubdirectory-factory branch March 6, 2025 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants