Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
e50a442d
Commit
e50a442d
authored
12 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Only try to generate html and xml coverage reports if the source .cover file exists
parent
31e42a28
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rakefile
+14
-7
14 additions, 7 deletions
rakefile
with
14 additions
and
7 deletions
rakefile
+
14
−
7
View file @
e50a442d
...
...
@@ -26,7 +26,7 @@ PACKAGE_REPO = "packages@gp.mitx.mit.edu:/opt/pkgrepo.incoming"
NORMALIZED_DEPLOY_NAME
=
DEPLOY_NAME
.
downcase
().
gsub
(
/[_\/]/
,
'-'
)
INSTALL_DIR_PATH
=
File
.
join
(
DEPLOY_DIR
,
NORMALIZED_DEPLOY_NAME
)
# 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"
)
def
select_executable
(
*
cmds
)
...
...
@@ -198,21 +198,28 @@ namespace :coverage do
desc
"Build the html coverage reports"
task
:html
=>
:report_dirs
do
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
desc
"Build the xml coverage reports"
task
:xml
=>
:report_dirs
do
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??
sh
(
"coverage xml -o report
s/
#{
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
TEST_TASK_DIRS
.
each
do
|
dir
|
CLOBBER
.
include
(
"
#{
dir
}
/.coverage"
)
end
end
task
:runserver
=>
:lms
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment