forked from BOINC/boinc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request BOINC#3107 from BOINC/cb_gtest_integration_ci
Tests: add unit testing framework using googletest
- Loading branch information
Showing
17 changed files
with
493 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
codecov: | ||
notify: | ||
require_ci_to_pass: yes | ||
|
||
comment: | ||
layout: "diff, files" | ||
behavior: default | ||
require_changes: false # if true: only post the comment if coverage changes | ||
require_base: no # [yes :: must have a base report to post] | ||
require_head: yes # [yes :: must have a head report to post] | ||
|
||
# don't gather statistics for tets and external libraries | ||
ignore: | ||
- tests/.* | ||
- zip/.* | ||
- 3rdParty/.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/bin/bash | ||
|
||
# This file is part of BOINC. | ||
# http://boinc.berkeley.edu | ||
# Copyright (C) 2019 University of California | ||
# | ||
# BOINC is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU Lesser General Public License | ||
# as published by the Free Software Foundation, | ||
# either version 3 of the License, or (at your option) any later version. | ||
# | ||
# BOINC is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# See the GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with BOINC. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# Script to build a googletest library for BOINC | ||
|
||
# Usage: | ||
# cd [path]/googletest-release-1.8.1/ | ||
# source path_to_this_script [--clean] [--prefix PATH] | ||
# | ||
# the --clean argument will force a full rebuild. | ||
# if --prefix is given as absolute path the library is installed into there | ||
|
||
doclean="" | ||
debug_flag="" | ||
lprefix="" | ||
cmdline_prefix="" | ||
while [[ $# -gt 0 ]]; do | ||
key="$1" | ||
case $key in | ||
-clean|--clean) | ||
doclean="yes" | ||
;; | ||
-prefix|--prefix) | ||
lprefix="$2" | ||
cmdline_prefix="--prefix=${lprefix}" | ||
shift | ||
;; | ||
esac | ||
shift # past argument or value | ||
done | ||
|
||
cd googletest | ||
autoreconf -i -f | ||
if [ $? -ne 0 ]; then cd ..; return 1; fi | ||
./configure "${cmdline_prefix}" | ||
if [ $? -ne 0 ]; then cd ..; return 1; fi | ||
if [ "${doclean}" = "yes" ]; then | ||
make clean | ||
fi | ||
make | ||
if [ $? -ne 0 ]; then cd ..; return 1; fi | ||
|
||
# make install is not supported so copy files manually | ||
if [ "x${lprefix}" != "x" ]; then | ||
mkdir -p ${lprefix}/lib ${lprefix}/include ${lprefix}/bin | ||
(cp -r lib/.libs/*.a ${lprefix}/lib && cp -r include/gtest ${lprefix}/include && cp scripts/gtest-config ${lprefix}/bin) | ||
if [ $? -ne 0 ]; then cd ..; return 1; fi | ||
fi | ||
|
||
cd .. | ||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.