Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Testcase fails #2

Open
aerosol opened this issue Aug 27, 2012 · 2 comments
Open

Testcase fails #2

aerosol opened this issue Aug 27, 2012 · 2 comments

Comments

@aerosol
Copy link

aerosol commented Aug 27, 2012

  lua_test:71: oh_test_ (next)...*failed*
::{assertEqual_failed,[{module,lua_test},
                     {line,155},
                     {expression,"lua : tolstring ( L , - 1 )"},
                     {expected,<<"2">>},
                     {value,<<"1">>}]}

Let me know if I can provide you with some more information.

@motiejus
Copy link
Owner

Thanks for reporting.

Please show full output of make test: everything from the point you start fetching the code. Also, lua library version and operating system you are using. Is this the only test case failing? Did you change anything in the library?

Project is continuously tested on Travis-CI (https://secure.travis-ci.org/#!/Motiejus/erlualib), so it's quite queer that this one fails. Never did for me. Interesting stuff.

@aerosol
Copy link
Author

aerosol commented Aug 27, 2012

It doesn't happen on every run. That one fails randomly, as shown below.

lua 5.2.1
osx 10.6.8
erlualib d102ef3 (no local changes)

erlualib git:master ❯ cd /tmp                                                                                                                                                                             ⬆
/tmp ❯ git clone git://github.com/Motiejus/erlualib.git
Cloning into 'erlualib'...
remote: Counting objects: 923, done.
remote: Compressing objects: 100% (328/328), done.
remote: Total 923 (delta 610), reused 881 (delta 573)
Receiving objects: 100% (923/923), 115.81 KiB | 98 KiB/s, done.
Resolving deltas: 100% (610/610), done.
/tmp ❯ cd erlualib
erlualib git:master ❯ export LDFLAGS="-L/Users/adam/dev/lua-5.2.1/install/lib -llua -lm"
erlualib git:master ❯ export CFLAGS="-I/Users/adam/dev/lua-5.2.1/install/include/"
erlualib git:master ❯ make
erl -noshell -s inets start -s ssl start \
        -eval 'httpc:request(get, {"https://github.com/downloads/Motiejus/erlualib/rebar", []}, [], [{stream, "./rebar"}])' \
        -s inets stop -s init stop

=INFO REPORT==== 27-Aug-2012::23:18:14 ===
    application: inets
    exited: stopped
    type: temporary
chmod +x ./rebar
./rebar  get-deps compile xref
==> erlualib (get-deps)
==> erlualib (compile)
Compiled src/lua_behaviour.erl
Compiled src/proper_utils.erl
Compiled src/lua_driver.erl
Compiled src/lua_crutas.erl
Compiled src/lua_common.erl
Compiled src/lual.erl
Compiled src/luam.erl
Compiled src/lua.erl
Compiling c_src/commands.c
Compiling c_src/liberlang.c
Compiling c_src/lua_drv.c
==> erlualib (xref)
erlualib git:master ❯ make test
./rebar -C rebar_test.config get-deps compile xref
==> erlualib (get-deps)
Pulling proper from {git,"git://github.com/manopapad/proper.git",{tag,"v1.0"}}
Cloning into 'proper'...
==> proper (get-deps)
==> proper (compile)
src/strip_types.erl:50: Warning: missing specification for function parse_transform/2
/private/tmp/erlualib/deps/proper/src/strip_types.erl:50: Warning: missing specification for function parse_transform/2
Compiled src/strip_types.erl
Compiled src/vararg.erl
Compiled src/proper_transformer.erl
Compiled src/proper_prop_remover.erl
Compiled src/proper_statem.erl
Compiled src/proper_fsm.erl
Compiled src/proper_symb.erl
Compiled src/proper_shrink.erl
Compiled src/proper_sets.erl
src/proper_types.erl:336: Warning: missing specification for function from_binary/1
src/proper_types.erl:437: Warning: missing specification for function unwrap/1
/private/tmp/erlualib/deps/proper/src/proper_types.erl:336: Warning: missing specification for function from_binary/1
/private/tmp/erlualib/deps/proper/src/proper_types.erl:437: Warning: missing specification for function unwrap/1
Compiled src/proper_types.erl
Compiled src/proper_queue.erl
Compiled src/proper_ordsets.erl
Compiled src/proper_orddict.erl
Compiled src/proper_gb_trees.erl
Compiled src/proper_gb_sets.erl
Compiled src/proper_dict.erl
Compiled src/proper_array.erl
Compiled src/proper_gen.erl
Compiled src/proper_arith.erl
Compiled src/proper_typeserver.erl
Compiled src/proper.erl
==> erlualib (compile)
Compiled p_test/lual_test.erl
Compiled p_test/lua_crutas_test.erl
Compiled p_test/luam_test.erl
Compiled p_test/lua_test.erl
==> proper (xref)
==> erlualib (xref)
./rebar -C rebar_test.config eunit -v skip_deps=true
==> erlualib (eunit)
Compiled src/lua_behaviour.erl
Compiled p_test/lual_test.erl
Compiled p_test/lua_crutas_test.erl
Compiled src/proper_utils.erl
Compiled src/luam.erl
Compiled src/lual.erl
Compiled src/lua_driver.erl
Compiled src/lua_crutas.erl
Compiled src/lua_common.erl
Compiled p_test/luam_test.erl
Compiled p_test/lua_test.erl
Compiled src/lua.erl
======================== EUnit ========================
module 'lua'
module 'lua_behaviour'
module 'lua_common'
module 'lua_crutas'
module 'lua_crutas_test'
  lua_crutas_test: put_atom_test...[0.003 s] ok
  lua_crutas_test: luam_call_with_atom_test...ok
  [done in 0.008 s]
module 'lua_driver'
module 'lua_test'
  lua_test: oh_prop_test_ (boolean).......................................................................................................
OK: Passed 100 test(s).
[0.137 s] ok
  .lua_test: oh_prop_test_ (lstring)..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).
[0.399 s] ok
  .lua_test: oh_prop_test_ (concat)..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).
[0.869 s] ok
  .lua_test: oh_prop_test_ (float)..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).
[0.369 s] ok
  .lua_test: oh_prop_test_ (int32)..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).
[0.366 s] ok
  lua_test: small_integer_test...ok
  lua_test: zero_integer_test...ok
  lua_test: small_negative_integer_test...ok
  lua_test: small_number_test...ok
  lua_test: small_negative_number_test...ok
  lua_test: zero_number_test...ok
  lua_test: big_number_test...ok
  lua_test: big_float_number_test...ok
  lua_test: big_neg_number_test...ok
  lua_test: big_neg_float_test...ok
  lua_test: string_test...ok
  lua_test: bool_test...ok
  lua_test: nil_type_test...ok
  lua_test: boolean_type_test...ok
  lua_test: num_type_test...ok
  lua_test: string_type_test...ok
  lua_test: table_type_test...ok
  lua_test:62: oh_test_ (createtable)...ok
  lua_test:63: oh_test_ (settable)...ok
  lua_test:64: oh_test_ (gettable)...ok
  lua_test:65: oh_test_ (rawequal)...ok
  lua_test:66: oh_test_ (remove)...ok
  lua_test:67: oh_test_ (setfield, getfield)...ok
  lua_test:68: oh_test_ (concat)...ok
  lua_test:69: oh_test_ (call)...ok
  lua_test:70: oh_test_ (setglobal, getglobal)...ok
  lua_test:71: oh_test_ (next)...ok
  [done in 2.237 s]
module 'lual'
lual_test: failure_test (module 'lual_test')...ok
module 'luam'
module 'luam_test'
  luam_test:9: oh_test_ (fold)...ok
  luam_test:10: oh_test_ (fold nested)...ok
  luam_test:11: oh_test_ (pushterm empty table)...ok
  luam_test:12: oh_test_ (pushterm table 1)...ok
  luam_test:13: oh_test_ (pushterm nested table)...ok
  luam_test:14: oh_test_ (pushterm wrong args)...ok
  luam_test:15: oh_test_ (multipcall 000)...ok
  luam_test:16: oh_test_ (multipcall 001)...ok
  luam_test:17: oh_test_ (multipcall 002)...ok
  luam_test:18: oh_test_ (multipcall err)...ok
  luam_test:23: luam_call_test_ (single nil)...ok
  luam_test:24: luam_call_test_ (single atom)...ok
  luam_test:25: luam_call_test_ (1 number)...ok
  luam_test:26: luam_call_test_ (number and string)...ok
  luam_test:28: luam_call_test_ (numeric proplist)...ok
  luam_test:31: luam_call_test_ (string proplist)...ok
  luam_test:33: luam_call_test_ (2 numeric arguments)...ok
  luam_test:34: luam_call_test_ (number and empty table)...ok
  luam_test:35: luam_call_test_ (3 booleans and number)...ok
  luam_test:37: luam_call_test_ (number and table)...ok
Testing luam_test:prop_luam_call/0
  luam_test: proper_test_...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).

[1.656 s] ok
  luam_test:69: luam_one_call_test_...ok
  luam_test:70: luam_one_call_test_...ok
  [done in 1.726 s]
module 'proper_utils'
=======================================================
  All 58 tests passed.
Cover analysis: /private/tmp/erlualib/.eunit/index.html

Code Coverage:
lua             : 96%
lua_behaviour   :  0%
lua_common      : 71%
lua_crutas      : not
lua_crutas_test : 100
lua_driver      : 75%
lua_test        : 100
lual            : 100
lual_test       : 100
luam            : 93%
luam_test       : 100
proper_utils    : 100

Total           : 90%
erlualib git:master ❯ make test
./rebar -C rebar_test.config get-deps compile xref
==> proper (get-deps)
==> erlualib (get-deps)
==> proper (compile)
==> erlualib (compile)
==> proper (xref)
==> erlualib (xref)
./rebar -C rebar_test.config eunit -v skip_deps=true
==> erlualib (eunit)
======================== EUnit ========================
module 'lua'
module 'lua_behaviour'
module 'lua_common'
module 'lua_crutas'
module 'lua_crutas_test'
  lua_crutas_test: put_atom_test...[0.002 s] ok
  lua_crutas_test: luam_call_with_atom_test...ok
  [done in 0.008 s]
module 'lua_driver'
module 'lua_test'
  lua_test: oh_prop_test_ (boolean).......................................................................................................
OK: Passed 100 test(s).
[0.147 s] ok
  .lua_test: oh_prop_test_ (lstring)..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).
[0.420 s] ok
  lua_test: oh_prop_test_ (concat)...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).
[0.877 s] ok
  .lua_test: oh_prop_test_ (float)..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).
[0.380 s] ok
  .lua_test: oh_prop_test_ (int32)..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).
[0.363 s] ok
  lua_test: small_integer_test...ok
  lua_test: zero_integer_test...ok
  lua_test: small_negative_integer_test...ok
  lua_test: small_number_test...ok
  lua_test: small_negative_number_test...ok
  lua_test: zero_number_test...ok
  lua_test: big_number_test...ok
  lua_test: big_float_number_test...ok
  lua_test: big_neg_number_test...ok
  lua_test: big_neg_float_test...ok
  lua_test: string_test...ok
  lua_test: bool_test...ok
  lua_test: nil_type_test...ok
  lua_test: boolean_type_test...ok
  lua_test: num_type_test...ok
  lua_test: string_type_test...ok
  lua_test: table_type_test...ok
  lua_test:62: oh_test_ (createtable)...ok
  lua_test:63: oh_test_ (settable)...ok
  lua_test:64: oh_test_ (gettable)...ok
  lua_test:65: oh_test_ (rawequal)...ok
  lua_test:66: oh_test_ (remove)...ok
  lua_test:67: oh_test_ (setfield, getfield)...ok
  lua_test:68: oh_test_ (concat)...ok
  lua_test:69: oh_test_ (call)...ok
  lua_test:70: oh_test_ (setglobal, getglobal)...ok
  lua_test:71: oh_test_ (next)...*failed*
::{assertEqual_failed,[{module,lua_test},
                     {line,155},
                     {expression,"lua : tolstring ( L , - 1 )"},
                     {expected,<<"2">>},
                     {value,<<"1">>}]}


  [done in 2.283 s]
module 'lual'
lual_test: failure_test (module 'lual_test')...[0.001 s] ok
module 'luam'
module 'luam_test'
  luam_test:9: oh_test_ (fold)...ok
  luam_test:10: oh_test_ (fold nested)...ok
  luam_test:11: oh_test_ (pushterm empty table)...ok
  luam_test:12: oh_test_ (pushterm table 1)...ok
  luam_test:13: oh_test_ (pushterm nested table)...ok
  luam_test:14: oh_test_ (pushterm wrong args)...ok
  luam_test:15: oh_test_ (multipcall 000)...ok
  luam_test:16: oh_test_ (multipcall 001)...ok
  luam_test:17: oh_test_ (multipcall 002)...ok
  luam_test:18: oh_test_ (multipcall err)...ok
  luam_test:23: luam_call_test_ (single nil)...ok
  luam_test:24: luam_call_test_ (single atom)...ok
  luam_test:25: luam_call_test_ (1 number)...ok
  luam_test:26: luam_call_test_ (number and string)...ok
  luam_test:28: luam_call_test_ (numeric proplist)...ok
  luam_test:31: luam_call_test_ (string proplist)...ok
  luam_test:33: luam_call_test_ (2 numeric arguments)...ok
  luam_test:34: luam_call_test_ (number and empty table)...ok
  luam_test:35: luam_call_test_ (3 booleans and number)...ok
  luam_test:37: luam_call_test_ (number and table)...ok
Testing luam_test:prop_luam_call/0
  luam_test: proper_test_...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK: Passed 1000 test(s).

[1.641 s] ok
  luam_test:69: luam_one_call_test_...[0.001 s] ok
  luam_test:70: luam_one_call_test_...[0.001 s] ok
  [done in 1.711 s]
module 'proper_utils'
=======================================================
  Failed: 1.  Skipped: 0.  Passed: 57.
Cover analysis: /private/tmp/erlualib/.eunit/index.html

Code Coverage:
lua             : 96%
lua_behaviour   :  0%
lua_common      : 71%
lua_crutas      : not
lua_crutas_test : 100
lua_driver      : 75%
lua_test        : 96%
lual            : 100
lual_test       : 100
luam            : 93%
luam_test       : 100
proper_utils    : 100

Total           : 89%
ERROR: One or more eunit tests failed.
ERROR: eunit failed while processing /private/tmp/erlualib: rebar_abort
make: *** [test] Error 1
erlualib git:master ❯ 

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants