title: Using The Boost Unit Test Framework (UTF) with `make check`
body: <p>My C++ application has various shell-based integrations tests for standalone programs as well as source code unit tests for the app's API. The tests are run through the <code>make check</code> target, generated through Autotools (autoconf, automake), which <a href="http://www.gnu.org/software/automake/manual/automake.html#Tests">come with a test-driver and a log parser</a>. I've started adopting the Boost Unit Test Framework for better management of unit test suites. Is there a way to run both the acceptance tests and unit tests (using both the Boost UTF and standard TAP tests) under the <code>make check</code> target?</p>
  
  <p>My <code>Makefile.am</code> looks something like this:</p>
  
  <pre><code>check_PROGRAMS = test1 test2
  SOURCES = test1.cpp test2.cpp
  CC = g++
  TESTS = $(check_PROGRAMS) standalone1.test standalone2.test
  LDADD = -lboost_unit_test_framework
  TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
      $(top_srcdir)/test/tap-driver.sh
  EXTRA_DIST = $(TESTS)
  </code></pre>
  
  <p>The Boost UTF test suite looks like this:</p>
  
  <pre><code>#define BOOST_TEST_DYN_LINK
  #define BOOST_TEST_MODULE "My Unit Tests"
  
  #include &lt;boost/test/unit_test.hpp&gt;
  
  BOOST_AUTO_TEST_SUITE(MyTestSuite1);
      BOOST_AUTO_TEST_CASE(MyTestCase1) {
          BOOST_CHECK(true);
      }
  BOOST_AUTO_TEST_SUITE_END();
  </code></pre>