Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
18f85003
Commit
18f85003
authored
Sep 18, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install prereqs before collecting assets
parent
f8a49edd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
rakelib/tests.rake
+18
-7
No files found.
rakelib/tests.rake
View file @
18f85003
...
...
@@ -75,8 +75,9 @@ task :test_docs do
end
task
:clean_test_files
do
desc
"Clean fixture files used by tests"
desc
"Clean fixture files used by tests
and .pyc files
"
sh
(
"git clean -fqdx test_root/logs test_root/data test_root/staticfiles test_root/uploads"
)
sh
(
"find . -type f -name *.pyc -delete"
)
end
task
:clean_reports_dir
=>
REPORT_DIR
do
...
...
@@ -87,7 +88,6 @@ task :clean_reports_dir => REPORT_DIR do
sh
(
"find
#{
REPORT_DIR
}
-type f -delete"
)
end
TEST_TASK_DIRS
=
[]
[
:lms
,
:cms
].
each
do
|
system
|
...
...
@@ -98,24 +98,32 @@ TEST_TASK_DIRS = []
# Per System tasks/
desc
"Run all django tests on our djangoapps for the
#{
system
}
"
task
"test_
#{
system
}
"
,
[
:test_id
]
=>
[
:clean_test_files
,
:predjango
,
"
#{
system
}
:gather_assets:test"
,
"fasttest_
#{
system
}
"
]
task
"test_
#{
system
}
"
,
[
:test_id
]
=>
[
:clean_test_files
,
:install_prereqs
,
"
#{
system
}
:gather_assets:test"
,
"fasttest_
#{
system
}
"
]
# Have a way to run the tests without running collectstatic -- useful when debugging without
# messing with static files.
task
"fasttest_
#{
system
}
"
,
[
:test_id
]
=>
[
test_id_dir
,
report_dir
,
:clean_reports_dir
,
:install_prereqs
,
:predjango
]
do
|
t
,
args
|
task
"fasttest_
#{
system
}
"
,
[
:test_id
]
=>
[
test_id_dir
,
report_dir
,
:clean_reports_dir
]
do
|
t
,
args
|
args
.
with_defaults
(
:test_id
=>
nil
)
run_tests
(
system
,
report_dir
,
args
.
test_id
)
end
# Run acceptance tests
desc
"Run acceptance tests"
task
"test_acceptance_
#{
system
}
"
,
[
:harvest_args
]
=>
[
:clean_test_files
,
"
#{
system
}
:gather_assets:acceptance"
]
do
|
t
,
args
|
task
"test_acceptance_
#{
system
}
"
,
[
:harvest_args
]
=>
[
:clean_test_files
,
:install_prereqs
,
"
#{
system
}
:gather_assets:acceptance"
]
do
|
t
,
args
|
setup_acceptance_db
(
system
)
Rake
::
Task
[
"fasttest_acceptance_
#{
system
}
"
].
invoke
(
args
.
harvest_args
)
end
desc
"Run acceptance tests without collectstatic or database migrations"
task
"fasttest_acceptance_
#{
system
}
"
,
[
:harvest_args
]
=>
[
report_dir
,
:clean_reports_dir
,
:predjango
]
do
|
t
,
args
|
task
"fasttest_acceptance_
#{
system
}
"
,
[
:harvest_args
]
=>
[
report_dir
,
:clean_reports_dir
]
do
|
t
,
args
|
args
.
with_defaults
(
:harvest_args
=>
''
)
setup_acceptance_db
(
system
,
fasttest
=
true
)
run_acceptance_tests
(
system
,
report_dir
,
args
.
harvest_args
)
...
...
@@ -136,7 +144,10 @@ Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib|
directory
test_id_dir
desc
"Run tests for common lib
#{
lib
}
"
task
"test_
#{
lib
}
"
,
[
:test_id
]
=>
[
test_id_dir
,
report_dir
,
:clean_reports_dir
]
do
|
t
,
args
|
task
"test_
#{
lib
}
"
,
[
:test_id
]
=>
[
test_id_dir
,
report_dir
,
:clean_test_files
,
:clean_reports_dir
,
:install_prereqs
]
do
|
t
,
args
|
args
.
with_defaults
(
:test_id
=>
lib
)
ENV
[
'NOSE_XUNIT_FILE'
]
=
File
.
join
(
report_dir
,
"nosetests.xml"
)
cmd
=
"nosetests --id-file=
#{
test_ids
}
#{
args
.
test_id
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment