Skip to content

Commit

Permalink
Added "tests" target for make.
Browse files Browse the repository at this point in the history
'make check' allows one to build and run the test suite. However,
'make tests' allows one to build the test suite without running it.

Review: https://reviews.apache.org/r/29551
  • Loading branch information
karya0 authored and jmlvanre committed Oct 17, 2015
1 parent 7ec7cef commit 65917d9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions 3rdparty/Makefile.am
Expand Up @@ -117,3 +117,6 @@ all-local: $(ALL_LOCAL)
clean-local:
rm -r -f $(CLEAN_EXTRACTED)
rm -f *-stamp

tests: all
@cd libprocess && $(MAKE) $(AM_MAKEFLAGS) tests
3 changes: 3 additions & 0 deletions Makefile.am
Expand Up @@ -78,6 +78,9 @@ bench: all

PHONY_TARGETS += bench

tests: all
@cd 3rdparty && $(MAKE) $(AM_MAKEFLAGS) tests
@cd src && $(MAKE) $(AM_MAKEFLAGS) tests

# Using LT_OUTPUT in configure.ac creates config.lt that doesn't get
# cleaned up by distclean-libtool. See this bug patch (which doesn't
Expand Down
3 changes: 2 additions & 1 deletion docs/submitting-a-patch.md
Expand Up @@ -43,7 +43,8 @@ layout: documentation
4. Now all of the files generated by the build process will be contained in the build directory you created, instead of being spread throughout the src directory, which is a bit messier. This is both cleaner, and makes it easy to clean up if you want to get rid of the files generated by `configure` and `make`. I.e. You can reset your build process without risking changes you made in the src directory, by simply deleting the build directory, and creating a new one.

3. Make sure that all of the unit tests pass, including the new test cases you have added: `make check`.
1. To execute a single unit test (helpful when trying to debug a test case failure), use something like: `make check GTEST_FILTER="HTTPTest.Delete"`.
1. To build all tests without executing them, use something like: `make tests`.
2. To execute a single unit test (helpful when trying to debug a test case failure), use something like: `make check GTEST_FILTER="HTTPTest.Delete"`.

4. Make sure to pull in any changes that have been committed to master branch. Using Git, do this via something like:
1. `git checkout master`
Expand Down
4 changes: 3 additions & 1 deletion src/Makefile.am
Expand Up @@ -1885,9 +1885,11 @@ dist_check_SCRIPTS += \
# runner that ships with newer versions of autotools.
# See the following discussion for the workaround:
# http://lists.gnu.org/archive/html/automake/2013-01/msg00051.html
check-local: mesos-tests
check-local: tests
./mesos-tests

clean-local: clean-java clean-python

tests: all $(check_PROGRAMS) mesos-tests

.PHONY: $(PHONY_TARGETS)

0 comments on commit 65917d9

Please sign in to comment.