Commit 63b364ba authored by Thibault Saunier's avatar Thibault Saunier

env: Add a ptvtests alias to more easily run our unit tests from within the env

And document it
parent 01763d11
......@@ -48,6 +48,7 @@ then
# We could get rid of these, but some devs like them.
alias build="ptvenv ninja -C mesonbuild/"
alias binstall="ptvenv ninja -C mesonbuild/ install"
alias ptvtests="ptvenv gst-validate-launcher $PITIVI_REPO_DIR/tests/ptv_testsuite.py"
# Prefer to run some binaries in the sandbox. For example "python3".
for i in `$PITIVI_REPO_DIR/build/flatpak/pitivi-flatpak -q ls /app/bin/`;
......
......@@ -18,18 +18,22 @@ You can run the unit tests with:
ninja -C mesonbuild/ test
```
If you want to run only one particular unit test, use:
If you want to run only one particular unit test, use (assuming you are in
our flatpak based environment):
```
gst-validate-launcher tests/ptv_testsuite.py -t tests.test_project.TestProjectManager.testLoadProjectFailedUnknownFormat
ptvtests tests.test_project.TestProjectManager.testLoadProjectFailedUnknownFormat
```
Listing tests:
```
gst-validate-launcher tests/ptv_testsuite.py -L
ptvtests -L
```
NOTE: If you are not in our environment, replace `ptvtests` with
`gst-validate-launcher tests/ptv_testsuite.py`.)
### Writing unit tests
As mock library we use [Mock](http://www.voidspace.org.uk/python/mock/),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment