diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-04-04 10:51:43 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-04-11 19:43:42 +0300 |
commit | e6dd3c17b9ec3a24541a9d2f3ae7182170ac81f9 (patch) | |
tree | 19037245493dc3a8afaa4af361e69a4833e1cc26 /subplot.yaml | |
parent | 392ec661bc8db402d1efd2286962e692779c3429 (diff) | |
download | subplot-e6dd3c17b9ec3a24541a9d2f3ae7182170ac81f9.tar.gz |
Change: docgen to not change output needlessly
If the output file wouldn't change, then don't update it.
This is imperfect, since it still needs to produce the output file,
so it can spend a bit of processing power to make no changes. But the
alternative would be to make needless changes.
Diffstat (limited to 'subplot.yaml')
-rw-r--r-- | subplot.yaml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/subplot.yaml b/subplot.yaml index e0fee49..0bb5e23 100644 --- a/subplot.yaml +++ b/subplot.yaml @@ -4,6 +4,9 @@ - given: file (?P<filename>\S+) has modification time (?P<y>\d+)-(?P<mon>\d+)-(?P<d>\d+) (?P<h>\d+):(?P<min>\d+):(?P<s>\d+) function: touch_file +- when: I remember the metadata for (?P<filename>\S+) + function: remember_metadata + - when: I run sp-docgen (?P<md>\S+) -o (?P<output>\S+) function: run_docgen @@ -40,6 +43,9 @@ - then: file (?P<filename>\S+) contains "(?P<pattern>.+)" function: file_contains +- then: (?P<filename>\S+) has the same metadata as before + function: has_same_metadata_as_remembered + - then: output matches /(?P<pattern>.+)/ function: stdout_matches @@ -51,3 +57,6 @@ - then: program finished successfully function: exit_code_zero + +- then: only files (?P<filenames>.+) exist + function: only_these_files_exist |