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
83e2b362
Commit
83e2b362
authored
Nov 08, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make reports directory build work correctly
parent
0cf46f76
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
rakefile
+17
-7
No files found.
rakefile
View file @
83e2b362
...
...
@@ -38,6 +38,10 @@ def django_admin(system, env, command, *args)
return
"
#{
django_admin
}
#{
command
}
--settings=
#{
system
}
.envs.
#{
env
}
--pythonpath=.
#{
args
.
join
(
' '
)
}
"
end
def
report_dir_path
(
dir
)
return
File
.
join
(
REPORT_DIR
,
dir
.
to_s
)
end
task
:default
=>
[
:test
,
:pep8
,
:pylint
]
directory
REPORT_DIR
...
...
@@ -58,7 +62,7 @@ task :clean_test_files do
end
[
:lms
,
:cms
,
:common
].
each
do
|
system
|
report_dir
=
File
.
join
(
REPORT_DIR
,
system
.
to_s
)
report_dir
=
report_dir_path
(
system
)
directory
report_dir
desc
"Run pep8 on all
#{
system
}
code"
...
...
@@ -107,8 +111,7 @@ end
TEST_TASK_DIRS
=
[]
[
:lms
,
:cms
].
each
do
|
system
|
report_dir
=
File
.
join
(
REPORT_DIR
,
system
.
to_s
)
directory
report_dir
report_dir
=
report_dir_path
(
system
)
# Per System tasks
desc
"Run all django tests on our djangoapps for the
#{
system
}
"
...
...
@@ -154,8 +157,7 @@ end
Dir
[
"common/lib/*"
].
select
{
|
lib
|
File
.
directory?
(
lib
)}.
each
do
|
lib
|
task_name
=
"test_
#{
lib
}
"
report_dir
=
File
.
join
(
REPORT_DIR
,
task_name
.
gsub
(
'/'
,
'_'
))
directory
report_dir
report_dir
=
report_dir_path
(
lib
)
desc
"Run tests for common lib
#{
lib
}
"
task
task_name
=>
report_dir
do
...
...
@@ -174,6 +176,14 @@ Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib|
end
task
:report_dirs
TEST_TASK_DIRS
.
each
do
|
dir
|
report_dir
=
report_dir_path
(
dir
)
directory
report_dir
task
:report_dirs
=>
[
REPORT_DIR
,
report_dir
]
end
task
:test
do
TEST_TASK_DIRS
.
each
do
|
dir
|
Rake
::
Task
[
"test_
#{
dir
}
"
].
invoke
(
false
)
...
...
@@ -186,14 +196,14 @@ end
namespace
:coverage
do
desc
"Build the html coverage reports"
task
:html
do
task
:html
=>
:report_dirs
do
TEST_TASK_DIRS
.
each
do
|
dir
|
sh
(
"coverage html --rcfile=
#{
dir
}
/.coveragerc"
)
end
end
desc
"Build the xml coverage reports"
task
:xml
do
task
:xml
=>
:report_dirs
do
TEST_TASK_DIRS
.
each
do
|
dir
|
# Why doesn't the rcfile control the xml output file properly??
sh
(
"coverage xml -o reports/
#{
dir
}
/coverage.xml --rcfile=
#{
dir
}
/.coveragerc"
)
...
...
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