summaryrefslogtreecommitdiff
path: root/check
AgeCommit message (Collapse)AuthorFilesLines
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.
2020-05-02Change: ./check to be quiet by defaultLars Wirzenius1-7/+30
I got tired of ./check output being verbose, so this changes it to be silent unless there's a problem. An argument of -v or --verbose or verbose makes it verbose again.
2020-01-12Change: make ./check be more verbose and also build all targetsLars Wirzenius1-2/+3
2020-01-12Add: explicit OK message to end of checkLars Wirzenius1-0/+2
2020-01-10Fix: check only runs clippy if it's availableLars Wirzenius1-1/+4
2020-01-10Change: run ./check in Debian package buildLars Wirzenius1-1/+4
2020-01-10Change: format docs in ./checkLars Wirzenius1-8/+12
2020-01-10Add: script to test all examplesLars Wirzenius1-0/+22