Skip to content

Avoid re-running tests #2191

Open
Open
@jonathanpallant

Description

@jonathanpallant

Problem

I have a book with lots of code examples. Running mdbook test takes 7 seconds, even though I'm not changing most of my chapters and only working on one file.

Proposed Solution

I would like mdbook test to cache somewhere information about the files it has tested so it can skip the tests if the file is unchanged.

It could write to something like a .mdbook-test file in the same directory as the book.toml file noting the filename, sha256sum and timestamp of each file it has tested. If the file is newer, or different, the test should be run. If the file is of the recorded age and has the recorded checksum, it should print "Testing chapter : unchanged so tests skipped".

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TestsArea: `mbdook test` related testsC-enhancementCategory: Enhancement or feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions