2015-05-05 19:58:25 -04:00
|
|
|
Testing
|
|
|
|
=======
|
|
|
|
|
2018-03-27 20:56:55 -04:00
|
|
|
Dotbot testing code uses [Vagrant] to run all tests inside a virtual machine to
|
|
|
|
have tests be completely isolated from the host machine.
|
2015-05-05 19:58:25 -04:00
|
|
|
|
2017-05-31 16:19:57 -04:00
|
|
|
Installing the Test environnement
|
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
### Debian-based distributions
|
|
|
|
|
|
|
|
- Install the test requirements
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo apt install vagrant virtualbox
|
|
|
|
```
|
|
|
|
|
|
|
|
- Install Dotbot dependencies
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git submodule update --init --recursive
|
|
|
|
```
|
|
|
|
|
2018-03-27 17:42:42 -04:00
|
|
|
### macOS
|
|
|
|
|
|
|
|
- Install the test requirements
|
2018-03-27 20:56:55 -04:00
|
|
|
- [VirtualBox]
|
|
|
|
- [Vagrant]
|
2018-03-27 17:42:42 -04:00
|
|
|
|
|
|
|
- Install Dotbot dependencies
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git submodule update --init --recursive
|
|
|
|
```
|
|
|
|
|
2015-05-05 19:58:25 -04:00
|
|
|
Running the Tests
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
Before running the tests, the virtual machine must be running. It can be
|
|
|
|
started by running `vagrant up`.
|
|
|
|
|
|
|
|
The test suite can be run by running `./test`. Selected tests can be run by
|
|
|
|
passing paths to the tests as arguments to `./test`.
|
|
|
|
|
2015-10-22 21:46:28 -04:00
|
|
|
Tests can be run with a specific Python version by running `./test --version
|
|
|
|
<version>` - for example, `./test --version 3.4.3`.
|
|
|
|
|
2015-05-05 19:58:25 -04:00
|
|
|
When finished with testing, it is good to shut down the virtual machine by
|
|
|
|
running `vagrant halt`.
|
|
|
|
|
2018-03-27 20:56:55 -04:00
|
|
|
[VirtualBox]: https://www.virtualbox.org/wiki/Downloads
|
|
|
|
[Vagrant]: https://www.vagrantup.com/
|