ceph/Makefile.am
Tommi Virtanen 9b0d577696 Use Google Test framework for unit tests.
Use ``make check`` to run the tests.

The src/gtest directory comes from ``svn export
http://googletest.googlecode.com/svn/tags/release-1.5.0 src/gtest``
and running "git add -f src/gtest".

gtest is licensed under the New BSD license, see src/gtest/COPYING.
For more on Google Test, see http://code.google.com/p/googletest/

Changed autogen.sh regenerate gtest automake files too. Make sure to
run ``./autogen.sh && ./configure`` after merging this commit, or
incremental builds may fail. The automake integration is inspired
heavily by the protobuf project, and may still be problematic.

Make git ignore files generated by gtest compilation.

Currently putting in just one new-style unit test, refactoring old
tests to fit will come in separate commits.

Note: if you are starting daemons, listening on TCP ports, using
multiple machines, mounting filesystems, etc, it's not a unit test
and does not belong in this setup. A framework for system/integration
tests will be provided later.
2011-01-10 15:19:45 -08:00

21 lines
738 B
Makefile

AUTOMAKE_OPTIONS = gnu
EXTRA_DIST = autogen.sh ceph.spec.in
# the "." here makes sure check-local builds gtest before it is used
SUBDIRS = . src man
# Build gtest before we build our own tests. Doing this instead of
# SUBDIRS gtest's own tests being run and slowing us down.
check-local:
@echo "Making lib/libgtest.a lib/libgtest_main.a in src/gtest"
@cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
# "make distclean" both runs this and recurses into src/gtest, if
# gtest is in DIST_SUBDIRS. Take extra care to not fail when
# effectively cleaned twice.
clean-local:
@if test -e src/gtest/Makefile; then \
echo "Making clean in src/gtest"; \
cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) clean; \
fi