From: Justin C. <cha...@gm...> - 2014-08-18 03:25:59
|
I just noticed that Automake redirects the output of Check to ./test-suite.log. At the very least I have access to the Check output and it only requires a slightly longer command: $ make check || cat ./test-suite.log On Sun, Aug 17, 2014 at 1:54 AM, Justin Charette <cha...@gm...> wrote: > Hi, > > I'm an amateur C programming teaching myself autotools and check > testing with a few personal projects. I'm following the basic unit > testing tutorial[1]. Section 3.5 indicates that when I run `make > check`, the output from the test runner will appear in addition to > Automake's test output. > >> With the CK_NORMAL flag specified in our main(), let’s rerun make check now. As before, we get the following satisfying output: >> >> >> >> Running suite(s): Money >> 0%: Checks: 1, Failures: 1, Errors: 0 >> check_money.c:9:F:Core:test_money_create:0: Assertion 'money_amount (m)==5' failed: >> money_amount (m)==0, 5==5 >> FAIL: check_money >> ===================================================== >> 1 of 1 test failed >> Please report to check-devel AT lists.sourceforge.net >> ===================================================== >> >> [...] >> >> >> >> After that we have some higher level output generated by Automake: the check_money program failed, and the bug-report address given in ‘configure.ac’ is printed. > > > However, I only see the higher level output generated by Automake when > I run `make check`. > > make check-TESTS > make[1]: Entering directory > 'files/development/allrgb/simple-color-iterator/repo/build' > make[2]: Entering directory > 'files/development/allrgb/simple-color-iterator/repo/build' > FAIL: test/unit/color/rgb12/get > PASS: test/unit/color/rgb12/new > make[3]: Entering directory > 'files/development/allrgb/simple-color-iterator/repo/build' > make all-am > make[4]: Entering directory > 'files/development/allrgb/simple-color-iterator/repo/build' > make[4]: Leaving directory > 'files/development/allrgb/simple-color-iterator/repo/build' > make[3]: Leaving directory > 'files/development/allrgb/simple-color-iterator/repo/build' > ============================================================================ > Testsuite summary for simple-color-generator 0.0.0 > ============================================================================ > # TOTAL: 2 > # PASS: 1 > # SKIP: 0 > # XFAIL: 0 > # FAIL: 1 > # XPASS: 0 > # ERROR: 0 > ============================================================================ > See ./test-suite.log > Please report to xy...@xy... > ============================================================================ > > Is there some configuration I've missed? I want the check output to > appear when I run `make check` as it's more informative than Automake. > > I do get the desired output when I run the test running manually. e.g. > > $ cd files/development/allrgb/simple-color-iterator/repo/build > $ ./test/unit/color/rgb12/get > Running suite(s): rgb12_suite > 66%: Checks: 3, Failures: 1, Errors: 0 > ../test/unit/color/rgb12/get.c:7:F:get:test__rgb12_blue_get__always__return_blue_value:0: > Assertion '1==rgb12_blue_get(o)' failed: 1==1, rgb12_blue_get(o)==2 > > Here's my build environment: > > check 0.9.13 > autoconf 2.69 > automake 1.14.1 > clang 3.4.2 > > Thanks, > Justin C. > > [1] http://check.sourceforge.net/doc/check_html/check_3.html |