Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
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
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
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>
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
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.
|
|
Drop the (many) steps and step functions to run Subplot binaries and
use the ones from lib/runcmd instead
|
|
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.
|
|
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).
|
|
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).
|
|
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).
|
|
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.
|
|
|
|
|
|
|
|
files.{py,yaml} contain re-usable steps for handling files.
runcmd.{py,yaml} contain re-usable steps for running commands and
inspecting results.
|
|
Add acceptance checks for the cleanup functionality, for Python and
Bash templates.
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
This is ugly and panics, but that's acceptable for now. We'll clean
this up later.
|
|
|
|
sp-filter already has a test that requires it to work without a title.
|
|
|
|
|
|
|
|
|