diff options
author | Frédéric Mangano-Tarumi <fmang@mg0.fr> | 2020-02-29 01:02:42 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2020-02-29 14:57:46 +0100 |
commit | 28ba3f77dcd3741b2cb8dc82f47790e130063da7 (patch) | |
tree | c98b74682a87f635df8c46b8eea7e8d6e72a36a4 | |
parent | bf7c49158c360690f79b31b5a65f0bb42e3fccb4 (diff) | |
download | aur-28ba3f77dcd3741b2cb8dc82f47790e130063da7.tar.gz aur-28ba3f77dcd3741b2cb8dc82f47790e130063da7.tar.xz |
Write test/README.md to help working with tests
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r-- | test/README.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/README.md b/test/README.md new file mode 100644 index 00000000..de7eff18 --- /dev/null +++ b/test/README.md @@ -0,0 +1,37 @@ +Running tests +------------- + +To run all the tests, you may run `make check` under `test/`. + +For more control, you may use the `prove` command, which receives a directory +or a list of files to run, and produces a report. + +Each test script is standalone, so you may run them individually. Some tests +may receive command-line options to help debugging. See for example sharness's +documentation for shell test scripts: +https://github.com/chriscool/sharness/blob/master/README.git + +### Dependencies + +For all the test to run, the following Arch packages should be installed: + +- pyalpm +- python-alembic +- python-bleach +- python-markdown +- python-pygit2 +- python-sqlalchemy +- python-srcinfo + +Writing tests +------------- + +Test scripts must follow the Test Anything Protocol specification: +http://testanything.org/tap-specification.html + +Tests must support being run from any directory. They may use $0 to determine +their location. Python scripts should expect aurweb to be installed and +importable without toying with os.path or PYTHONPATH. + +Tests written in shell should use sharness. In general, new tests should be +consistent with existing tests unless they have a good reason not to. |