diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-12-24 00:53:54 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-12-24 00:53:54 +0200 |
commit | cbd36bda2ac351d5f70848db9a0a877cf826b204 (patch) | |
tree | 414f415e28a7c842a283b9da55cad33e20c7f8eb | |
parent | a50106afeecaa0d6bb3effd5baf08f37a3102511 (diff) | |
download | meson-moredocs.tar.gz |
Explain test setup a bit more.moredocs
-rw-r--r-- | docs/markdown/Contributing.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/markdown/Contributing.md b/docs/markdown/Contributing.md index 354bf62bb..f59f3bc20 100644 --- a/docs/markdown/Contributing.md +++ b/docs/markdown/Contributing.md @@ -32,6 +32,33 @@ basis. Sometimes it may be easier to write the test than convince the maintainers that one is not needed. Exercise judgment and ask for help in problematic cases. +The tests are split into two different parts: unit tests and full +project tests. To run all tests, execute `./run_tests.py`. Unit tests +can be run with `./run_unittests.py` and project tests with +`./run_project_tests.py`. + +Each project test is a standalone project that can be compiled on its +own. They are all in `unit tests` subdirectory. The simplest way to +run a single project test is to do something like `./meson.py test\ +cases/common/1\ trivial builddir`. + +The test cases in the `common` subdirectory are meant to be run always +for all backends. They should only depend on C and C++, without any +external dependencies such as libraries. Tests that require those are +in the `test cases/frameworks` directory. If there is a need for an +external program in the common directory, such as a code generator, it +should be implemented as a Python script. The goal of test projects is +also to provide sample projects that end users can use as a base for +their own projects. + +All project tests follow the same pattern: they are compiled, tests +are run and finally install is run. Passing means that building and +tests succeed and installed files match the `installed_files.txt` file +in the test's source root. Any tests that require more thorough +analysis, such as checking that certain compiler arguments can be +found in the command line or that the generated pkg-config files +actually work should be done with a unit test. + ## Documentation The `docs` directory contains the full documentation that will be used |