lfe-deprecated / lfetool

DEPRECATED - See:
https://github.com/lfe-rebar3/
Other
61 stars 19 forks source link

Unit tests no longer run in generated projects #141

Closed oubiwann closed 9 years ago

oubiwann commented 9 years ago

This is on Mac OS X 10.10, Erlang 17.3, LFE 0.9.0, lfetool 1.4.0.

During unit compilation, these errors get thrown:

Removing old tests ...
rm -rf ./.eunit
mkdir: created directory ./.eunit
Compiling tests ...
{error_logger,{{2015,1,4},{18,6,59}},std_error,"File operation error: eacces.
 Target: ../KSOutOfProcessFetcher.0.r55jifrBu08ZlGAfPLYXKgYad4c=/ebin.
 Function: read_file_info.
 Process: code_server."}

=ERROR REPORT==== 4-Jan-2015::12:06:59 ===
File operation error: eacces.
 Target: ../KSOutOfProcessFetcher.0.r55jifrBu08ZlGAfPLYXKgYad4c=/ebin.
 Function: read_file_info. 
 Process: code_server.

Successfully compiled test modules.

When running tests, these errors get thrown:

------------------
Running unit tests ...
------------------

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
{error-logger,{{2015,1,4},{18,7,1}},std-error,"File operation error: eacces.
 Target: ../KSOutOfProcessFetcher.0.r55jifrBu08ZlGAfPLYXKgYad4c=/ebin.
 Function: read-file-info.
 Process: code-server."}
=ERROR REPORT==== 4-Jan-2015::12:07:01 ===
File operation error: eacces.
 Target: ../KSOutOfProcessFetcher.0.r55jifrBu08ZlGAfPLYXKgYad4c=/ebin.
 Function: read-file-info.
 Process: code-server.
{"init terminating in do-boot",
  {{badmatch,{error,{1,erl-parse,["syntax error before: ","'{'"]}}},
  [{init,start-it,1,[]},{init,start-em,1,[]}]}}
make: *** [check-unit-only] Error 1
oubiwann commented 9 years ago

When run manually, they work:

ERL_LIBS=`lfetool info erllibs` erl -pa ./.eunit -noshell -eval \
"eunit:test(['unit-lib-1-tests'],[verbose])" -s erlang halt
ERL_LIBS=`lfetool info erllibs` erl -pa ./.eunit -noshell -eval \
"eunit:test(['unit-webapp-3-tests'],[verbose])" -s erlang halt
oubiwann commented 9 years ago

Running them with lfetool also works:

$ lfetool tests unit
oubiwann commented 9 years ago

Ah, I was running this tests from a directory I had cd'ed into by a sym-linked name:

$ cd /tmp

Which on Mac OS X is a sym link to /private/tmp. When I moved the libraries out of that directory, this error went away.