Skip to content

Commit 0455823

Browse files
committed
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
1 parent 01b0ca8 commit 0455823

3 files changed

Lines changed: 58 additions & 14 deletions

File tree

bin/mkrelease

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ DEV="$(printf %d.%d.%d.dev0 $MAJOR $MINOR $NEXT)"
167167
#cd $DIR ??
168168

169169
note "Running the tests suite and writing release coverage data ..."
170-
$do ietf/manage.py test --settings=ietf.settings_sqlitetest --save-version-coverage=$VER
170+
$do ietf/manage.py test --settings=ietf.settings_releasetest --save-version-coverage=$VER
171171

172172
note "Committing the release coverage data ..."
173173
$do svn commit release-coverage.json -m "Code coverage data for release $VER"
174174

175-
note "Checking that there's a recent test-crawler log"
176-
touch -d $RDATE .svn/.latest-commit
177-
TCLOG=$(ls -t ../test-crawl-*.log | head -n 1)
178-
[ $TCLOG -nt .svn/.latest-commit ] || die "Looked for ../test-crawl-*.log, but didn't find one newer than the latest repository commit ($RDATE)"
175+
# note "Checking that there's a recent test-crawler log"
176+
# touch -d $RDATE .svn/.latest-commit
177+
# TCLOG=$(ls -t ../test-crawl-*.log | head -n 1)
178+
# [ $TCLOG -nt .svn/.latest-commit ] || die "Looked for ../test-crawl-*.log, but didn't find one newer than the latest repository commit ($RDATE)"
179179

180180
note "Checking that changelog information is available"
181181
changes=$( sed -n "/^$PROJ ($VER.*)/,/^ -- /p" changelog )

ietf/settings_releasetest.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Standard settings except we use SQLite, this is useful for speeding
2+
# up tests that depend on the test database, try for instance:
3+
#
4+
# ./manage.py test --settings=settings_sqlitetest doc.ChangeStateTestCase
5+
#
6+
7+
from settings import * # pyflakes:ignore
8+
9+
# Workaround to avoid spending minutes stepping through the migrations in
10+
# every test run. The result of this is to use the 'syncdb' way of creating
11+
# the test database instead of doing it through the migrations. Taken from
12+
# https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09
13+
14+
## To be removed after upgrade to Django 1.8 ##
15+
16+
class DisableMigrations(object):
17+
18+
def __contains__(self, item):
19+
return True
20+
21+
def __getitem__(self, item):
22+
# The string below is significant. It has to include the value of
23+
# django.db.migrations.loader.MIGRATIONS_MODULE_NAME. Used by django
24+
# 1.7 code in django.db.migrations.loader.MigrationLoader to
25+
# determine whether or not to run migrations for a given module
26+
from django.db.migrations.loader import MIGRATIONS_MODULE_NAME
27+
return "no " + MIGRATIONS_MODULE_NAME
28+
29+
MIGRATION_MODULES = DisableMigrations()
30+
31+
# Set the SKIP_* variables to True in order to disable tests which won't
32+
# normally run on developer's laptop, in order to not create
33+
# release-coverage.json data which sets people up for test suite failures on a
34+
# clean checkout
35+
36+
SKIP_DOT_TO_PDF = True
37+
SKIP_SELENIUM = True
38+
39+
DATABASES = {
40+
'default': {
41+
'NAME': 'test.db',
42+
'ENGINE': 'django.db.backends.sqlite3',
43+
},
44+
}

release-coverage.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6494,9 +6494,9 @@
64946494
},
64956495
"5.13.0": {
64966496
"code": {
6497-
"coverage": 0.6796908049071262,
6497+
"coverage": 0.6783063492673922,
64986498
"covered": {
6499-
"ietf/__init__": 0.0,
6499+
"ietf/__init__": 1.0,
65006500
"ietf/api/__init__": 0.7012987012987013,
65016501
"ietf/api/management/__init__": 1.0,
65026502
"ietf/api/management/commands/__init__": 1.0,
@@ -6570,7 +6570,7 @@
65706570
"ietf/group/edit": 0.862876254180602,
65716571
"ietf/group/features": 1.0,
65726572
"ietf/group/feeds": 0.9736842105263157,
6573-
"ietf/group/info": 0.787128712871287,
6573+
"ietf/group/info": 0.6881188118811882,
65746574
"ietf/group/mails": 0.9425287356321839,
65756575
"ietf/group/milestones": 0.8595744680851064,
65766576
"ietf/group/models": 0.9161676646706587,
@@ -6829,7 +6829,7 @@
68296829
}
68306830
},
68316831
"template": {
6832-
"coverage": 0.6728624535315985,
6832+
"coverage": 0.671003717472119,
68336833
"covered": {
68346834
"401.html": false,
68356835
"404.html": true,
@@ -7032,7 +7032,7 @@
70327032
"group/conclude.html": true,
70337033
"group/concluded_groups.html": true,
70347034
"group/customize_workflow.html": true,
7035-
"group/dot.txt": true,
7035+
"group/dot.txt": false,
70367036
"group/edit.html": true,
70377037
"group/edit_milestones.html": true,
70387038
"group/email_aliases.html": true,
@@ -7371,9 +7371,9 @@
73717371
"utils/header_change_content.txt": false
73727372
}
73737373
},
7374-
"time": "2015-03-25T19:00:54Z",
7374+
"time": "2015-03-25T19:48:25Z",
73757375
"url": {
7376-
"coverage": 0.569672131147541,
7376+
"coverage": 0.5655737704918032,
73777377
"covered": {
73787378
"^$": true,
73797379
"^(?P<group_type>(wg|rg))/$": true,
@@ -7562,8 +7562,8 @@
75627562
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/ajax/searchdocs/$": false,
75637563
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/charter/$": false,
75647564
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/conclude/$": false,
7565-
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/deps/dot/$": true,
7566-
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/deps/pdf/$": true,
7565+
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/deps/dot/$": false,
7566+
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/deps/pdf/$": false,
75677567
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/documents/$": false,
75687568
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/edit/$": false,
75697569
"^group/(?P<acronym>[a-zA-Z0-9-._]+)/history/$": false,

0 commit comments

Comments
 (0)