Add unit test suites with initial successful dummy test (#781978)
Now 'make check' will additionally build and run the test suites in the
./tests directory. Add initial always successful dummy test suite.
This is done using Automake support for testing.
Automake Manual, 15 Support for test suites
https://www.gnu.org/software/automake/manual/automake.html#Tests
./tests/Makefile.am takes some influence from the same file in the
minimal-gtest-autotools template project.
654848ec01/tests/Makefile.am
Bug 781978 - Add Google Test C++ test framework
This commit is contained in:
parent
81b104928b
commit
dceb293f15
|
@ -43,5 +43,10 @@ missing
|
||||||
mkinstalldirs
|
mkinstalldirs
|
||||||
omf.make
|
omf.make
|
||||||
stamp-*
|
stamp-*
|
||||||
|
test-driver
|
||||||
testbuild.log
|
testbuild.log
|
||||||
|
tests/*.log
|
||||||
|
tests/*.trs
|
||||||
|
tests/test-suite.log
|
||||||
|
tests/test_dummy
|
||||||
xmldocs.make
|
xmldocs.make
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
SUBDIRS = compose data doc include lib po src
|
SUBDIRS = compose data doc include lib po src tests
|
||||||
# Only build GParted help documentation when enabled. (Can be disabled
|
# Only build GParted help documentation when enabled. (Can be disabled
|
||||||
# with './configure --disable-doc').
|
# with './configure --disable-doc').
|
||||||
if BUILD_HELP_DOC
|
if BUILD_HELP_DOC
|
||||||
|
|
|
@ -383,6 +383,7 @@ lib/Makefile
|
||||||
lib/gtest/Makefile
|
lib/gtest/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
|
tests/Makefile
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
AM_CPPFLAGS = \
|
||||||
|
-I$(top_srcdir)/include \
|
||||||
|
-I$(top_srcdir)/lib/gtest/include \
|
||||||
|
$(GTEST_CPPFLAGS)
|
||||||
|
AM_CXXFLAGS = -Wall $(GTEST_CXXFLAGS)
|
||||||
|
AM_LDFLAGS = $(GTEST_LDFLAGS)
|
||||||
|
LDADD = \
|
||||||
|
$(GTEST_LIBS) \
|
||||||
|
$(top_srcdir)/lib/gtest/lib/libgtest_main.la \
|
||||||
|
$(top_srcdir)/lib/gtest/lib/libgtest.la
|
||||||
|
|
||||||
|
# Programs to be built by "make check"
|
||||||
|
check_PROGRAMS = \
|
||||||
|
test_dummy
|
||||||
|
|
||||||
|
# Test cases to be run by "make check"
|
||||||
|
TESTS = $(check_PROGRAMS)
|
||||||
|
|
||||||
|
test_dummy_SOURCES = test_dummy.cc
|
|
@ -0,0 +1,14 @@
|
||||||
|
/* Copyright (C) 2017 Mike Fleetwood
|
||||||
|
*
|
||||||
|
* Copying and distribution of this file, with or without modification,
|
||||||
|
* are permitted in any medium without royalty provided the copyright
|
||||||
|
* notice and this notice are preserved. This file is offered as-is,
|
||||||
|
* without any warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
|
TEST( DummyTest, Success )
|
||||||
|
{
|
||||||
|
EXPECT_TRUE( true );
|
||||||
|
}
|
Loading…
Reference in New Issue