Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(CppUTest)

set(CppUTest_version_major 3)
set(CppUTest_version_minor 8dev)
set(CppUTest_version_minor 7.2)

# 2.6.3 is needed for ctest support
cmake_minimum_required(VERSION 2.6.3)
Expand Down
47 changes: 30 additions & 17 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ include_cpputestext_HEADERS = \
include/CppUTestExt/MockSupport.h \
include/CppUTestExt/MockSupportPlugin.h \
include/CppUTestExt/MockSupport_c.h \
include/CppUTestExt/OrderedTest.h
include/CppUTestExt/OrderedTest.h

endif

CppUTestTests_CPPFLAGS = $(lib_libCppUTest_a_CPPFLAGS)
CppUTestTests_CFLAGS = $(lib_libCppUTest_a_CFLAGS)
CppUTestTests_CXXFLAGS = $(lib_libCppUTest_a_CXXFLAGS)
CppUTestTests_CXXFLAGS = $(lib_libCppUTest_a_CXXFLAGS)
CppUTestTests_LDADD = lib/libCppUTest.a $(CPPUTEST_LDADD)
CppUTestTests_LDFLAGS = $(AM_LDFLAGS) $(CPPUTEST_LDFLAGS) $(CPPUTEST_ADDITIONAL_LDFLAGS)

Expand Down Expand Up @@ -163,7 +163,7 @@ CppUTestTests_SOURCES = \

CppUTestExtTests_CPPFLAGS = $(lib_libCppUTestExt_a_CPPFLAGS)
CppUTestExtTests_CFLAGS = $(lib_libCppUTestExt_a_CFLAGS)
CppUTestExtTests_CXXFLAGS = $(lib_libCppUTestExt_a_CXXFLAGS)
CppUTestExtTests_CXXFLAGS = $(lib_libCppUTestExt_a_CXXFLAGS)
CppUTestExtTests_LDADD = lib/libCppUTestExt.a lib/libCppUTest.a $(CPPUTEST_LDADD)
CppUTestExtTests_LDFLAGS = $(CppUTestTests_LDFLAGS)

Expand Down Expand Up @@ -197,7 +197,7 @@ if INCLUDE_GMOCKTESTS

#GTestTests_SOURCES = \
$(GMOCK_HOME)/test/gmock-spec-builders_test.cc \
tests/CppUTestExt/AllTests.cpp
tests/CppUTestExt/AllTests.cpp
endif

RUN_CPPUTEST_TESTS = ./$(CPPUTEST_TESTS)
Expand All @@ -216,19 +216,19 @@ endif
cpputest_build_gtest17:
mkdir -p cpputest_build_gtest17
cd cpputest_build_gtest17; \
wget https://googlemock.googlecode.com/files/gmock-1.7.0.zip && unzip gmock-1.7.0.zip
wget https://googlemock.googlecode.com/files/gmock-1.7.0.zip && unzip gmock-1.7.0.zip
cd cpputest_build_gtest17/gmock-1.7.0; ./configure && make check

cpputest_build_gtest16:
mkdir -p cpputest_build_gtest16
cd cpputest_build_gtest16; \
wget https://googlemock.googlecode.com/files/gmock-1.6.0.zip && unzip gmock-1.6.0.zip
wget https://googlemock.googlecode.com/files/gmock-1.6.0.zip && unzip gmock-1.6.0.zip
cd cpputest_build_gtest16/gmock-1.6.0; ./configure CXXFLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1 && make check

cpputest_build_gtest15:
mkdir -p cpputest_build_gtest15
cd cpputest_build_gtest15; \
wget https://googlemock.googlecode.com/files/gmock-1.5.0.zip && unzip gmock-1.5.0.zip
wget https://googlemock.googlecode.com/files/gmock-1.5.0.zip && unzip gmock-1.5.0.zip
cd cpputest_build_gtest15/gmock-1.5.0; ./configure CXXFLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1 && make

check_gtest15: cpputest_build_gtest15
Expand All @@ -245,7 +245,7 @@ check_gtest17: cpputest_build_gtest17
@echo "Build using gmock 1.7"
export GMOCK_HOME=`pwd`/cpputest_build_gtest17/gmock-1.7.0; \
make distclean; $(srcdir)/configure; make check

remove_gtest_directories:
rm -rf cpputest_build_gtest15
rm -rf cpputest_build_gtest16
Expand All @@ -255,13 +255,13 @@ check_gtest: remove_gtest_directories check_gtest15 check_gtest16 check_gtest17

check_basic:
@echo "If dash is available, run the configure with dash to find bash-isms and increase portability"
make distclean; if test "x$(CPPUTEST_HAS_DASH)" = xyes; then CONFIG_SHELL=dash $(srcdir)/configure; fi
make distclean; if test "x$(CPPUTEST_HAS_DASH)" = xyes; then CONFIG_SHELL=dash $(srcdir)/configure; fi

@echo "Building and valgrinding (skipping this on MacOS due to buggy Valgrind"
if test "x$(CPPUTEST_ON_MACOSX)" = xno; then \
make distclean; $(srcdir)/configure; make valgrind; \
fi

@echo "Building without extensions"
make distclean; $(srcdir)/configure --disable-extensions; make check

Expand Down Expand Up @@ -309,36 +309,49 @@ check_coverage:
else \
make distclean; $(srcdir)/configure -enable-coverage CFLAGS="-O0" CXXFLAGS="-O0"; \
fi

make check

./$(CPPUTEST_TESTS) >> test_output.txt; ./$(CPPUTESTEXT_TESTS) >> test_output.txt
./$(CPPUTEST_TESTS) >> test_output.txt; ./$(CPPUTESTEXT_TESTS) >> test_output.txt
$(SILENCE)for f in `ls *.gcno` ; do \
gcov $(CppUTestExtTests_SOURCES) $(CppUTestTests_SOURCES) $(lib_libCppUTest_a_SOURCES) $(lib_libCppUTestExt_a_SOURCES) -o $$f 1>>gcov_output.txt 2>>gcov_error.txt; \
done
$(srcdir)/scripts/filterGcov.sh gcov_output.txt gcov_error.txt gcov_report.txt test_output.txt
cat gcov_report.txt
if test "x$(CPPUTEST_HAS_LCOV)" = xyes; then lcov -c -d . -o temp.info; lcov -r temp.info /usr\* -o coverage.info; genhtml -o test_coverage coverage.info; fi

remove_coverage_output:
rm -f gcov_output.txt gcov_error.txt gcov_report.txt test_output.txt gcov_report.txt.html temp.info coverage.info
rm -rf test_coverage

check_examples:
@echo "Using the old Makefile and examples"
make distclean
$(MAKE) -C $(srcdir) -f Makefile_using_MakefileWorker extensions
$(MAKE) -C $(srcdir) -f Makefile_using_MakefileWorker extensions
$(MAKE) -C $(srcdir)/examples all clean

@echo "Compiling and running the examples. This will use the old Makefile"
make distclean; $(srcdir)/configure; make; $(MAKE) -C $(srcdir)/examples all clean CPPUTEST_LIB_LINK_DIR="`pwd`/lib"

check_all: check_basic check_special_situations check_coverage remove_coverage_output check_examples check_gtest
@echo "Last... one normal build and test"
make distclean; $(srcdir)/configure; make check;
make distclean; $(srcdir)/configure; make check;
@echo "Check running tests repeatedly"
$(RUN_CPPUTEST_TESTS) - r; $(RUN_CPPUTESTEXT_TESTS) -r
@echo "Check running tests in separate process (CppUTestExtTests TEST_GROUP(TestOrderedTestMacro) would have to fail)"
$(RUN_CPPUTEST_TESTS) -p;

# Mac OSX adds an annoying directory when packaging. This can be prevented by setting COPYFILE_DISABLE=1
# However, I've not figured out how to set it automatically and neither google nor stackoverflow knew the answer.
# The automake mailing list is still thinking about it, and thus, I've added this check so that I don't forget to do it :)
# More info: http://superuser.com/questions/61185/why-do-i-get-files-like-foo-in-my-tarball-on-os-x
dist-hook:
if test "x$(CPPUTEST_ON_MACOSX)" = "xyes"; then \
if test ! "x$(COPYFILE_DISABLE)" = "x1"; then \
echo ""; \
echo 'ERROR: When packaging on MacOSX, please run "COPYFILE_DISABLE=1 make dist"'; \
echo ""; \
exit 1; \
fi \
fi

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

AC_PREREQ([2.68])
AC_INIT([CppUTest], [3.8dev], [https://github.com/cpputest/cpputest])
AC_INIT([CppUTest], [3.7.2], [https://github.com/cpputest/cpputest])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/CppUTest/Utest.cpp])
AC_CONFIG_HEADERS([config.h])
Expand Down