Updated release data and mkrelease support, which calculates the release coverage snapshot without invoking tests that developers won't ordinarily be able to run on their laptops/work machines.

- Legacy-Id: 9339
This commit is contained in:
Henrik Levkowetz 2015-03-25 20:06:12 +00:00
parent 01b0ca8efb
commit 04558234cb
3 changed files with 58 additions and 14 deletions

View file

@ -167,15 +167,15 @@ DEV="$(printf %d.%d.%d.dev0 $MAJOR $MINOR $NEXT)"
#cd $DIR ??
note "Running the tests suite and writing release coverage data ..."
$do ietf/manage.py test --settings=ietf.settings_sqlitetest --save-version-coverage=$VER
$do ietf/manage.py test --settings=ietf.settings_releasetest --save-version-coverage=$VER
note "Committing the release coverage data ..."
$do svn commit release-coverage.json -m "Code coverage data for release $VER"
note "Checking that there's a recent test-crawler log"
touch -d $RDATE .svn/.latest-commit
TCLOG=$(ls -t ../test-crawl-*.log | head -n 1)
[ $TCLOG -nt .svn/.latest-commit ] || die "Looked for ../test-crawl-*.log, but didn't find one newer than the latest repository commit ($RDATE)"
# note "Checking that there's a recent test-crawler log"
# touch -d $RDATE .svn/.latest-commit
# TCLOG=$(ls -t ../test-crawl-*.log | head -n 1)
# [ $TCLOG -nt .svn/.latest-commit ] || die "Looked for ../test-crawl-*.log, but didn't find one newer than the latest repository commit ($RDATE)"
note "Checking that changelog information is available"
changes=$( sed -n "/^$PROJ ($VER.*)/,/^ -- /p" changelog )

View file

@ -0,0 +1,44 @@
# Standard settings except we use SQLite, this is useful for speeding
# up tests that depend on the test database, try for instance:
#
# ./manage.py test --settings=settings_sqlitetest doc.ChangeStateTestCase
#
from settings import * # pyflakes:ignore
# Workaround to avoid spending minutes stepping through the migrations in
# every test run. The result of this is to use the 'syncdb' way of creating
# the test database instead of doing it through the migrations. Taken from
# https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09
## To be removed after upgrade to Django 1.8 ##
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
# The string below is significant. It has to include the value of
# django.db.migrations.loader.MIGRATIONS_MODULE_NAME. Used by django
# 1.7 code in django.db.migrations.loader.MigrationLoader to
# determine whether or not to run migrations for a given module
from django.db.migrations.loader import MIGRATIONS_MODULE_NAME
return "no " + MIGRATIONS_MODULE_NAME
MIGRATION_MODULES = DisableMigrations()
# Set the SKIP_* variables to True in order to disable tests which won't
# normally run on developer's laptop, in order to not create
# release-coverage.json data which sets people up for test suite failures on a
# clean checkout
SKIP_DOT_TO_PDF = True
SKIP_SELENIUM = True
DATABASES = {
'default': {
'NAME': 'test.db',
'ENGINE': 'django.db.backends.sqlite3',
},
}

View file

@ -6494,9 +6494,9 @@
},
"5.13.0": {
"code": {
"coverage": 0.6796908049071262,
"coverage": 0.6783063492673922,
"covered": {
"ietf/__init__": 0.0,
"ietf/__init__": 1.0,
"ietf/api/__init__": 0.7012987012987013,
"ietf/api/management/__init__": 1.0,
"ietf/api/management/commands/__init__": 1.0,
@ -6570,7 +6570,7 @@
"ietf/group/edit": 0.862876254180602,
"ietf/group/features": 1.0,
"ietf/group/feeds": 0.9736842105263157,
"ietf/group/info": 0.787128712871287,
"ietf/group/info": 0.6881188118811882,
"ietf/group/mails": 0.9425287356321839,
"ietf/group/milestones": 0.8595744680851064,
"ietf/group/models": 0.9161676646706587,
@ -6829,7 +6829,7 @@
}
},
"template": {
"coverage": 0.6728624535315985,
"coverage": 0.671003717472119,
"covered": {
"401.html": false,
"404.html": true,
@ -7032,7 +7032,7 @@
"group/conclude.html": true,
"group/concluded_groups.html": true,
"group/customize_workflow.html": true,
"group/dot.txt": true,
"group/dot.txt": false,
"group/edit.html": true,
"group/edit_milestones.html": true,
"group/email_aliases.html": true,
@ -7371,9 +7371,9 @@
"utils/header_change_content.txt": false
}
},
"time": "2015-03-25T19:00:54Z",
"time": "2015-03-25T19:48:25Z",
"url": {
"coverage": 0.569672131147541,
"coverage": 0.5655737704918032,
"covered": {
"^$": true,
"^(?P<group_type>(wg|rg))/$": true,
@ -7562,8 +7562,8 @@
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/ajax/searchdocs/$": false,
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/charter/$": false,
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/conclude/$": false,
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/deps/dot/$": true,
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/deps/pdf/$": true,
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/deps/dot/$": false,
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/deps/pdf/$": false,
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/documents/$": false,
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/edit/$": false,
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/history/$": false,