Skip to content

Commit

Permalink
Phab: enable automatic test suite execution before creating a diff
Browse files Browse the repository at this point in the history
  • Loading branch information
kparal committed Feb 3, 2017
1 parent 3a3409c commit 454373f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .arcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"project_id" : "resultsdb",
"conduit_uri" : "https://phab.qa.fedoraproject.org",
"arc.land.onto.default" : "develop",
"arc.feature.start.default" : "develop"
"arc.feature.start.default" : "develop",
"unit.engine" : "PytestTestEngine"
}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ TARGETDIST:=fc25
BUILDTARGET=fedora-25-x86_64

test: $(VENV)
sh -c "set -e; . $(VENV)/bin/activate; TEST='true' py.test --cov $(SRC) testing/; deactivate"
sh -c "set -e; . $(VENV)/bin/activate; TEST='true' py.test --cov $(SRC); deactivate"

test-ci: $(VENV)
sh -c "set -e; . $(VENV)/bin/activate; TEST='true' py.test --cov-report xml --cov $(SRC) testing/; deactivate"
sh -c "set -e; . $(VENV)/bin/activate; TEST='true' py.test --cov-report xml --cov $(SRC); deactivate"

pylint:
pylint -f parseable $(SRC) | tee pylint.out
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ depending on your local settings.

## Running test suite

You can run this test suite with the following command::
You can run this test suite with the following command (with virtualenv active)::

$ pytest

or with this command (without virtualenv active)::

$ make test

$ py.test --functional testing/
4 changes: 0 additions & 4 deletions pytest.ini

This file was deleted.

14 changes: 14 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This is a common file where different test suites/linters can be configured.
# Phabricator uses this file when running `arc unit` or `arc lint`.

[flake8]
max-line-length=99

[pep8]
max-line-length=99

[pytest]
minversion=2.0
python_functions=test should
python_files=test_* functest_*
addopts=--functional testing/

0 comments on commit 454373f

Please sign in to comment.