Skip to content

run-make-support: add helpers for fs operations #125728

Closed
@jieyouxu

Description

@jieyouxu

Noticed in #125683 (comment), we should add helpers for:

  • fs operation wrappers that panic on failure and provide good context to aid debugging
    • e.g. wrap std::fs::remove_file(path) with run_make_support::fs::remove_file(path) but on panic shows the path we're trying to remove, so the test writer doesn't forget to check the result of fs operations.

cc @Oneirical in case you want to work on this.

UPDATE: we reworked rmake.rs tests to not run in the test sources directory so tmp_dir().join() is no longer relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-run-makeArea: port run-make Makefiles to rmake.rsA-testsuiteArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions