Age | Commit message (Collapse) | Author | Files | Lines |
|
This is needed for running the test suite under Ambient, without
network access.
Other invocations of cargo are already doing this, but I had missed
this invocation previously.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Sponsored-by: author
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
They go into test-outputs/libdocs so they're easy to extract.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Sponsored-by: author
|
|
Sponsored-by: author
|
|
This allows tests to run in an environment without external
networking.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
stable and MSRV versions of rustfmt make different formatting change.
Thus, one will fail. We prefer the stable version.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
We may add this back later, but for now, it's not wanted.
Sponsored-by: author
|
|
This is a huge change all in one commit, sorry. However, as it changes
a fundamental part of the command line interface (namely, what
constitutes as the input file), there doesn't seem a way to break this
into a tidy series of small commits.
Most of the diff is in subplot.md, where every scenario that invokes
Subplot needs multiple changes, thus touching much of the file.
The overall change is that where we previously had document metadata
in embedded YAML in the Markdown file, we now have it in a separate
YAML file. The Markdown file is named in the YAML file.
We still parse the Markdown with Pandoc for everything, except
codegen. Switching from Pandoc to pulldown_cmark for parsing will be
another big change that I didn't want to include in this huge change
set.
Sponsored-by: author
|
|
Add a --merciful option to subcommands for which this matters. Adjust
tests to invoke subplot with that option as necessary.
Sponsored-by: author
|
|
When ./check runs a command, in the runcmd_unchecked method, it
collects by default stdout and stderr into on string. The two outputs
get mixed. So far, this has been OK, but I'm about to make change
where it won't be OK. The get_template method needs to be able to
distinguish between stdout and stderr, when I change Subplot to write
warnings into stderr.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
If we care about time zones, we should explicitly test every one we
care about. Meanwhile, sometimes tests fail for me unless TZ is UTC.
Sponsored-by: author
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
Previously, "cargo --list" had "clippy" on its own line, with no
description. Now it has a description, so we need to change how we
look for clippy.
Sponsored-by: author
|
|
Drop the "subplotlib" as a "what" possibility for ./check, as it's not
needed anymore.
Sponsored-by: author
|
|
A bit of dog-fooding: use subplot-build to test subplotlib.
Add a subplotlib/build.rs script to generate test code in Rust for the
subplotlib/*.md subplots. The generated code is included in
tests/*.rs, and run with "cargo test". Drop the same functionality
from the ./check script..
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
This is just stupid now. Test passes locally, fails in CI.
Sponsored-by: author
|
|
We format with black, and there's no point in flake8 checking things
black takes care of.
Sponsored-by: author
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
Run "cargo metadata" to get the location of the Cargo "target"
directory. The location of the directory is configurable by the user,
so we can't assume it's "target" in the source tree.
It turned out that running "cargo metadata" in a scenario didn't work
well, because cargo wants to use some files from the user's home
directory, and for scenarios, that's changed (by setting $HOME). To
work around this, the generated test program now requires SUBPLOT_DIR
to be set when running the generated Python test programs. The
"./check" script does that.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
For each subplot, if running the test program fails, the last 100
lines of the log file is output. For the reference.md subplot, the
last 100 lines of the log file for the test program from the
referenced subplot is output.
This makes it easier to debug failures in CI.
Sponsored-by: author
|
|
Put output files into ./test-outputs so they don't clutter the source
tree.
Also, tell Python to not write byte code files, by setting
PYTHONDONTWRITEBYTECODE=1 in the environment. This should prevent
src/resource.rs from triggering a rebuild after ./check, because
share/python/lib doesn't get modified by ./check anymore.
Sponsored-by: author
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
This should cover most things, but if not, we'll add to it later.
|
|
build: don't delete generated test program and its log file
See merge request larswirzenius/subplot!145
|
|
Even if the test run is successful, it's good to be able to inspect
the files afterwards. They're in .gitignore, so shouldn't bother
anyone.
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
|
|
The old shell script became too hard to understand and maintain. This
should be clearer and also more robust.
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
This is part of the move to embed subplot library files into the
binary to permit easy `cargo install` later.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
In readiness for the lib/ import, rearrange from a structure of
share/templates/$lang/... to be share/$lang/template/...
This will permit share/$lang/lib/ to exist later.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
In a general sense, we will want to have more than just template
files as resources. This shifts from the concept that the only
thing resource-wise that subplot has is templates, to a more general
shared resources concept without a default path beyond CWD.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
This makes it easier to debug failures when ./check fails. For
example, when build is run in CI.
|
|
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
Split the Bash template into smaller files that don't use templating,
and check those file. Fix the couple of things shellcheck complained
about.
|
|
Finds nothing right now, but good to do for future changes.
|
|
|
|
|
|
|
|
Skip the Python code template, and test.py which the test suite
creates. The template isn't Python, and test.py is generated from the
template, so both are pointless to check with black.
|