Skip to content

Commit

Permalink
Fail if dirty (home-assistant#16839)
Browse files Browse the repository at this point in the history
* Fail if dirty

* Update check_dirty

* Update text

* Fix comment

* Add -e

* Update dirty script
  • Loading branch information
balloob authored Sep 25, 2018
1 parent 7de0e1e commit 5a22e7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions script/check_dirty
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
[[ -z $(git ls-files --others --exclude-standard) ]] && exit 0

echo -e '\n***** ERROR\nTests are leaving files behind. Please update the tests to avoid writing any files:'
git ls-files --others --exclude-standard
echo
exit 1
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ whitelist_externals = /usr/bin/env
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
commands =
pytest --timeout=9 --duration=10 {posargs}
{toxinidir}/script/check_dirty
deps =
-r{toxinidir}/requirements_test_all.txt
-c{toxinidir}/homeassistant/package_constraints.txt
Expand All @@ -29,6 +30,7 @@ whitelist_externals = /usr/bin/env
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
commands =
pytest --timeout=9 --duration=10 --cov --cov-report= {posargs}
{toxinidir}/script/check_dirty
deps =
-r{toxinidir}/requirements_test_all.txt
-c{toxinidir}/homeassistant/package_constraints.txt
Expand Down

0 comments on commit 5a22e7d

Please sign in to comment.