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

This commit is contained in:
virusdefender committed 2015-08-05 08:43:15 +08:00
1 parent f04eaae129
commit 44be61dab6
1 file changed
+3
+3
View File
@@ -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