Skip to content

std.testing: make tmpDir more efficient #25756

@andrewrk

Description

@andrewrk

Extracted from #25592.

By integrating more with the test runner, std.testing.tmpDir can avoid a bunch of redundant work done by many unit tests.

The API can be made more convenient - give me a temporary file, give me a temporary directory, while having the test runner manage cleanup.

This can dovetail nicely with fuzzing by making the overhead code not part of the hot fuzzing loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingImplementing this issue could cause existing code to no longer compile or have different behavior.enhancementSolving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions