Updated build instructions for running tests

This commit is contained in:
Micah Lee 2020-08-21 19:41:29 -04:00
parent 9b78f23ca3
commit 24b7316b3e
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -264,6 +264,8 @@ This will prompt you to codesign three binaries and execute one unsigned binary.
# Running tests # Running tests
## Tests in macOS and Linux
OnionShare includes PyTest unit tests. To run tests, you can run `pytest` against the `tests/` directory. OnionShare includes PyTest unit tests. To run tests, you can run `pytest` against the `tests/` directory.
```sh ```sh
@ -276,20 +278,20 @@ You can run GUI tests like this:
poetry run ./tests/run.sh --rungui poetry run ./tests/run.sh --rungui
``` ```
If you would like to also run the GUI unit tests in 'tor' mode, start Tor Browser in the background, then run: If you're using Linux, you can also choose to wrap the tests in `xvfb-run` so that a ton of OnionShare windows don't pop up on your desktop (you may need to install the `xorg-x11-server-Xvfb` package), like this:
```sh
poetry run ./tests/run.sh --rungui --runtor
```
Keep in mind that the Tor tests take a lot longer to run than local mode, but they are also more comprehensive.
You can also choose to wrap the tests in `xvfb-run` so that a ton of OnionShare windows don't pop up on your desktop (you may need to install the `xorg-x11-server-Xvfb` package), like this:
```sh ```sh
xvfb-run poetry run ./tests/run.sh --rungui xvfb-run poetry run ./tests/run.sh --rungui
``` ```
## Tests in Windows
You can run this Windows batch script to run all of the CLI and GUI tests.
```
poetry run tests\run.bat
```
# Making releases # Making releases
This section documents the release process. Unless you're a core OnionShare developer making a release, you'll probably never need to follow it. This section documents the release process. Unless you're a core OnionShare developer making a release, you'll probably never need to follow it.