[erlang-patches] fix eunit to print stacktrace correctly

Wei Cao <>
Wed Nov 2 07:11:44 CET 2011


R15 adds file and lineno in the result of erlang:get_stacktrace/0, so
eunit should be updated accordingly to accomodate the new stacktrace format.

before fix:

:~/codebase/mysql_prj/rds/trunk/rds$ make eunit
module 'rds_lib'
rds_la_split_file: read_test (module 'rds_la_split_file')...*failed*
::{badmatch,nomatch}

after fix:
:~/codebase/mysql_prj/rds/trunk/rds$ make eunit
module 'rds_lib'
rds_la_split_file: read_test (module
'rds_la_split_file')...rds_la_split_file: read_test (module
'rds_la_split_file')...*failed*
::error:{badmatch,nomatch}
  in function rds_la_split_file:'-dates/1-fun-0-'/2
[src/rds_la_split_file.erl:149]
  in call from lists:map/2 [lists.erl:1168]
  in call from rds_la_split_file:'-dates/1-fun-1-'/1
[src/rds_la_split_file.erl:147]
  in call from lists:map/2 [lists.erl:1168]
  in call from rds_la_split_file:dates/1 [src/rds_la_split_file.erl:145]
  in call from rds_la_split_file:seek_date/2 [src/rds_la_split_file.erl:136]
  in call from rds_la_split_file:read_test/0 [src/rds_la_split_file.erl:194]


git fetch git://github.com/weicao/otp.git fix_eunit_print_stacktrace


https://github.com/weicao/otp/compare/fix_eunit_print_stacktrace<https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll>

https://github.com/weicao/otp/compare/fix_eunit_print_stacktrace.patch<https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll.patch>



-- 

Best,

Wei Cao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20111102/8613267b/attachment.html>


More information about the erlang-patches mailing list