summaryrefslogtreecommitdiff
path: root/subplot.yaml
AgeCommit message (Collapse)AuthorFilesLines
2023-12-27bindings: Add types for all relevant bindings which were missing themDaniel Silverstone1-0/+16
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-06-01chore: drop now-unused step for sleeping for a secondLars Wirzenius1-12/+0
This was always a kludge, and we no longer use it anywhere, so offski with it. May it never return! Nac Mac Feegle! The Wee Free Men! Nae sleep! Nae wait! We willna' be slowed again! Sponsored-by: author
2022-01-01subplotlib: Run subplot.md in Rust tooDaniel Silverstone1-0/+31
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-10-28refactor: use simple patterns where possibleLars Wirzenius1-4/+2
Many of our bindings files were originally written before Subplot supported simple patterns, and so they use regex patterns even when a simple pattern would do. Simplify bindings to use simple patterns when possible, to make life easier for future maintainers. Sponsored-by: author
2021-09-07bindings: Parse polyglot bindingsDaniel Silverstone1-17/+46
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-05-01subplot: Add delay step in some scenariosDaniel Silverstone1-0/+8
In order to work on filesystems where the time granularity is not sub-second, some scenarios need to wait a bit. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-04-24subplot.md: Document scenario language a bit moreDaniel Silverstone1-0/+11
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-10-01fix: add wrapper to add -t option to sp-codegen, when run by subplotLars Wirzenius1-0/+1
This allows the tests to add the option to use the templates from the source tree, and don't use an installed Subplot, or require one to be installed.
2020-09-28refactor(subplot.{py,yaml}): use steps/functions from lib/runcmdLars Wirzenius1-50/+0
Drop the (many) steps and step functions to run Subplot binaries and use the ones from lib/runcmd instead
2020-09-28fix(subplot.{md,py,yaml}): run Subplot binaries from the source treeLars Wirzenius1-0/+3
This is akin to installing them to a directory in PATH. Instead of doing that, we amend PATH so that the directory in the source tree with the binaries are in there. This adds a "given an installed subplot" step to every scenario that needs to run a Subplot binary.
2020-09-28refactor(subplot.{md,yaml}): rename steps to check outputLars Wirzenius1-2/+2
The old steps "then output matches /.../" and "stderr matches /.../" come originally from runcmd.yaml. For lib/runcmd.yaml they have been replaced with 'then stdout contains "..."' and 'stderr contains "..."'. Change all uses of the old wording to the new one. Don't use lib/runcmd.yaml yet, but keep the binding subplot.yaml to bind the new wording to the function from lib/runcmd.py (which it did before already, so no change).
2020-09-28refactor(subplot.{md,yaml}): rename step to check for successLars Wirzenius1-1/+1
The old step "then program finished successfully" comes originally from runcmd.yaml. For lib/runcmd.yaml it has been replaced with "then command is successful". Change all uses of the old wording to the new one. Don't use lib/runcmd.yaml yet, but keep the binding subplot.yaml to bind the new wording to the function from lib/runcmd.py (which it did before already, so no change).
2020-09-28refactor(subplot.{md,yaml}): rename step step to check for failureLars Wirzenius1-1/+1
The old step "then exit code is non-zero" comes originally from runcmd.yaml. For lib/runcmd.yaml it has been replaced with "then command fails". Change all uses of the old wording to the new one. Don't use lib/runcmd.yaml yet, but keep the binding subplot.yaml to bind the new wording to the function from lib/runcmd.py (which it did before already, so no change).
2020-09-28refactor(subplot.{md,py,yaml}): use step functions from lib/runcmd.pyLars Wirzenius1-0/+14
Use the Python functions from lib/runcmd.py instead of the ones from ./runcmd.py. This changes some bindings in subplot.yaml to use functions from lib/runcmd.py, and changes some step functions in subplot.py to be defined in terms of functions in lib/runcmd.py. The actual steps in subplot.md are not changed and no bindings from lib/runcmd.yaml are yet used. Some bindings that used to come from runcmd.yaml are here added to subplot.yaml. This is temporary change that will be undone later by replacing those bindings with ones from lib/runcmd.yaml, but doing that in this commit would make it bigger and harder to follow.
2020-06-08feat: add sp-extract for extracting data files from subplotsLars Wirzenius1-0/+3
2020-05-24test: add scenarios to verify newline adding to embedded filesLars Wirzenius1-0/+10
2020-05-24test(sp-meta): amend scenario to also test JSON outputLars Wirzenius1-0/+6
2020-05-20refactor: move things from subplot.{py,yaml} to separate filesLars Wirzenius1-51/+0
files.{py,yaml} contain re-usable steps for handling files. runcmd.{py,yaml} contain re-usable steps for running commands and inspecting results.
2020-05-17feat(subplot.md): add acceptance criteria for cleanup functionalityLars Wirzenius1-2/+14
Add acceptance checks for the cleanup functionality, for Python and Bash templates.
2020-05-08subplot.yaml: Add stderr matches bindingDaniel Silverstone1-0/+4
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-08Add: scenarios for test programs running only chosen scenariosLars Wirzenius1-1/+14
2020-05-02Change: produce docgen output if missing or older than any sourceLars Wirzenius1-0/+6
Source files are: * the markdown file * the bindings, functions, and bibliography files listed in YAML metadata * any included images in the markdown The template file is not considered: it's only relevant for codegen. The docgen binary is not considered, either, for now, because reliably finding the binary is difficult.
2020-05-02Fix: check that stdout matches expected patternLars Wirzenius1-3/+0
The stdout_matches function in subplot.py was lacking an assert. This meant all steps checking that stdout contained a desired string passed, even when they shouldn't have. I did the original changes sloppily: I should've verified the test fails with a wrong pattern before finishing the stdout_matches function. Also, fix scenarios that were passing because of this, but shouldn't have been. Further, fixing this revealed another problem: the way subplot.md was checking that the simple and regex patterns were working was broken: they were using a step that looked for specific output to make sure a nested subplot was calling its function, but doing that in a way that assumed specific output. This wasn't just broken, but also very confusing to debug. This commit changes things so the generic stdout matching step is used instead and is clearer to me.
2020-04-19Add: acceptance criteria for simple patternsLars Wirzenius1-12/+22
This adds scenarios for regex patterns capture and simple pattern capture from scenario steps, and additionally makes use of simple patterns everywhere possible in the examples.
2020-04-11Change: docgen to not change output needlesslyLars Wirzenius1-0/+9
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.
2020-04-10Change: check for embedded files with non-unique namesLars Wirzenius1-0/+3
This is ugly and panics, but that's acceptable for now. We'll clean this up later.
2020-02-26Add: scenarios for testing document dateLars Wirzenius1-0/+9
2020-02-15Change: require docgen, codegen to fail if document has no titleLars Wirzenius1-0/+9
sp-filter already has a test that requires it to work without a title.
2020-01-11Add: scenario for testing sp-metaLars Wirzenius1-0/+6
2020-01-11Add: scenarios for testing sp-filter, dot and roadmap graphsLars Wirzenius1-1/+6
2020-01-06Add: progress reporting in generated test programLars Wirzenius1-9/+9
2020-01-05Add: Subplot document for Subplot itselfLars Wirzenius1-0/+21