Skip to content
Snippets Groups Projects
Commit 127f029f authored by Luka Stanisic's avatar Luka Stanisic
Browse files

Merge branch 'master' of gitlab.mpcdf.mpg.de:mpcdf/testing_example

parents 8ba36639 96df0ec1
No related branches found
No related tags found
No related merge requests found
Pipeline #63509 failed
......@@ -13,22 +13,20 @@ default:
unit_test-gcc9:
stage: unit_test
script:
- module load gcc/9
- CC=gcc CXX=g++ CXXFLAGS="-std=c++11" ./get_gtest.sh
- make compile unit_tests CC=gcc CXX=g++ CXXFLAGS="-std=c++11 -I$PWD/googletest/install/include" LDFLAGS="-L$PWD/googletest/install/lib64"
- module load gcc/9 googletest
- make compile unit_tests CC=gcc CXX=g++ CXXFLAGS="-std=c++11 -I$GTEST_HOME/include" LDFLAGS="-L$GTEST_HOME/lib64"
unit_test-intel19:
stage: unit_test
script:
- module load intel/19.0.4
- CC=icc CXX=icpc CXXFLAGS="-std=c++11" ./get_gtest.sh
- make compile unit_tests CC=icc CXX=icpc CXXFLAGS="-std=c++11 -I$PWD/googletest/install/include" LDFLAGS="-L$PWD/googletest/install/lib64"
- module load intel/19.0.4 googletest
- make compile unit_tests CC=icc CXX=icpc CXXFLAGS="-std=c++11 -I$GTEST_HOME/include" LDFLAGS="-L$GTEST_HOME/lib64"
regression_test-gcc9:
stage: regression_test
script:
- module load gcc/9
- make compile regression_test CC=gcc CXX=g++ CXXFLAGS="-std=c++11 -I$PWD/googletest/install/include" LDFLAGS="-L$PWD/googletest/install/lib64"
- make compile regression_test CC=gcc CXX=g++ CXXFLAGS="-std=c++11"
only:
- master
- merge_requests
......@@ -37,7 +35,7 @@ coverage:
stage: coverage
script:
- module load gcc/9
- make compile_coverage regression_test CC=gcc CXX=g++ CXXFLAGS="-std=c++11 -I$PWD/googletest/install/include" LDFLAGS="-L$PWD/googletest/install/lib64"
- make compile_coverage regression_test CC=gcc CXX=g++ CXXFLAGS="-std=c++11"
- gcov -r main.gcno
- "cat *.gcov | awk 'BEGIN{total=0;covered=0}; /^ *-:/ {}; /^ *#+:/ {total+=1}; /^ *[0-9]+:/ {total+=1; covered+=1}; END {print \"Total coverage: \" covered/total*100 \"%\"}'"
only:
......
LICENSE 0 → 100644
Copyright 2019 L. Stanisic, S. Ohlmann (MPCDF)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
......@@ -53,7 +53,7 @@ show_cov: coverage
# Cleaning section
distclean: clean clean_tests clean_coverage
.PHONY: clean
.PHONY: clean clean_tests clean_coverage
clean:
rm -f $(APP)
......@@ -61,6 +61,4 @@ clean_tests:
rm -rf $(TESTS)/Makefile $(TESTS)/CMakeFiles $(TESTS)/CMakeCache.txt $(TESTS)/cmake_install.cmake $(TESTS)/CMakeFiles $(TESTS)/runTests $(OUT_E) $(OUT_T) $(TEST_APP) *.o
clean_coverage:
rm -rf *.gcno *.gcda $(APP).info $(COV)
rm -rf *.gcno *.gcda $(APP).info $(COV) *.gcov
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment