CU_basic_show_failures() fails to properly run tests

Bug #1194351 reported by Michael D. Stemle, Jr.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cunit (Ubuntu)
New
Undecided
Unassigned

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
libcunit1-dev:
  Installed: 2.1-0.dfsg-10ubuntu1
  Candidate: 2.1-0.dfsg-10ubuntu1
  Version table:
 *** 2.1-0.dfsg-10ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ 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
     http://cunit.sourceforge.net/

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.

Revision history for this message
Michael D. Stemle, Jr. (manchicken) wrote :
Revision history for this message
Azat Khuzhin (azat) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.