Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
d02e67d4
Commit
d02e67d4
authored
Aug 10, 2016
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coveralls with lcov
parent
ce30526e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
63 deletions
+85
-63
.gitignore
.gitignore
+5
-7
.travis.yml
.travis.yml
+79
-55
test/Makefile
test/Makefile
+1
-1
No files found.
.gitignore
View file @
d02e67d4
json_unit
json_benchmarks
fuzz-testing
*.dSYM
*.o
*.gcno
*.gcda
working
html
me.nlohmann.json.docset
android
doc/xml
doc/html
me.nlohmann.json.docset
benchmarks/files/numbers/*.json
*.o
.travis.yml
View file @
d02e67d4
...
...
@@ -27,6 +27,85 @@ env:
matrix
:
include
:
# Valgrind
-
os
:
linux
compiler
:
gcc
env
:
-
COMPILER=g++-4.9
-
SPECIAL=valgrind
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
]
packages
:
[
g++-4.9
,
valgrind
]
after_success
:
-
valgrind --error-exitcode=1 --leak-check=full test/json_unit -s "*" ;
# Coveralls
#- os: linux
# compiler: gcc
# addons:
# apt:
# sources: ['ubuntu-toolchain-r-test']
# packages: ['g++-4.9', 'valgrind', 'python-pip', 'python-yaml']
# before_script:
# - pip install --user git+git://github.com/eddyxu/cpp-coveralls.git
# after_success:
# - make clean
# - touch src/json.hpp
# - make json_unit CXXFLAGS="-fprofile-arcs -ftest-coverage -std=c++11 -lstdc++" CXX=$COMPILER
# - test/json_unit "*"
# - coveralls --build-root test --exclude src/catch.hpp --exclude src/unit-algorithms.cpp --exclude src/unit-allocator.cpp --exclude src/unit-capacity.cpp --exclude src/unit-class_const_iterator.cpp --exclude src/unit-class_iterator.cpp --exclude src/unit-class_lexer.cpp --exclude src/unit-class_parser.cpp --exclude src/unit-comparison.cpp --exclude src/unit-concepts.cpp --exclude src/unit-constructor1.cpp --exclude src/unit-constructor2.cpp --exclude src/unit-convenience.cpp --exclude src/unit-conversions.cpp --exclude src/unit-deserialization.cpp --exclude src/unit-element_access1.cpp --exclude src/unit-element_access2.cpp --exclude src/unit-inspection.cpp --exclude src/unit-iterator_wrapper.cpp --exclude src/unit-iterators1.cpp --exclude src/unit-iterators2.cpp --exclude src/unit-json_patch.cpp --exclude src/unit-json_pointer.cpp --exclude src/unit-modifiers.cpp --exclude src/unit-pointer_access.cpp --exclude src/unit-readme.cpp --exclude src/unit-reference_access.cpp --exclude src/unit-regression.cpp --exclude src/unit-serialization.cpp --exclude src/unit-testsuites.cpp --exclude src/unit-unicode.cpp --include ../src/json.hpp --gcov-options '\-lp' --gcov 'gcov-4.9'
# env:
# - COMPILER=g++-4.9
# - SPECIAL=coveralls
-
os
:
linux
compiler
:
gcc
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
]
packages
:
[
'
g++-4.9'
,
'
rubygems'
]
before_script
:
-
wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
-
tar xf lcov_1.11.orig.tar.gz
-
sudo make -C lcov-1.11/ install
-
gem install coveralls-lcov
after_success
:
-
make clean
-
CXXFLAGS="--coverage -g -O0" CPPFLAGS="-DNDEBUG" make
-
test/json_unit "*"
-
coveralls --build-root test --exclude src/catch.hpp --exclude src/unit-algorithms.cpp --exclude src/unit-allocator.cpp --exclude src/unit-capacity.cpp --exclude src/unit-class_const_iterator.cpp --exclude src/unit-class_iterator.cpp --exclude src/unit-class_lexer.cpp --exclude src/unit-class_parser.cpp --exclude src/unit-comparison.cpp --exclude src/unit-concepts.cpp --exclude src/unit-constructor1.cpp --exclude src/unit-constructor2.cpp --exclude src/unit-convenience.cpp --exclude src/unit-conversions.cpp --exclude src/unit-deserialization.cpp --exclude src/unit-element_access1.cpp --exclude src/unit-element_access2.cpp --exclude src/unit-inspection.cpp --exclude src/unit-iterator_wrapper.cpp --exclude src/unit-iterators1.cpp --exclude src/unit-iterators2.cpp --exclude src/unit-json_patch.cpp --exclude src/unit-json_pointer.cpp --exclude src/unit-modifiers.cpp --exclude src/unit-pointer_access.cpp --exclude src/unit-readme.cpp --exclude src/unit-reference_access.cpp --exclude src/unit-regression.cpp --exclude src/unit-serialization.cpp --exclude src/unit-testsuites.cpp --exclude src/unit-unicode.cpp --include ../src/json.hpp --gcov-options '\-lp' --gcov 'gcov-4.9'
-
lcov --directory src --directory test/src --capture --output-file coverage.info --rc lcov_branch_coverage=1 --no-external
-
lcov --remove coverage.info 'test/src/*' --output-file coverage.info --rc lcov_branch_coverage=1
-
lcov --list coverage.info --rc lcov_branch_coverage=1
-
coveralls-lcov --repo-token F9bs4Nop10JRgqPQXRcifyQKYhb3FczkS coverage.info
env
:
-
COMPILER=g++-4.9
-
SPECIAL=coveralls
# Coverity (only for branch coverity_scan)
-
os
:
linux
compiler
:
gcc
before_install
:
echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
]
packages
:
[
'
g++-5'
,
'
valgrind'
]
coverity_scan
:
project
:
name
:
"
nlohmann/json"
description
:
"
Build
submitted
via
Travis
CI"
notification_email
:
niels.lohmann@gmail.com
build_command_prepend
:
"
make
clean
;
sudo
cp
$(which
g++-5)
$(which
g++)"
build_command
:
"
make"
branch_pattern
:
coverity_scan
env
:
-
COMPILER=g++-5
-
SPECIAL=coverity
# OSX / Clang
-
os
:
osx
...
...
@@ -109,61 +188,6 @@ matrix:
env
:
LLVM_VERSION=3.8.1
compiler
:
clang
# Valgrind
-
os
:
linux
compiler
:
gcc
env
:
-
COMPILER=g++-4.9
-
SPECIAL=valgrind
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
]
packages
:
[
g++-4.9
,
valgrind
]
after_success
:
-
valgrind --error-exitcode=1 --leak-check=full test/json_unit "*" ;
# Coveralls
-
os
:
linux
compiler
:
gcc
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
]
packages
:
[
'
g++-4.9'
,
'
valgrind'
,
'
python-pip'
,
'
python-yaml'
]
before_script
:
-
pip install --user git+git://github.com/eddyxu/cpp-coveralls.git
after_success
:
-
make clean
-
touch src/json.hpp
-
make json_unit CXXFLAGS="-fprofile-arcs -ftest-coverage -std=c++11 -lstdc++" CXX=$COMPILER
-
test/json_unit "*"
-
coveralls --build-root test --exclude src/catch.hpp --exclude src/unit-algorithms.cpp --exclude src/unit-allocator.cpp --exclude src/unit-capacity.cpp --exclude src/unit-class_const_iterator.cpp --exclude src/unit-class_iterator.cpp --exclude src/unit-class_lexer.cpp --exclude src/unit-class_parser.cpp --exclude src/unit-comparison.cpp --exclude src/unit-concepts.cpp --exclude src/unit-constructor1.cpp --exclude src/unit-constructor2.cpp --exclude src/unit-convenience.cpp --exclude src/unit-conversions.cpp --exclude src/unit-deserialization.cpp --exclude src/unit-element_access1.cpp --exclude src/unit-element_access2.cpp --exclude src/unit-inspection.cpp --exclude src/unit-iterator_wrapper.cpp --exclude src/unit-iterators1.cpp --exclude src/unit-iterators2.cpp --exclude src/unit-json_patch.cpp --exclude src/unit-json_pointer.cpp --exclude src/unit-modifiers.cpp --exclude src/unit-pointer_access.cpp --exclude src/unit-readme.cpp --exclude src/unit-reference_access.cpp --exclude src/unit-regression.cpp --exclude src/unit-serialization.cpp --exclude src/unit-testsuites.cpp --exclude src/unit-unicode.cpp --include ../src/json.hpp --gcov-options '\-lp' --gcov 'gcov-4.9'
env
:
-
COMPILER=g++-4.9
-
SPECIAL=coveralls
# Coverity (only for branch coverity_scan)
-
os
:
linux
compiler
:
gcc
before_install
:
echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
]
packages
:
[
'
g++-5'
,
'
valgrind'
]
coverity_scan
:
project
:
name
:
"
nlohmann/json"
description
:
"
Build
submitted
via
Travis
CI"
notification_email
:
niels.lohmann@gmail.com
build_command_prepend
:
"
make
clean
;
sudo
cp
$(which
g++-5)
$(which
g++)"
build_command
:
"
make"
branch_pattern
:
coverity_scan
env
:
-
COMPILER=g++-5
-
SPECIAL=coverity
#####################
# installation step #
#####################
...
...
test/Makefile
View file @
d02e67d4
...
...
@@ -51,4 +51,4 @@ json_unit: $(OBJECTS) ../src/json.hpp src/catch.hpp
@
$(CXX)
$(CXXFLAGS)
$(CPPFLAGS)
-c
$<
-o
$@
clean
:
rm
-fr
json_unit
$(OBJECTS)
rm
-fr
json_unit
$(OBJECTS)
$(SOURCES:.cpp=.gcno)
$(SOURCES:.cpp=.gcda)
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