text: # tox (https://tox.readthedocs.io/) is a tool for running tests
  # in multiple virtualenvs. This configuration file will run the
  # test suite on all supported python versions. To use it, "pip install tox"
  # and then run "tox" from this directory.
  
  # Configuration file for quick / short tests.
  # Use tox_slow.ini for longer running tests.
  
  [tox]
  envlist = py35, py36, py37, py38, flake8
  
  [testenv]
  # make sure those variables are passed down; you should define 
  # either explicitly the RDIFF_TEST_* variables or rely on the current
  # user being correctly identified (which might not happen in a container)
  passenv = RDIFF_TEST_* RDIFF_BACKUP_*
  setenv =
  # paths for coverage must be absolute so that sub-processes find them
  # even if they're started from another location.
  	COVERAGE_FILE = {envlogdir}/coverage.sqlite
  	COVERAGE_PROCESS_START = {toxinidir}/tox.ini
  deps =
  	importlib-metadata ~= 1.0 ; python_version < "3.8"
  	pyxattr
  	pylibacl
  	coverage
  # whitelist_externals =
  commands_pre =
  	rdiff-backup --version
  # must be the first command to setup the test environment
  	python testing/commontest.py
  	coverage erase
  # write the hook file which will make sure that coverage is loaded
  # also for sub-processes, like for "client/server" rdiff-backup
  	python -c 'with open("{envsitepackagesdir}/coverage.pth","w") as fd: fd.write("import coverage; coverage.process_startup()\n")'
  commands =
  	coverage run testing/ctest.py
  	coverage run testing/timetest.py
  	coverage run testing/librsynctest.py
  	coverage run testing/statisticstest.py
  	coverage run testing/user_grouptest.py
  	coverage run testing/setconnectionstest.py
  	coverage run testing/iterfiletest.py
  	coverage run testing/longnametest.py
  	coverage run testing/robusttest.py
  	coverage run testing/connectiontest.py
  	coverage run testing/incrementtest.py
  	coverage run testing/hardlinktest.py
  	coverage run testing/eas_aclstest.py
  	coverage run testing/FilenameMappingtest.py
  	coverage run testing/fs_abilitiestest.py
  	coverage run testing/hashtest.py
  	coverage run testing/selectiontest.py
  	coverage run testing/metadatatest.py
  	coverage run testing/rpathtest.py
  	coverage run testing/rorpitertest.py
  	coverage run testing/rdifftest.py
  	coverage run testing/securitytest.py
  	coverage run testing/killtest.py
  	coverage run testing/backuptest.py
  	coverage run testing/comparetest.py
  	coverage run testing/regresstest.py
  	coverage run testing/restoretest.py
  	coverage run testing/cmdlinetest.py
  	coverage run testing/rdiffbackupdeletetest.py
  	coverage run testing/errorsrecovertest.py
  # can only work on OS/X TODO later
  #	coverage run testing/resourceforktest.py
  
  # combine all coverage results and show the summary
  	coverage combine
  	coverage report
  
  [testenv:flake8]
  deps =
  	flake8
  commands_pre=
  commands =
  	flake8 setup.py src testing tools
  
  [flake8]
  ignore =
  	E501 # line too long (86 > 79 characters)
  	W503 # line break before binary operator
  exclude =
      .git
      .tox
      .tox.root
      __pycache__
      build
  max-complexity = 20
  
  [coverage:run]
  parallel = True
  
  [coverage:report]
  include =
  	*/rdiff_backup/*
  skip_empty = True
  fail_under = 80
  sort = Cover
  