diff --git a/cms/envs/test.py b/cms/envs/test.py index f3eee45ea7..77c05d9fa4 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -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', ] diff --git a/lms/envs/test.py b/lms/envs/test.py index 0951601ec7..63ff830c92 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -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', ] diff --git a/rakelib/tests.rake b/rakelib/tests.rake index ba436f3680..130ff3d9fd 100644 --- a/rakelib/tests.rake +++ b/rakelib/tests.rake @@ -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