Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
f50519ae
Commit
f50519ae
authored
12 years ago
by
Victor Shnayder
Browse files
Options
Downloads
Plain Diff
Merge pull request #906 from MITx/victor/test-speedup
Victor/test speedup
parents
9a4e21c0
4bf9323e
No related branches found
Branches containing commit
Tags
release-2020-10-30-12.40
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/envs/test.py
+24
-22
24 additions, 22 deletions
lms/envs/test.py
rakefile
+7
-0
7 additions, 0 deletions
rakefile
with
31 additions
and
22 deletions
lms/envs/test.py
+
24
−
22
View file @
f50519ae
...
...
@@ -27,12 +27,18 @@ SOUTH_TESTS_MIGRATE = False # To disable migrations and use syncdb instead
# Nose Test Runner
INSTALLED_APPS
+=
(
'
django_nose
'
,)
NOSE_ARGS
=
[
'
--cover-erase
'
,
'
--with-xunit
'
,
'
--with-xcoverage
'
,
'
--cover-html
'
,
# '-v', '--pdb', # When really stuck, uncomment to start debugger on error
'
--cover-inclusive
'
,
'
--cover-html-dir
'
,
os
.
environ
.
get
(
'
NOSE_COVER_HTML_DIR
'
,
'
cover_html
'
)]
for
app
in
os
.
listdir
(
PROJECT_ROOT
/
'
djangoapps
'
):
NOSE_ARGS
+=
[
'
--cover-package
'
,
app
]
NOSE_ARGS
=
[]
# Turning off coverage speeds up tests dramatically... until we have better config,
# leave it here for manual fiddling.
_coverage
=
True
if
_coverage
:
NOSE_ARGS
=
[
'
--cover-erase
'
,
'
--with-xunit
'
,
'
--with-xcoverage
'
,
'
--cover-html
'
,
# '-v', '--pdb', # When really stuck, uncomment to start debugger on error
'
--cover-inclusive
'
,
'
--cover-html-dir
'
,
os
.
environ
.
get
(
'
NOSE_COVER_HTML_DIR
'
,
'
cover_html
'
)]
for
app
in
os
.
listdir
(
PROJECT_ROOT
/
'
djangoapps
'
):
NOSE_ARGS
+=
[
'
--cover-package
'
,
app
]
TEST_RUNNER
=
'
django_nose.NoseTestSuiteRunner
'
# Local Directories
...
...
@@ -98,22 +104,6 @@ DATABASES = {
'
NAME
'
:
PROJECT_ROOT
/
"
db
"
/
"
mitx.db
"
,
},
# The following are for testing purposes...
'
edX/toy/2012_Fall
'
:
{
'
ENGINE
'
:
'
django.db.backends.sqlite3
'
,
'
NAME
'
:
ENV_ROOT
/
"
db
"
/
"
course1.db
"
,
},
'
edx/full/6.002_Spring_2012
'
:
{
'
ENGINE
'
:
'
django.db.backends.sqlite3
'
,
'
NAME
'
:
ENV_ROOT
/
"
db
"
/
"
course2.db
"
,
},
'
edX/toy/TT_2012_Fall
'
:
{
'
ENGINE
'
:
'
django.db.backends.sqlite3
'
,
'
NAME
'
:
ENV_ROOT
/
"
db
"
/
"
course3.db
"
,
},
}
CACHES
=
{
...
...
@@ -172,3 +162,15 @@ FILE_UPLOAD_HANDLERS = (
'
django.core.files.uploadhandler.MemoryFileUploadHandler
'
,
'
django.core.files.uploadhandler.TemporaryFileUploadHandler
'
,
)
################### Make tests faster
#http://slacy.com/blog/2012/04/make-your-tests-faster-in-django-1-4/
PASSWORD_HASHERS
=
(
# 'django.contrib.auth.hashers.PBKDF2PasswordHasher',
# 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
# 'django.contrib.auth.hashers.BCryptPasswordHasher',
'
django.contrib.auth.hashers.SHA1PasswordHasher
'
,
'
django.contrib.auth.hashers.MD5PasswordHasher
'
,
# 'django.contrib.auth.hashers.CryptPasswordHasher',
)
This diff is collapsed.
Click to expand it.
rakefile
+
7
−
0
View file @
f50519ae
...
...
@@ -151,6 +151,13 @@ Dir["common/lib/*"].each do |lib|
sh
(
"nosetests
#{
lib
}
--cover-erase --with-xunit --with-xcoverage --cover-html --cover-inclusive --cover-package
#{
File
.
basename
(
lib
)
}
--cover-html-dir
#{
File
.
join
(
report_dir
,
"cover"
)
}
"
)
end
TEST_TASKS
<<
task_name
desc
"Run tests for common lib
#{
lib
}
(without coverage)"
task
"fasttest_
#{
lib
}
"
do
sh
(
"nosetests
#{
lib
}
"
)
end
end
task
:test
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment