Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
problems with PropEr includes from eunit
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Martynas Pumputis  
View profile  
 More options Jun 27 2011, 11:01 am
From: Martynas Pumputis <martyn...@gmail.com>
Date: Mon, 27 Jun 2011 18:01:17 +0300
Local: Mon, Jun 27 2011 11:01 am
Subject: [erlang-questions] problems with PropEr includes from eunit
Hello,

I have problems running PropEr:check_spec/1 from Eunit.
With this line in module file:
-include("bp_app/include/log_utils.hrl").
PropEr stops working. After removing it, PropEr starts working properly.

Error message I get from PropEr:

motiejus:~/mll/gateway_app$ make test_gateway_specs_tests
ERL_FLAGS="-sname eunit -config ../bp_app/config/default.config
+P1000000 -env ERL_MAX_ETS_TABLES 20000" ../rebar verbose=2
skip_deps=true suite=gateway_specs_tests eunit
==> gateway_app (eunit)
Compiled tests/gateway_specs_tests.erl
Compiled tests/gateway_app_tests.erl
======================== EUnit ========================
gateway_specs_tests: yadda_test (module 'gateway_specs_tests')...
=INFO REPORT==== 27-Jun-2011::17:03:39 ===
   pid: <0.475.0>
   source: "tests/gateway_specs_tests.erl:29"
   message: "checkspec says"
   error: {typeserver,
              {cant_load_code,gateway_helpers,
                  {cant_find_object_file,
                      {cant_compile_source_file,

[{"/home/motiejus/code/mll/gateway_app/.eunit/gateway_helpers.erl",
                            [{16,epp,
                              {include,file,
                                  "bp_app/include/log_utils.hrl"}}]}]}}}}
[0.029 s] ok
=======================================================
 Test passed.

I suspect PropEr recompiles those modules and does not add include paths
properly.

Relevant Code:
===== gateway_helpers.erl =====
-module(gateway_helpers).
-include("bp_app/include/log_utils.hrl").
-export([demo/1]).
-spec demo(integer()) -> integer().
demo(Item) ->
   case Item of
       1 -> undefined;
       R when is_integer(R) ->
           Item
   end.

===== gateway_specs_tests.erl =====
-module(gateway_specs_tests).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("bp_app/include/log_utils.hrl").

yadda_test() ->
   ?info("checkspec says", [proper:check_spec({gateway_helpers, demo, 1})]).

bp_app
├── include
│   ├── log_utils.hrl
gateway_app
├── include
│   ├── consts.hrl
│   └── types.hrl
├── src
│   └── gateway_helpers.erl
└── tests
   └── gateway_specs_tests.erl

Versions:
Erlang R14A (from Squeeze apt)
PropEr v1.0-1-g5fe56e9

Please let me know if you need any more information.

Motiejus
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Lindberg  
View profile  
 More options Jun 30 2011, 3:30 am
From: Adam Lindberg <a...@erlang-solutions.com>
Date: Thu, 30 Jun 2011 09:30:06 +0200
Local: Thurs, Jun 30 2011 3:30 am
Subject: Re: [erlang-questions] problems with PropEr includes from eunit
This is a combined bug in rebar and PropEr as far as I can see. See my
entry on the rebar mailing list:

http://lists.basho.com/pipermail/rebar_lists.basho.com/2011-June/0008...

PropEr relies on the source if the beam file cannot be found (it can't
when it's cover compiled), and it doesn't seem to know about ERL_LIBS or
the include paths used. Especially since rebar copies the source file to
the .eunit folder, it's harder for PropEr to detect linked source files.

You might want to reply on the rebar mailing list to get some traction
for fixing the problem.

Cheers,
Adam

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »