Skip to content

Conversation

seldridge
Copy link
Member

@seldridge seldridge commented Feb 7, 2025

Add a trait, WithTestingDirectory, that will automatically create a test directory structure based on Scalatest information. This provides a type class implementation of HasTestingDirectory, but with better Scalatest-specific directories as opposed to generic timestamp-based ones.

This necessarily introduces a provided ("compile only" to Mill) dependency on Scalatest for Chisel. This prevents making all of Chisel pull in Scalatest and relies on the user to load it.

E.g., the included test will create the following directory structure:

build
└── WithTestingDirectorySpec
    └── A-test-suite-mixing-in-WithTestingDirectory
        ├── should-generate-a-directory-structure-derived-from-the-suite-and-test-name
        ├── should-generate-another-directory,-too
        ├── should-handle-CJK-characters,-e.g.,-好猫咪
        └── should-handle-emojis,-e.g.,-🚀

Release Notes

Add WithTestingDirectory Scalatest suite mix-in that automatically sets up a Scalatest-specific directory structure for your tests.

Add a trait, `WithTestingDirectory`, that will automatically create a test
directory structure based on Scalatest information.  This provides a type
class implementation of `HasTestingDirectory`, but with better
Scalatest-specific directories as opposed to generic timestamp-based ones.

This necessarily introduces a provided ("compile only" to Mill) dependency
on Scalatest for Chisel.  This prevents making all of Chisel pull in
Scalatest and relies on the user to load it.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@seldridge seldridge added the Feature New feature, will be included in release notes label Feb 7, 2025
@seldridge seldridge requested a review from jackkoenig February 7, 2025 00:30
@seldridge seldridge requested a review from jackkoenig February 7, 2025 23:05
@seldridge seldridge enabled auto-merge (squash) February 7, 2025 23:07
@seldridge seldridge disabled auto-merge February 7, 2025 23:38
@seldridge seldridge enabled auto-merge (squash) February 7, 2025 23:39
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.

Looks awesome, nice!

@seldridge seldridge merged commit a0a3fe9 into main Feb 7, 2025
15 checks passed
@seldridge seldridge deleted the dev/seldridge/WithTestingDirectory branch February 7, 2025 23:59
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