CU_basic_show_failures() fails to properly run tests

Bug #1194351 reported by Michael D. Stemle, Jr. on 2013-06-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cunit (Ubuntu)

Bug Description

When I am building a test for my own library, I notice that the test binaries generated linking against the version of CUnit in the main repo doesn't actually run any tests, but does give an error code which is apparently detached from error messages. This is easily replicable and I have a test program that works like a charm.

To contrast, I built the latest version of CUnit from sourceforge and I did not see this same erroneous behavior, it worked just fine.

System info:

manchicken@chickenSandwich:~/Documents/Devel$ lsb_release -rd
Description: Ubuntu 13.04
Release: 13.04

manchicken@chickenSandwich:~/Documents/Devel$ apt-cache policy libcunit1-dev
  Installed: 2.1-0.dfsg-10ubuntu1
  Candidate: 2.1-0.dfsg-10ubuntu1
  Version table:
 *** 2.1-0.dfsg-10ubuntu1 0
        500 raring/main amd64 Packages
        100 /var/lib/dpkg/status

Here is what I expect, given my test program (note, this is actual output using the latest stable version from SF:
manchicken@chickenSandwich:~/Documents/Devel$ ./libcunit1-bug
I'm here!

     CUnit - A unit testing framework for C - Version 2.1-2

HERE!!! Suite Initted!

Suite: bug_demo_suite
  Test: Verify 1 == 1... ...passedHERE!!! Suite Cleaned!

Run Summary: Type Total Ran Passed Failed Inactive
              suites 1 1 n/a 0 0
               tests 1 1 1 0 0
             asserts 1 1 1 0 n/a

Elapsed time = 0.000 seconds

I'm done!

Here's what I get using the latest from the main repo:
manchicken@chickenSandwich:~/Documents/Devel$ ./libcunit1-bug
I'm here!
Error running tests: (20)No Error

I'm done!

Here is how to build my test program: $ gcc -o libcunit1-bug ./libcunit1-bug.c -lcunit
I have attached my test program to this bug report.

This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers