修改 runtest.sh,只有在测试成功的情况下才进行测试覆盖率分析和打开结果页面
This commit is contained in:
1 parent
f04eaae129
commit
44be61dab6
1 file changed
+3
@@ -1,4 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
coverage run --source='.' manage.py test
|
coverage run --source='.' manage.py test
|
||||||
|
test_result=$?
|
||||||
|
if [ "$test_result" -eq 0 ];then
|
||||||
coverage html
|
coverage html
|
||||||
open htmlcov/index.html
|
open htmlcov/index.html
|
||||||
|
fi
|
||||||
Reference in new issue
Block a user