Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
376894ff
Commit
376894ff
authored
Apr 06, 2016
by
Adam Reese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ref(scripts): cleanup coverage script
parent
dd4263a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
.gitignore
.gitignore
+1
-1
coverage.sh
scripts/coverage.sh
+8
-3
No files found.
.gitignore
View file @
376894ff
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
.*.swp
.*.swp
*.pyc
*.pyc
.project
.project
coverage.out
nohup.out
nohup.out
/.coverage
/bin
/bin
/vendor/*
/vendor/*
/rootfs/manager/bin/manager
/rootfs/manager/bin/manager
...
...
scripts/coverage.sh
View file @
376894ff
...
@@ -17,17 +17,22 @@ set -eo pipefail
...
@@ -17,17 +17,22 @@ set -eo pipefail
[[
"
$TRACE
"
]]
&&
set
-x
[[
"
$TRACE
"
]]
&&
set
-x
COVERDIR
=
${
COVERDIR
:-
.coverage
}
COVERMODE
=
${
COVERMODE
:-
atomic
}
COVERMODE
=
${
COVERMODE
:-
atomic
}
PACKAGES
=(
$(
go list
$(
glide novendor
))
)
PACKAGES
=(
$(
go list
$(
glide novendor
))
)
echo
"mode:
${
COVERMODE
}
"
>
coverage.out
if
[[
!
-d
"
$COVERDIR
"
]]
;
then
mkdir
-p
"
$COVERDIR
"
fi
echo
"mode:
${
COVERMODE
}
"
>
"
${
COVERDIR
}
/coverage.out"
for
d
in
"
${
PACKAGES
[@]
}
"
;
do
for
d
in
"
${
PACKAGES
[@]
}
"
;
do
go
test
-coverprofile
=
profile.out
-covermode
=
"
$COVERMODE
"
"
$d
"
go
test
-coverprofile
=
profile.out
-covermode
=
"
$COVERMODE
"
"
$d
"
if
[
-f
profile.out
]
;
then
if
[
-f
profile.out
]
;
then
sed
"/mode:
$COVERMODE
/d"
profile.out
>>
coverage.out
sed
"/mode:
$COVERMODE
/d"
profile.out
>>
"
${
COVERDIR
}
/coverage.out"
rm
profile.out
rm
profile.out
fi
fi
done
done
go tool cover
-html
=
coverage.out
go tool cover
-html
"
${
COVERDIR
}
/coverage.out"
-o
"
${
COVERDIR
}
/coverage.html"
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