1# tox (https://tox.readthedocs.io/) is a tool for running tests
2# in multiple virtualenvs. This configuration file will run the
3# test suite on all supported python versions. To use it, "pip install tox"
4# and then run "tox" from this directory.
5
6# Configuration file for tests as root.
7# Call with `sudo tox -c tox_root.ini`
8# Use tox_slow.ini for longer running tests and tox.ini for normal tests.
9
10[tox]
11envlist = py35, py36, py37, py38
12# some directories to avoid creating files with root rights that
13# couldn't be overwritten by the non-root tests:
14toxworkdir = {toxinidir}/.tox.root
15isolated_build_env = .package.root
16
17[testenv]
18# make sure those variables are passed down; you should define them
19# either implicitly through usage of sudo (which defines the SUDO_* variables),
20# or explicitly the RDIFF_* ones:
21passenv = SUDO_USER SUDO_UID SUDO_GID RDIFF_TEST_* RDIFF_BACKUP_*
22deps =
23    setuptools
24    pyxattr
25    pylibacl
26#whitelist_externals = env
27commands_pre =
28    rdiff-backup --version
29    # must be the first command to setup the test environment
30    python testing/commontest.py
31commands =
32    python testing/roottest.py
33