forked from home-assistant/core
Fail if dirty (#16839)
* Fail if dirty * Update check_dirty * Update text * Fix comment * Add -e * Update dirty script
This commit is contained in:
7
script/check_dirty
Executable file
7
script/check_dirty
Executable file
@@ -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
tox.ini
2
tox.ini
@@ -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
|
||||
@@ -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
|
||||
|
Reference in New Issue
Block a user