Commit 980fb92e by Calen Pennington

Merge pull request #1873 from MITx/feature/cale/faster-tests

Speed up testing by running pylint in fewer batches
parents 7315855d c236f095
...@@ -141,16 +141,20 @@ end ...@@ -141,16 +141,20 @@ end
desc "Run pylint on all #{system} code" desc "Run pylint on all #{system} code"
task "pylint_#{system}" => report_dir do task "pylint_#{system}" => report_dir do
Dir["#{system}/*.py", "#{system}/djangoapps/*", "#{system}/lib/*"].each do |app| apps = Dir["#{system}/*.py", "#{system}/djangoapps/*", "#{system}/lib/*"].map do |app|
pythonpath_prefix = "PYTHONPATH=#{system}:#{system}/djangoapps:#{system}/lib:common/djangoapps:common/lib" File.basename(app)
app = File.basename(app) end.select do |app|
app !=~ /.pyc$/
end.map do |app|
if app =~ /.py$/ if app =~ /.py$/
app = app.gsub('.py', '') app.gsub('.py', '')
elsif app =~ /.pyc$/ else
next app
end end
sh("#{pythonpath_prefix} pylint --rcfile=.pylintrc -f parseable #{app} | tee #{report_dir}/#{app}.pylint.report")
end end
pythonpath_prefix = "PYTHONPATH=#{system}:#{system}/djangoapps:#{system}/lib:common/djangoapps:common/lib"
sh("#{pythonpath_prefix} pylint --rcfile=.pylintrc -f parseable #{apps.join(' ')} | tee #{report_dir}/pylint.report")
end end
task :pylint => "pylint_#{system}" task :pylint => "pylint_#{system}"
......
...@@ -67,7 +67,6 @@ lettuce==0.2.16 ...@@ -67,7 +67,6 @@ lettuce==0.2.16
mock==0.8.0 mock==0.8.0
nosexcover==1.0.7 nosexcover==1.0.7
pep8==1.4.5 pep8==1.4.5
pylint==0.27.0
rednose==0.3 rednose==0.3
selenium==2.31.0 selenium==2.31.0
splinter==0.5.0 splinter==0.5.0
...@@ -75,3 +74,7 @@ django_nose==1.1 ...@@ -75,3 +74,7 @@ django_nose==1.1
django-jasmine==0.3.2 django-jasmine==0.3.2
django_debug_toolbar django_debug_toolbar
django-debug-toolbar-mongo django-debug-toolbar-mongo
# Install pylint from a specific commit on trunk
# to get the fix for this issue: http://www.logilab.org/ticket/122793
https://bitbucket.org/logilab/pylint/get/e828cb5.zip
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment