修改 runtest.sh,只有在测试成功的情况下才进行测试覆盖率分析和打开结果页面

This commit is contained in:
virusdefender
2015-08-05 08:43:15 +08:00
parent f04eaae129
commit 44be61dab6

View File

@@ -1,4 +1,7 @@
#!/usr/bin/env bash
coverage run --source='.' manage.py test
coverage html
open htmlcov/index.html
test_result=$?
if [ "$test_result" -eq 0 ];then
coverage html
open htmlcov/index.html
fi