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
e50a442d
Commit
e50a442d
authored
Nov 08, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only try to generate html and xml coverage reports if the source .cover file exists
parent
31e42a28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
rakefile
+14
-7
No files found.
rakefile
View file @
e50a442d
...
@@ -26,7 +26,7 @@ PACKAGE_REPO = "packages@gp.mitx.mit.edu:/opt/pkgrepo.incoming"
...
@@ -26,7 +26,7 @@ PACKAGE_REPO = "packages@gp.mitx.mit.edu:/opt/pkgrepo.incoming"
NORMALIZED_DEPLOY_NAME
=
DEPLOY_NAME
.
downcase
().
gsub
(
/[_\/]/
,
'-'
)
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_DIR
,
REPORT_DIR
,
'
cover*'
,
'.coverage'
,
'
test_root/*_repo'
,
'test_root/staticfiles'
)
CLOBBER
.
include
(
BUILD_DIR
,
REPORT_DIR
,
'test_root/*_repo'
,
'test_root/staticfiles'
)
CLEAN
.
include
(
"
#{
BUILD_DIR
}
/*.deb"
,
"
#{
BUILD_DIR
}
/util"
)
CLEAN
.
include
(
"
#{
BUILD_DIR
}
/*.deb"
,
"
#{
BUILD_DIR
}
/util"
)
def
select_executable
(
*
cmds
)
def
select_executable
(
*
cmds
)
...
@@ -198,21 +198,28 @@ namespace :coverage do
...
@@ -198,21 +198,28 @@ namespace :coverage do
desc
"Build the html coverage reports"
desc
"Build the html coverage reports"
task
:html
=>
:report_dirs
do
task
:html
=>
:report_dirs
do
TEST_TASK_DIRS
.
each
do
|
dir
|
TEST_TASK_DIRS
.
each
do
|
dir
|
sh
(
"coverage html --rcfile=
#{
dir
}
/.coveragerc || echo 'Unable to build coverage html for
#{
dir
}
'"
)
report_dir
=
report_dir_path
(
dir
)
if
!
File
.
file?
(
"
#{
report_dir
}
/.coverage"
)
next
end
sh
(
"coverage html --rcfile=
#{
dir
}
/.coveragerc"
)
end
end
end
end
desc
"Build the xml coverage reports"
desc
"Build the xml coverage reports"
task
:xml
=>
:report_dirs
do
task
:xml
=>
:report_dirs
do
TEST_TASK_DIRS
.
each
do
|
dir
|
TEST_TASK_DIRS
.
each
do
|
dir
|
report_dir
=
report_dir_path
(
dir
)
if
!
File
.
file?
(
"
#{
report_dir
}
/.coverage"
)
next
end
# Why doesn't the rcfile control the xml output file properly??
# Why doesn't the rcfile control the xml output file properly??
sh
(
"coverage xml -o
reports/
#{
dir
}
/coverage.xml --rcfile=
#{
dir
}
/.coveragerc || echo 'Unable to build coverage xml for
#{
dir
}
'
"
)
sh
(
"coverage xml -o
#{
report_dir
}
/coverage.xml --rcfile=
#{
dir
}
/.coveragerc
"
)
end
end
end
end
TEST_TASK_DIRS
.
each
do
|
dir
|
CLOBBER
.
include
(
"
#{
dir
}
/.coverage"
)
end
end
end
task
:runserver
=>
:lms
task
:runserver
=>
:lms
...
...
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