OCaml Forge
SCM

Detail: [#1328] OUnit's unit tests depend on OCAMLRUNPARAM

Bugs: Browse | Download .csv | Monitor

[#1328] OUnit's unit tests depend on OCAMLRUNPARAM

Date:
2013-10-07 13:11
Priority:
3
State:
Closed
Submitted by:
d bueno (efforeffort)
Assigned to:
Sylvain Le Gall (gildor-admin)
Severity:
None
Component:
None
Product:
None
Resolution:
None
Version:
v1.1.2
 
URL:
Status:
 
Summary:
OUnit's unit tests depend on OCAMLRUNPARAM

Detailed description
In my .bashrc I have OCAMLRUNPARAM="b" so that I can get useful stack
traces with ocaml. This interacts poorly with the way OUnit expects
certain tests to be run.

==============================================================================
Failure: OUnit:7:test_case_decorate

OUnit: expected: RFailure("suite_c:1:label", "OUnit: fail");
RFailure("suite_c:0", "OUnit: fail")
but got: RFailure("suite_c:1:label", "OUnit: fail\nRaised at file
\"pervasives.ml\", line 22, characters 22-33\nCalled from file
\"src/oUnit.ml\", line 597, characters 6-10\n"); RFailure("suite_c:0",
"OUnit: fail\nRaised at file \"pervasives.ml\", line 22, characters
22-33\nCalled from file \"src/oUnit.ml\", line 597, characters
6-10\n")
Raised at file "pervasives.ml", line 22, characters 22-33
Called from file "src/oUnit.ml", line 597, characters 6-10

------------------------------------------------------------------------------
Ran: 12 tests in: 0.04 seconds.
FAILED: Cases: 12 Tried: 12 Errors: 0 Failures: 1 Skip:0 Todo:0
W: Test 'main' fails: Command
'/home/dbueno/bap-0.7/ounit/_build/test/test.byte' terminated with
error code 1
E: Failure("Tests had a 100.00% failure rate")
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/dbueno/bap-0.7/ounit'
make: *** [all-recursive] Error 1


One way to fix this would be to test that the expected string is a
prefix of the actual string, but, I think ignoring OCAMLRUNPARAM
during build is easier.

Adding

OCAMLRUNPARAM :=

to the top of ounit/Makefile appears to fix the problem without
permanently changing the shell's variables.

Followup

Message
Date: 2013-10-22 19:51
Sender: Sylvain Le Gall

Hi, just have tested this and the error doesn't appear in OUnit 2.0.0. In this new version (since a month), we separated stacktrace from the failure message.

I recommend you to upgrade your OUnit version.

Regards
Sylvain

Attached Files:

Changes:

Field Old Value Date By
status_idOpen2013-10-22 19:51gildor-admin
close_dateNone2013-10-22 19:51gildor-admin
assigned_tonone2013-10-07 20:27gildor-admin