Skip to content

Make unit tests entirely contained to the project #1612

Open
@Fryuni

Description

@Fryuni

What should it do?

Some unit tests rely on the running user having permission to read and write files from outside of the project ($HOME/.config/wtf/log.txt for example).

Hermetic build systems, such as Bazel and Nix, execute tests without such permissions since everything should be reproducible, and touching files outside of the project breaks that clause. Currently building WTF with such tools require either skipping the test phase or manually ignoring every test that relies on such permissions.

My suggestion is to inject the path for such cases so test runs can read/write to files under testdata.

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