summaryrefslogtreecommitdiff
path: root/check
AgeCommit message (Collapse)AuthorFilesLines
2024-02-25fix(check): run cargo build with --offlineLars Wirzenius1-1/+4
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
2024-01-07check: When --strict, do not pass --mercifulDaniel Silverstone1-17/+19
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-12-01tests: generate library docs for share/**/*.yaml in ./checkLars Wirzenius1-1/+38
They go into test-outputs/libdocs so they're easy to extract. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-10-09fix: verify that we generate correct HTMLLars Wirzenius1-1/+4
Sponsored-by: author
2023-09-08tests: don't run website example in --offline modeLars Wirzenius1-1/+2
This allows tests to run in an environment without external networking. Sponsored-by: author
2023-07-20feat(check): allow offline testsLars Wirzenius1-2/+8
Sponsored-by: author
2023-04-24tests: don't check formatting or clippy in MSRV CI jobLars Wirzenius1-4/+8
stable and MSRV versions of rustfmt make different formatting change. Thus, one will fail. We prefer the stable version. Sponsored-by: author
2023-04-08fix(check): drop check for which version of Pandoc we haveLars Wirzenius1-13/+0
Sponsored-by: author
2023-02-14feat! drop support for producing PDF outputLars Wirzenius1-2/+0
We may add this back later, but for now, it's not wanted. Sponsored-by: author
2022-09-06feat! read document metadata from a YAML fileLars Wirzenius1-16/+16
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
2022-04-10feat! treat warnings as errors by defaultLars Wirzenius1-0/+1
Add a --merciful option to subcommands for which this matters. Adjust tests to invoke subplot with that option as necessary. Sponsored-by: author
2022-04-10fix: check capturing stderr of cargo, mixing it with stdoutLars Wirzenius1-2/+5
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
2022-03-29docs: document need for rustfmt, have ./check look for itLars Wirzenius1-0/+1
Sponsored-by: author
2022-03-26(check): Deliberately pick unpleasant TZ for testingDaniel Silverstone1-1/+3
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2022-02-19(check): Determine and use the first template when running docgenDaniel Silverstone1-3/+8
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2022-01-13fix: set TZ in ./checkLars Wirzenius1-1/+1
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
2022-01-01check: Cope with polyglot documentsDaniel Silverstone1-34/+37
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-12-11fix: check for whether clippy is installedLars Wirzenius1-1/+5
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
2021-11-27refactor: ./check runs cargo build/test/etc, for the whole workspaceLars Wirzenius1-22/+16
Drop the "subplotlib" as a "what" possibility for ./check, as it's not needed anymore. Sponsored-by: author
2021-11-27refactor: use build.rs for testing subplotlib subplotsLars Wirzenius1-21/+0
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
2021-11-22fix: tell cargo to be quiet, when running "subplot metadata"Lars Wirzenius1-0/+1
Sponsored-by: author
2021-11-19check: Reimplement get_template() for polyglot documentsDaniel Silverstone1-14/+25
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-11-15test: disable formatting check with blackLars Wirzenius1-1/+1
This is just stupid now. Test passes locally, fails in CI. Sponsored-by: author
2021-11-15test: disable (some) flake8 formatting checksLars Wirzenius1-2/+4
We format with black, and there's no point in flake8 checking things black takes care of. Sponsored-by: author
2021-10-13check: Add support for newer pandoc without pandoc-citeprocDaniel Silverstone1-0/+9
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-08-14test: query Cargo for its target directoryLars Wirzenius1-1/+23
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
2021-07-31test: sleep for a second before running docgenLars Wirzenius1-0/+15
Sponsored-by: author
2021-06-16test: have ./check tail the test.py log file on failureLars Wirzenius1-4/+20
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
2021-05-30test(check): write subplot outputs to ./test-outputsLars Wirzenius1-12/+40
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
2021-05-28check: Rework to run all the subplotlib tests at onceDaniel Silverstone1-3/+8
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-05-28check: Also check the doctests in subplotlibDaniel Silverstone1-0/+3
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-04-13build: check environment for tooling ./check needs, first thingLars Wirzenius1-1/+25
This should cover most things, but if not, we'll add to it later.
2021-04-12Merge branch 'check-no-clean-on-success' into 'main'Daniel Silverstone1-2/+0
build: don't delete generated test program and its log file See merge request larswirzenius/subplot!145
2021-04-12build: don't delete generated test program and its log fileLars Wirzenius1-2/+0
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.
2021-04-09check: Update to use subplot binaryDaniel Silverstone1-4/+6
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-03-11test: add a --strict option to ./check to forbid compiler warningsLars Wirzenius1-3/+11
2021-02-18refactor: rewrite check in Python as check.pyLars Wirzenius1-113/+284
The old shell script became too hard to understand and maintain. This should be clearer and also more robust.
2021-01-10check: Cope with non-embedded resources by passing --resources to docgenDaniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-10resources: Move lib/* to share/python/lib/Daniel Silverstone1-2/+2
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>
2021-01-10resources: Rearrange share/ structure ready for lib importDaniel Silverstone1-3/+3
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>
2021-01-10resource: Switch from 'templates' to 'share'Daniel Silverstone1-4/+4
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>
2020-12-21check: Check subplotlibDaniel Silverstone1-3/+24
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-12-20test: run test program with --log, if PythonLars Wirzenius1-2/+9
This makes it easier to debug failures when ./check fails. For example, when build is run in CI.
2020-12-10check: Use cargo fmt instead of rustfmt directlyDaniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-12-02test: use shellcheck to check most shell codeLars Wirzenius1-1/+7
Split the Bash template into smaller files that don't use templating, and check those file. Fix the couple of things shellcheck complained about.
2020-10-05test: lint lib/*.py in ./checkLars Wirzenius1-1/+1
Finds nothing right now, but good to do for future changes.
2020-09-23test: verify lib/ subplots as wellLars Wirzenius1-1/+1
2020-09-04test(check): run unit tests, flake8 on Python template helpersLars Wirzenius1-0/+15
2020-08-19fix: check to not treat CONTRIBUTING.md as a subplotLars Wirzenius1-1/+1
2020-05-16test: check that all Python code is formatted with blackLars Wirzenius1-0/+6
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.