Projects
Eulaceura:Factory
erlang-rebar
_service:obs_scm:rebar-0008-Remove-pre-R15B02-w...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:rebar-0008-Remove-pre-R15B02-workaround.patch of Package erlang-rebar
From: Peter Lemenkov <lemenkov@gmail.com> Date: Wed, 2 Mar 2016 15:10:20 +0300 Subject: [PATCH] Remove pre-R15B02 workaround Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl index f4d7b76..19c3138 100644 --- a/src/rebar_eunit.erl +++ b/src/rebar_eunit.erl @@ -72,8 +72,6 @@ %% for internal use only -export([info/2]). --dialyzer({no_missing_calls, pre15b02_eunit_primitive/3}). - -include("rebar.hrl"). -define(EUNIT_DIR, ".eunit"). @@ -436,18 +434,6 @@ get_beam_test_exports(ModuleStr) -> end. make_test_primitives(RawTests) -> - %% Use {test,M,F} and {generator,M,F} if at least R15B02. Otherwise, - %% use eunit_test:function_wrapper/2 fallback. - %% eunit_test:function_wrapper/2 was renamed to eunit_test:mf_wrapper/2 - %% in R15B02; use that as >= R15B02 check. - %% TODO: remove fallback and use only {test,M,F} and {generator,M,F} - %% primitives once at least R15B02 is required. - {module, eunit_test} = code:ensure_loaded(eunit_test), - MakePrimitive = case erlang:function_exported(eunit_test, mf_wrapper, 2) of - true -> fun eunit_primitive/3; - false -> fun pre15b02_eunit_primitive/3 - end, - ?CONSOLE(" Running test function(s):~n", []), F = fun({M, F2}, Acc) -> ?CONSOLE(" ~p:~p/0~n", [M, F2]), @@ -456,23 +442,15 @@ make_test_primitives(RawTests) -> case re:run(FNameStr, "_test_") of nomatch -> %% Normal test - MakePrimitive(test, M, F2); + {test, M, F2}; _ -> %% Generator - MakePrimitive(generator, M, F2) + {generator, M, F2} end, [eunit_module_suite(M, NewFunction)|Acc] end, lists:foldl(F, [], RawTests). -eunit_primitive(Type, M, F) -> - {Type, M, F}. - -pre15b02_eunit_primitive(test, M, F) -> - eunit_test:function_wrapper(M, F); -pre15b02_eunit_primitive(generator, M, F) -> - {generator, eunit_test:function_wrapper(M, F)}. - % Add a test group for eunit_surefire to be able to deduce the testsuite. % Calling eunit:test({module, M}) does exactly this as well. eunit_module_suite(M, X) ->
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2