Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests fails : Test run failed! Reason: {'EXIT',{error,{enoent,"src/"}}} #53

Open
lc3t35 opened this issue May 3, 2015 · 9 comments

Comments

@lc3t35
Copy link

lc3t35 commented May 3, 2015

Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.1 (abort with ^G)
OSX 10.8.5

make tests
 GEN    clean
 GEN    clean-app
 GEN    clean-ct
./rebar get-deps
==> proper (get-deps)
./rebar compile
==> proper (compile)
make[2]: `include/compile_flags.hrl' is up to date.
 ERLC   cxy_cache.erl cxy_cache_fsm.erl cxy_cache_sup.erl cxy_ctl.erl cxy_synch.erl ets_buffer.erl
Old inliner: threshold=0 functions=[{return_cache_gen1,2},
                                    {return_cache_gen2,2},
                                    {return_cache_refresh,2},
                                    {return_cache_error,2},
                                    {return_cache_miss,2},
                                    {return_cache_delete,2},
                                    {return_and_count_cache,4}]
Old inliner: threshold=0 functions=[{buffer_type,1},
                                    {buffer_type_num,1},
                                    {meta_key,1},
                                    {buffer_key,2},
                                    {buffer_data,3},
                                    {ring_reserve_write_cmd,1},
                                    {ring_reserve_read_cmd,4},
                                    {ring_reserve_read_all_cmd,1},
                                    {fifo_publish_write_cmd,0},
                                    {fifo_reserve_read_cmd,2},
                                    {fifo_reserve_read_all_cmd,2},
                                    {lifo_reserve_write_cmd,0},
                                    {get_buffer_type,2},
                                    {get_buffer_readw,2},
                                    {get_buffer_write,2},
                                    {get_buffer_type_and_pos,3},
                                    {insert_ets_internal,4},
                                    {set_high_water,3},
                                    {set_high_water_cmd,1}]
 APP    epocxy.app.src
 GEN    build-ct-suites
Common Test v1.8.1 starting (cwd is /***dev/erlang/epocxy)
CWD set to: "/***/dev/erlang/epocxy/logs/[email protected]_23.06.51"
TEST INFO: 3 test(s), 39 case(s) in 3 suite(s)
Updating /***/dev/erlang/epocxy/logs/all_runs.html... done
Test run failed! Reason:
{'EXIT',{error,{enoent,"src/"}}}
make: *** [tests-ct] Error 2
@jaynel
Copy link
Member

jaynel commented May 5, 2015

I've been working with R16 and haven't tested things on 17 and 18 yet, but this seems like either a setup problem, a rebar problem, or maybe an issue with 17 that was fixed? The reference to src/ file should be fine. I am using erlang.mk and you are including it to a rebar project. This should work, but there may be a conflict for the versions of these two build tools. Can you post a copy of your rebar.config?

@jaynel
Copy link
Member

jaynel commented Sep 15, 2016

Upgraded to v1.1.0. reopen if there are still issues.

@jaynel jaynel closed this as completed Sep 15, 2016
@lc3t35
Copy link
Author

lc3t35 commented Sep 16, 2016

No changes (same environnement : OTP17, OSX 10.8.5)
rebar 2.5.1 17 20140805_073236 git 2.5.1

make tests
./rebar get-deps
==> proper (get-deps)
./rebar compile
==> proper (compile)
make[2]: `include/compile_flags.hrl' is up to date.
GEN test-dir
test/epocxy/cxy_ctl_SUITE.erl:534: Warning: variable 'Spawn_Max' is unused
test/epocxy/cxy_regulator_SUITE.erl:117: Warning: function get_thruput/1 is unused
test/epocxy/cxy_regulator_SUITE.erl:118: Warning: function get_init_time/1 is unused
test/epocxy/cxy_regulator_SUITE.erl:119: Warning: function get_slab_counts/1 is unused
test/epocxy/cxy_regulator_SUITE.erl:120: Warning: function get_pending_requests/1 is unused
test/epocxy/cxy_regulator_SUITE.erl:124: Warning: function get_init_time_internal/1 is unused
GEN ct
Common Test v1.8.1 starting (cwd is /xxx/dev/erlang/epocxy)

CWD set to: "/Users/laurent/dev/erlang/epocxy/logs/[email protected]_22.14.40"

TEST INFO: 6 test(s), 48 case(s) in 6 suite(s)

Updating /xxx/dev/erlang/epocxy/logs/all_runs.html... done

Test run failed! Reason:
{'EXIT',{error,{enoent,"../src/"}}}
make: *** [ct] Error 2

I updated to 18.2 with kerl -> works fine

@jaynel
Copy link
Member

jaynel commented Sep 16, 2016

Can you try the following?

  1. make distclean
  2. make
  3. make my_dialyzer
  4. make tests

The first 2 steps make sure you start clean and get fresh deps, then compile all deps including PropEr. Dialyzer just to make sure that things built ok, then the tests can try to run.

It might be that cover spec, just want to try this first.

@jaynel
Copy link
Member

jaynel commented Sep 16, 2016

I added more files to the cover spec, updated README, and pushed a new 1.1.0 tag. I just ran the above on OTP 19.0 and it worked fine. You might want to try deleting the directory and a fresh clone. There is a new version of erlang.mk being used that might affect things.

Are you building as part of a larger project with rebar? Or are you just running this as a standalone local library? It is possible that there is a rebar/erlang.mk difference.

@lc3t35
Copy link
Author

lc3t35 commented Sep 16, 2016

after make distclean, make tests it works fine even with 17.5 (activated with kerl).

even if make throws a little error with random
DEP proper
CONF proper (proper)
Using Erlang's 'random' ('rand' in 19.0 and later) module
make: [/Users/laurent/dev/erlang/epocxy/deps/proper] Error 1 (ignored)
./bootstrap
Recompile: src/rebar

FYI make my_dialyzer throws an error
dialyzer --plt .epocxy.plt --no_native --src -r src test/epocxy -I include -Werror_handling -Wrace_conditions -Wunmatched_returns

dialyzer: No such file, directory or application: ".epocxy.plt"
make: *** [my_dialyzer] Error 1

As I mentionned works fine with 18.2 too, did not tryed yet with 19.0 but it should be ok
We can close the issue.

@jaynel
Copy link
Member

jaynel commented Sep 16, 2016

You have to do 'make plt' before 'make my_dialyzer' will run. I should make that a dependency, will update. If you don't have a .erlang file you can use 'make dialyzer'. Something about erlang.mk that trips on my environment caused me to add 'make my_dialyzer'.

@lc3t35
Copy link
Author

lc3t35 commented Sep 16, 2016

Erlang 19.0

make my_dialyzer
dialyzer --plt .epocxy.plt --no_native --src -r src test/epocxy -I include -Werror_handling -Wrace_conditions -Wunmatched_returns
  Checking whether the PLT .epocxy.plt is up-to-date... yes
  Proceeding with analysis...
batch_feeder_SUITE.erl:67: The created fun has no local return
batch_feeder_SUITE.erl:73: The call batch_feeder:process_data({'batch_feeder_SUITE',[{'all_ids',[integer()]} | {'batch_size',_} | {'collector',pid()} | {'sum',0},...]}) breaks the contract (context(Ctxt)) -> 'done' | {'error',tuple()} when Ctxt :: any()
batch_feeder_SUITE.erl:84: Function receive_processed/5 will never be called
batch_feeder_SUITE.erl:101: Function receive_sum/1 will never be called
batch_feeder_SUITE.erl:145: Expression produces a value of type [{'processed',_,_}], but this value is unmatched
cxy_ctl_SUITE.erl:110: Function check_limit_errors/1 has no local return
cxy_ctl_SUITE.erl:130: The pattern {'error', {'missing_task_types', [{'g', 'foo'}, {'h', 17}]}} can never match the type pos_integer() | {'error',{'missing_task_types',[atom()]}}
cxy_fount_fail_behaviour.erl:20: The inferred return type of start_pid/2 ('bad_pid') has nothing in common with pid() | {'error',_}, which is the expected return type for the callback of cxy_fount behaviour
cxy_regulator_SUITE.erl:117: Function get_thruput/1 will never be called
cxy_regulator_SUITE.erl:118: Function get_init_time/1 will never be called
cxy_regulator_SUITE.erl:119: Function get_slab_counts/1 will never be called
cxy_regulator_SUITE.erl:120: Function get_pending_requests/1 will never be called
cxy_regulator_SUITE.erl:124: Function get_init_time_internal/1 will never be called
cxy_regulator_SUITE.erl:133: Function check_pause_resume/1 has no local return
cxy_regulator_SUITE.erl:141: The pattern {'ignored', 'pause'} can never match the type 'paused'
Unknown functions:
  ct:comment/1
  ct:comment/2
  ct:log/1
  ct:log/2
  et:trace_me/5
 done in 3m41.30s
done (warnings were emitted)
make: *** [my_dialyzer] Error 2

but Tests OK ;)
Still have an error when make

make
 DEP    proper
 CONF   proper (proper)
Using Erlang's 'random' ('rand' in 19.0 and later) module
make: [/Users/laurent/dev/erlang/epocxy/deps/proper] Error 1 (ignored)
./bootstrap
Recompile: src/rebar
...
Recompile: src/rebar_eunit
src/rebar_eunit.erl:293: Warning: random:seed/3: the 'random' module is deprecated; use the 'rand' module instead
src/rebar_eunit.erl:295: Warning: random:uniform/0: the 'random' module is deprecated; use the 'rand' module instead
...

@jaynel
Copy link
Member

jaynel commented Oct 20, 2016

This issue seems to be fixed in 18.0 and later. I am keeping this open so I can do some backtesting and try to make it work for R16 and R17. In the meantime, commenting out CT_OPTS in the Makefile solves the issue for the earlier releases.

@jaynel jaynel reopened this Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants