Commit 54ea98d2 by Will Daly

Merge pull request #1219 from edx/will/run-individual-tests

Allow rake test to run individual tests again
parents 2d17c00e b0878d3d
......@@ -25,7 +25,6 @@ _report_dir = REPO_ROOT / 'reports' / _system
_report_dir.makedirs_p()
NOSE_ARGS = [
'--tests', PROJECT_ROOT / 'djangoapps', COMMON_ROOT / 'djangoapps',
'--id-file', REPO_ROOT / '.testids' / _system / 'noseids',
'--xunit-file', _report_dir / 'nosetests.xml',
]
......
......@@ -51,7 +51,6 @@ _report_dir = REPO_ROOT / 'reports' / _system
_report_dir.makedirs_p()
NOSE_ARGS = [
'--tests', PROJECT_ROOT / 'djangoapps', COMMON_ROOT / 'djangoapps',
'--id-file', REPO_ROOT / '.testids' / _system / 'noseids',
'--xunit-file', _report_dir / 'nosetests.xml',
]
......
......@@ -17,7 +17,19 @@ def run_under_coverage(cmd, root)
end
def run_tests(system, report_dir, test_id=nil, stop_on_failure=true)
test_id = '' if test_id.nil?
# If no test id is provided, we need to limit the test runner
# to the Djangoapps we want to test. Otherwise, it will
# run tests on all installed packages.
if test_id.nil?
test_id = "#{system}/djangoapps common/djangoapps"
# Handle "--failed" as a special case: we want to re-run only
# the tests that failed within our Django apps
elsif test_id == '--failed'
test_id = "#{system}/djangoapps common/djangoapps --failed"
end
cmd = django_admin(system, :test, 'test', test_id)
test_sh(run_under_coverage(cmd, system))
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