Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
eic_tools
Spack
Commits
19b7b159
Commit
19b7b159
authored
6 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
coverage: use kcov to get coverage for our cc script
parent
51cbc278
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.codecov.yml
+0
-1
0 additions, 1 deletion
.codecov.yml
.coveragerc
+0
-1
0 additions, 1 deletion
.coveragerc
.travis.yml
+6
-4
6 additions, 4 deletions
.travis.yml
share/spack/qa/bashcov
+12
-0
12 additions, 0 deletions
share/spack/qa/bashcov
share/spack/qa/setup.sh
+14
-1
14 additions, 1 deletion
share/spack/qa/setup.sh
with
32 additions
and
7 deletions
.codecov.yml
+
0
−
1
View file @
19b7b159
...
...
@@ -29,7 +29,6 @@ coverage:
ignore
:
-
lib/spack/spack/test/.*
-
lib/spack/env/.*
-
lib/spack/docs/.*
-
lib/spack/external/.*
...
...
This diff is collapsed.
Click to expand it.
.coveragerc
+
0
−
1
View file @
19b7b159
...
...
@@ -7,7 +7,6 @@ branch = True
source
=
lib
omit
=
lib
/
spack
/
spack
/
test
/*
lib
/
spack
/
env
/*
lib
/
spack
/
docs
/*
lib
/
spack
/
external
/*
...
...
This diff is collapsed.
Click to expand it.
.travis.yml
+
6
−
4
View file @
19b7b159
...
...
@@ -133,17 +133,19 @@ addons:
apt
:
packages
:
-
ccache
-
cmake
-
gfortran
-
mercurial
-
graphviz
-
gnupg2
-
cmake
-
kcov
-
mercurial
-
ninja-build
-
perl
-
perl-base
-
realpath
-
r-base
-
r-base-core
-
r-base-dev
-
perl
-
perl-base
# for Mac builds, we use Homebrew
homebrew
:
packages
:
...
...
This diff is collapsed.
Click to expand it.
share/spack/qa/bashcov
0 → 100755
+
12
−
0
View file @
19b7b159
#!/bin/bash
#
# This script acts like bash but runs kcov on the input script. We use it
# to get coverage for Spack's bash scripts.
#
if
[
-z
"
$SPACK_ROOT
"
]
;
then
echo
"ERROR: SPACK_ROOT was not set!"
exit
1
fi
kcov
"
$SPACK_ROOT
/coverage"
"
$@
"
This diff is collapsed.
Click to expand it.
share/spack/qa/setup.sh
+
14
−
1
View file @
19b7b159
...
...
@@ -11,15 +11,28 @@
#
QA_DIR
=
"
$(
dirname
${
BASH_SOURCE
[0]
}
)
"
SPACK_ROOT
=
"
$QA_DIR
/../../.."
export
SPACK_ROOT
=
$(
realpath
"
$QA_DIR
/../../.."
)
# Source the setup script
.
"
$SPACK_ROOT
/share/spack/setup-env.sh"
# Set up some variables for running coverage tests.
if
[[
"
$TEST_SUITE
"
==
"unit"
||
"
$TEST_SUITE
"
==
"build"
]]
;
then
# these set up coverage for Python
coverage
=
coverage
coverage_run
=
"coverage run"
# make a coverage directory for kcov, and patch cc to use our bashcov
# script instead of plain bash
if
[[
$TEST_SUITE
==
unit
&&
# kcov segfaults for the MPICH build test
$TRAVIS_OS_NAME
==
linux
&&
$TRAVIS_PYTHON_VERSION
!=
2.6
]]
;
then
mkdir
-p
coverage
cc_script
=
"
$SPACK_ROOT
/lib/spack/env/cc"
bashcov
=
$(
realpath
${
QA_DIR
}
/bashcov
)
sed
-i
~
"s@#
\!
/bin/bash@#
\!
${
bashcov
}
@"
"
$cc_script
"
fi
else
coverage
=
""
coverage_run
=
""
...
...
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