Commit 4a3929a2 by Calen Pennington

Move test reports into a separate directory

parent e3dc7d0a
...@@ -4,6 +4,7 @@ require 'tempfile' ...@@ -4,6 +4,7 @@ require 'tempfile'
# Build Constants # Build Constants
REPO_ROOT = File.dirname(__FILE__) REPO_ROOT = File.dirname(__FILE__)
BUILD_DIR = File.join(REPO_ROOT, "build") BUILD_DIR = File.join(REPO_ROOT, "build")
REPORT_DIR = File.join(REPO_ROOT, "reports")
# Packaging constants # Packaging constants
DEPLOY_DIR = "/opt/wwc" DEPLOY_DIR = "/opt/wwc"
...@@ -25,18 +26,27 @@ NORMALIZED_DEPLOY_NAME = DEPLOY_NAME.downcase().gsub(/[_\/]/, '-') ...@@ -25,18 +26,27 @@ NORMALIZED_DEPLOY_NAME = DEPLOY_NAME.downcase().gsub(/[_\/]/, '-')
INSTALL_DIR_PATH = File.join(DEPLOY_DIR, NORMALIZED_DEPLOY_NAME) INSTALL_DIR_PATH = File.join(DEPLOY_DIR, NORMALIZED_DEPLOY_NAME)
# Set up the clean and clobber tasks # Set up the clean and clobber tasks
CLOBBER.include('build') CLOBBER.include(BUILD_DIR, REPORT_DIR, 'cover*', '.coverage')
CLEAN.include("#{BUILD_DIR}/*.deb", "#{BUILD_DIR}/util") CLEAN.include("#{BUILD_DIR}/*.deb", "#{BUILD_DIR}/util")
task :pylint do task :default => [:pep8, :pylint, :test]
directory REPORT_DIR
task :pep8 => REPORT_DIR do
sh("pep8 djangoapps | tee #{REPORT_DIR}/pep8.report")
end
task :pylint => REPORT_DIR do
Dir.chdir("djangoapps") do Dir.chdir("djangoapps") do
Dir["*"].each do |app| Dir["*"].each do |app|
sh("pylint -f parseable #{app} | tee #{app}.pylint") sh("pylint -f parseable #{app} | tee #{REPORT_DIR}/#{app}.pylint.report")
end end
end end
end end
task :test do task :test => REPORT_DIR do
ENV['NOSE_XUNIT_FILE'] = File.join(REPORT_DIR, "nosetests.xml")
sh("django-admin.py test --settings=envs.test --pythonpath=. $(ls djangoapps)") sh("django-admin.py test --settings=envs.test --pythonpath=. $(ls djangoapps)")
end end
......
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