summaryrefslogtreecommitdiff
path: root/share
AgeCommit message (Collapse)AuthorFilesLines
2022-04-10fix: daemon.yaml mark embedded file name as suchLars Wirzenius1-0/+2
Change the binding to tell Subplot that an embedded file is referred to. This silences a warning for correct scenarios, and that will soon matter when warnings are errors by default. Sponsored-by: author
2022-04-01(share): Update Rust template to pass in the step text to .build()Daniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2022-03-26(files.py): Be explicit about mtimes being UTCDaniel Silverstone1-3/+3
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2022-03-25feat: add "file doesn't contain" step to lib/files, Python and RustLars Wirzenius2-0/+16
Sponsored-by: author
2022-03-25refactor(lib/files.yaml): re-order step bindings meaningfullyLars Wirzenius1-61/+71
Keep related/similar steps together. Add comments to act as section headings. Sponsored-by: author
2022-03-16missing wordXipmix1-2/+2
2022-03-16missing wordXipmix1-1/+1
2021-12-27rust/template: Permit non_snake_case for test functionsDaniel Silverstone1-0/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-11-15refactor: format daemon.py using blackLars Wirzenius1-0/+1
Sponsored-by: author
2021-10-28refactor: use simple patterns where possibleLars Wirzenius1-32/+16
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-10-13daemon: Support finding the binary on the PATHDaniel Silverstone1-1/+14
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-10-13templates: Inherit environment for the most partDaniel Silverstone2-17/+3
We inherit all the environment except we override a few variables in order to provide some level of consistency. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-09-25feat: add --run-all (-k) option to Python test runnerLars Wirzenius1-10/+24
This allows the user to run all scenarios even if one fails. Sponsored-by: author
2021-09-16fix: make sure the then branch can never be emptyLars Wirzenius1-0/+1
Sponsored-by: pep.foundation
2021-09-14style: remove unwanted spaces in function definitionLars Wirzenius1-1/+1
Sponsored-by: author
2021-09-07tests: Move Python tests out of share/Daniel Silverstone5-532/+0
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-09-07library: Make files.yaml properly polyglotDaniel Silverstone6-163/+62
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-09-07share: Make runcmd.yaml properly polyglot and commonDaniel Silverstone4-139/+48
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-09-07bindings: Parse polyglot bindingsDaniel Silverstone7-123/+354
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-08-07chore: tell shellcheck it's OKLars Wirzenius1-0/+1
Newer version of shellcheck complains about expanding an unused variable, but since the code is actually only a snippet that will be embedded in the generated output, this is OK. Sponsored-by: author
2021-08-07Merge branch 'main' into 'main'Lars Wirzenius1-4/+16
bash template: Provice captures to cleanups See merge request subplot/subplot!198
2021-08-06bash: Fix asserts preventing cleanupRichard Maw1-2/+2
2021-08-06bash template: Provide captures to cleanupsRichard Maw1-4/+16
2021-08-06fix: Remove double newline from bash envnamesRichard Maw1-1/+1
This doesn't materially change behaviour because words split the same but it's unintentional and against the described behaviour.
2021-08-05bash: Support --env option in generated scriptsRichard Maw1-0/+39
2021-08-05fix: Make bash envnames pure shell againRichard Maw1-1/+1
This should hopefully avoid the previous version's pitfalls by processing the environment line entirely in sed.
2021-08-05fix: bash files implementations inability to readRichard Maw1-3/+4
The template unpacks the embedded files into the datadir before the scendir is created and chdir'd into. Since dict_* assume that the files you want to read are in the current directory this makes them unreadable. Making them operate relative to datadir seemed like the least complicated solution, compared to copying them in or some kind of search path.
2021-07-30Fix flake8 warningsAlexander Batischev1-0/+3
2021-07-29feat(lib/daemon.py): add way to specify env varsAlexander Batischev3-6/+126
2021-07-28fix: use socket/bind/listen for compa with Python < 3.8Lars Wirzenius1-1/+4
Sponsored-by: author
2021-07-28test: log stderr when asserting that daemon didn't fail to startLars Wirzenius1-0/+5
Sponsored-by: author
2021-07-28test: log _daemon namespace for debugging CILars Wirzenius1-0/+1
2021-07-27Fix daemon.py tests' dependence on netcatAlexander Batischev3-18/+31
This commit fixes two intertwined problems: 1) with traditional netcat, `netcat -l 8888` treats "8888" as a host, and never starts listening on port 8888. This is fixed by replacing netcat with a Python script (as suggested by Lars Wirzenius); 2) Subplot's test suite never notices the above problem because, even though it fails to connect to the port, this error is intentionally swallowed by `_daemon_start_soonish()`. This is fixed by adding an explicit check to ensure that the daemon started after all. Furthermore, the scenario description is reworded to make it clear that we *do* expect the daemon to start, it'll just take a while.
2021-07-08chore: make f-strings without placeholders into normal stringsLars Wirzenius2-10/+10
This has no functional effect, but makes linters happy. It is also arguably the right thing to do. Sponsored-by: author
2021-06-11python: Do not sort lists when asserting dictionary equalityDaniel Silverstone1-4/+26
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-06-09feat(lib/daemon.py): split stdout/stderr when logging into linesLars Wirzenius1-8/+11
Sponsored-by: author
2021-05-30test: use assert_dict_eq for better error outputLars Wirzenius1-2/+2
2021-05-30fix: unset environment variablesLars Wirzenius1-1/+1
The previous code had trouble with environment variables that weren't nice for shell. Using Python avoids this. Not an ideal solution, but I can't be bothered do avoid Python now.
2021-05-19subplotlib: Add running in a subdir to runcmdDaniel Silverstone1-0/+8
This adds the bindings and step implementations for running commands in a directory off the datadir. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-05-01test: make Python backend logging nicerLars Wirzenius5-30/+114
Mostly this avoids writing very long lines. Long strings are broken into multiple lines, logged separately. Various other values are also logged as multiple log lines as well.
2021-04-25fix: improve logging in runcmd_runLars Wirzenius1-4/+8
kwargs are logged as a dict. This helps me debug why reference.md fails.
2021-04-24fix: format stringLars Wirzenius1-1/+1
2021-04-23chore: clean up log files from generated Python programsLars Wirzenius4-15/+39
This is a step in the right direction, but may not be enough. We'll see. Multi-line log messages are no multiple lines in in the log file. All but the first one are indented. Dictionaries are listed with one key per line. argv as one item per line. Various log messages that are just noise removed.
2021-04-12Merge branch 'runcmd_cwd' into 'main'Daniel Silverstone3-1/+38
feat(python lib/runcmd): run commands in sub-directory Closes #175 See merge request larswirzenius/subplot!146
2021-04-12fix: log content, as claimed, not regexLars Wirzenius1-1/+1
2021-04-12feat(python lib/runcmd): run commands in sub-directoryLars Wirzenius3-1/+38
2021-02-25feat: directory handling steps for Python lib/filesLars Wirzenius3-0/+80
2021-02-07rust/files: Add bindings for directoriesDaniel Silverstone1-0/+21
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-02-07test(lib/runcmd): verify that runcmd_prepend_to_path worksLars Wirzenius3-0/+44
2021-02-07refactor(lib/daemon.py): reformat with BlackLars Wirzenius1-3/+9
I don't know how this passed ./check previously. I might not have had Black installed, maybe. Anyway, fixed now.