diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-02-13 09:04:20 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-02-13 12:03:52 +0200 |
commit | eef7b40a392750d9ff86280a64fb0b64f80a4b7e (patch) | |
tree | f73ba6c633153b82e66385e57d8b0983fbf4266f /subplot.md | |
parent | 3ce866aa66a97c177c67a47ba0ba339afd5373bc (diff) | |
download | subplot-eef7b40a392750d9ff86280a64fb0b64f80a4b7e.tar.gz |
feat: allow subplot.md to be used to test an installed Subplot
Diffstat (limited to 'subplot.md')
-rw-r--r-- | subplot.md | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -213,6 +213,54 @@ be good and helpful, writing it will require effort and skill. No tool can replace that. + +## Using this document to verify Subplot works + +This document ("subplot") can be used to verify Subplot itself from +its source tree or an installed Subplot. The default is to test +Subplot from the source tree, and the `./check` script does that. You +can run this in the source tree to build Subplot and then verify it +using itself: + +~~~sh +$ cargo build -q +$ cargo run --bin sp-codegen -- subplot.md -o test.py +$ python3 test.py +... much output +OK, all scenarios finished successfully +$ +~~~ + +To test an installed Subplot, generate the test program, and tell the +test program where Subplot is installed. Again, in the Subplot source +tree: + +~~~sh +$ cargo build -q +$ cargo run --bin sp-codegen -- subplot.md -o test.py +$ python3 test.py --env SUBPLOT_DIR=/usr/local/bin +... much output +OK, all scenarios finished successfully +$ +~~~ + +You can do this with an installed Subplot as well: + +~~~sh +$ cargo clean +$ /usr/local/bin/sp-codegen subplot.md -o test.py +$ python3 test.py --env SUBPLOT_DIR=/usr/local/bin +... much output +OK, all scenarios finished successfully +$ +~~~ + +The generated test program is self-standing, and can be run from +anywhere. However, to generate it you need to be in the Subplot +source tree. You can move it elsewhere after generating it, you if you +prefer. + + # Requirements This chapter lists requirements for Subplot. These requirements are |