Rebar ver. 2.6.4
- Ver. 2.6.4 (rhbz#1350988) - Re-enable upstream behaviour for get-deps (rhbz#999054) - Added erlang-eflame dependency Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
parent
4d6c5fc2f0
commit
8a2757da9c
|
@ -5,3 +5,4 @@
|
||||||
/rebar-5dea85db1b697466586877bed133748bd80fa180.tar.gz
|
/rebar-5dea85db1b697466586877bed133748bd80fa180.tar.gz
|
||||||
/rebar-365ac649dc818619757f96a699ddb174f004cff9.tar.gz
|
/rebar-365ac649dc818619757f96a699ddb174f004cff9.tar.gz
|
||||||
/rebar-2.6.1.tar.gz
|
/rebar-2.6.1.tar.gz
|
||||||
|
/rebar-2.6.4.tar.gz
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
|
|
||||||
Name: erlang-%{realname}
|
Name: erlang-%{realname}
|
||||||
Version: 2.6.1
|
Version: 2.6.4
|
||||||
Release: 10%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Erlang Build Tools
|
Summary: Erlang Build Tools
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
License: MIT
|
License: MIT
|
||||||
|
@ -29,26 +29,22 @@ Patch2: rebar-0002-Remove-bundled-mustache.patch
|
||||||
Patch3: rebar-0003-Remove-bundled-getopt.patch
|
Patch3: rebar-0003-Remove-bundled-getopt.patch
|
||||||
# Will be proposed for inclusion
|
# Will be proposed for inclusion
|
||||||
Patch4: rebar-0004-Allow-discarding-building-ports.patch
|
Patch4: rebar-0004-Allow-discarding-building-ports.patch
|
||||||
# Fedora/EPEL-specific
|
|
||||||
Patch5: rebar-0005-Check-system-wide-libdir-in-case-of-source-based-dep.patch
|
|
||||||
# Fedora/EPEL-specific - we're using at least R16B03
|
# Fedora/EPEL-specific - we're using at least R16B03
|
||||||
Patch6: rebar-0006-Remove-any-traces-of-long-time-obsolete-escript-fold.patch
|
Patch5: rebar-0005-Remove-any-traces-of-long-time-obsolete-escript-fold.patch
|
||||||
Patch7: rebar-0007-remove-abnfc.patch
|
Patch6: rebar-0006-remove-abnfc.patch
|
||||||
Patch8: rebar-0008-Disable-eflame-support-for-now.patch
|
Patch7: rebar-0007-Remove-support-for-gpb-compiler.patch
|
||||||
Patch9: rebar-0009-Remove-support-for-gpb-compiler.patch
|
|
||||||
# Fedora/EPEL-specific - we're using at least R16B03
|
# Fedora/EPEL-specific - we're using at least R16B03
|
||||||
Patch10: rebar-0010-Remove-pre-R15B02-workaround.patch
|
Patch8: rebar-0008-Remove-pre-R15B02-workaround.patch
|
||||||
# Fedora/EPEL-specific - keep until we dump R16B03-1 and 17.x.y entirely
|
# Fedora/EPEL-specific - keep until we dump R16B03-1 and 17.x.y entirely
|
||||||
Patch11: rebar-0011-No-such-function-erlang-timestamp-0.patch
|
Patch9: rebar-0009-No-such-function-erlang-timestamp-0.patch
|
||||||
# Fedora/EPEL-specific - allow vsn variable override
|
# Fedora/EPEL-specific - allow vsn variable override
|
||||||
Patch12: rebar-0012-Try-shell-variable-VSN-first.patch
|
Patch10: rebar-0010-Try-shell-variable-VSN-first.patch
|
||||||
# Fedora/EPEL-specific - allow overriding missind deps error (versions
|
# Fedora/EPEL-specific - allow overriding missind deps error (versions
|
||||||
# mismatch)
|
# mismatch)
|
||||||
Patch13: rebar-0013-Allow-ignoring-missing-deps.patch
|
Patch11: rebar-0011-Allow-ignoring-missing-deps.patch
|
||||||
# Backported from upstream
|
|
||||||
Patch14: rebar-0014-Fix-windows-eunit-tests.patch
|
|
||||||
|
|
||||||
%if 0%{?need_bootstrap} < 1
|
%if 0%{?need_bootstrap} < 1
|
||||||
|
BuildRequires: erlang-eflame
|
||||||
BuildRequires: erlang-rebar
|
BuildRequires: erlang-rebar
|
||||||
%else
|
%else
|
||||||
BuildRequires: erlang-asn1
|
BuildRequires: erlang-asn1
|
||||||
|
@ -58,6 +54,7 @@ BuildRequires: erlang-crypto
|
||||||
BuildRequires: erlang-dialyzer
|
BuildRequires: erlang-dialyzer
|
||||||
BuildRequires: erlang-diameter
|
BuildRequires: erlang-diameter
|
||||||
BuildRequires: erlang-edoc
|
BuildRequires: erlang-edoc
|
||||||
|
BuildRequires: erlang-eflame
|
||||||
BuildRequires: erlang-erl_interface
|
BuildRequires: erlang-erl_interface
|
||||||
BuildRequires: erlang-erlydtl
|
BuildRequires: erlang-erlydtl
|
||||||
BuildRequires: erlang-erts
|
BuildRequires: erlang-erts
|
||||||
|
@ -80,7 +77,6 @@ BuildRequires: erlang-tools
|
||||||
|
|
||||||
# FIXME wip
|
# FIXME wip
|
||||||
#Requires: erlang-abnfc%{?_isa}
|
#Requires: erlang-abnfc%{?_isa}
|
||||||
#Requires: erlang-eflame%{?_isa}
|
|
||||||
#Requires: erlang-gpb%{?_isa}
|
#Requires: erlang-gpb%{?_isa}
|
||||||
|
|
||||||
# This one cannot be picked up automatically
|
# This one cannot be picked up automatically
|
||||||
|
@ -108,16 +104,13 @@ Erlang Build Tools.
|
||||||
%patch3 -p1 -b .remove_bundled_getopt
|
%patch3 -p1 -b .remove_bundled_getopt
|
||||||
%endif
|
%endif
|
||||||
%patch4 -p1 -b .allow_discarding_ports
|
%patch4 -p1 -b .allow_discarding_ports
|
||||||
%patch5 -p1 -b .use_locally_installed
|
%patch5 -p1 -b .remove_escript_foldl_3
|
||||||
%patch6 -p1 -b .remove_escript_foldl_3
|
%patch6 -p1 -b .remove_abnfc
|
||||||
%patch7 -p1 -b .remove_abnfc
|
%patch7 -p1 -b .remove_gpb
|
||||||
%patch8 -p1 -b .remove_eflame
|
%patch8 -p1 -b .remove_pre_R15B02
|
||||||
%patch9 -p1 -b .remove_gpb
|
%patch9 -p1 -b .erlang_timestamp_0
|
||||||
%patch10 -p1 -b .remove_pre_R15B02
|
%patch10 -p1 -b .vsn_override
|
||||||
%patch11 -p1 -b .typo_fix
|
%patch11 -p1 -b .skip_deps_checking
|
||||||
%patch12 -p1 -b .vsn_override
|
|
||||||
%patch13 -p1 -b .skip_deps_checking
|
|
||||||
%patch14 -p1 -b .fix_eunit_tests
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
@ -154,6 +147,11 @@ cp -a priv %{buildroot}%{_erllibdir}/%{realname}-%{version}/
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 1 2016 Peter Lemenkov <lemenkov@gmail.com> - 2.6.4-1
|
||||||
|
- Ver. 2.6.4 (rhbz#1350988)
|
||||||
|
- Re-enable upstream behaviour for get-deps (rhbz#999054)
|
||||||
|
- Added erlang-eflame dependency
|
||||||
|
|
||||||
* Tue Mar 15 2016 Peter Lemenkov <lemenkov@gmail.com> - 2.6.1-10
|
* Tue Mar 15 2016 Peter Lemenkov <lemenkov@gmail.com> - 2.6.1-10
|
||||||
- Fixed tests
|
- Fixed tests
|
||||||
- Fixed incompatibility with a newest erlang-mustache
|
- Fixed incompatibility with a newest erlang-mustache
|
||||||
|
|
|
@ -4,7 +4,7 @@ Subject: [PATCH] Remove bundled mustache
|
||||||
|
|
||||||
|
|
||||||
diff --git a/ebin/rebar.app b/ebin/rebar.app
|
diff --git a/ebin/rebar.app b/ebin/rebar.app
|
||||||
index b4de616..27707c3 100644
|
index 9449e1e..d3f8e42 100644
|
||||||
--- a/ebin/rebar.app
|
--- a/ebin/rebar.app
|
||||||
+++ b/ebin/rebar.app
|
+++ b/ebin/rebar.app
|
||||||
@@ -45,7 +45,6 @@
|
@@ -45,7 +45,6 @@
|
||||||
|
@ -12,9 +12,9 @@ index b4de616..27707c3 100644
|
||||||
rebar_metacmds,
|
rebar_metacmds,
|
||||||
rebar_getopt,
|
rebar_getopt,
|
||||||
- rebar_mustache,
|
- rebar_mustache,
|
||||||
rmemo ]},
|
rmemo,
|
||||||
|
rebar_rand_compat ]},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications,
|
|
||||||
diff --git a/src/rebar_mustache.erl b/src/rebar_mustache.erl
|
diff --git a/src/rebar_mustache.erl b/src/rebar_mustache.erl
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 9016c0f..0000000
|
index 9016c0f..0000000
|
||||||
|
|
|
@ -4,7 +4,7 @@ Subject: [PATCH] Remove bundled getopt
|
||||||
|
|
||||||
|
|
||||||
diff --git a/ebin/rebar.app b/ebin/rebar.app
|
diff --git a/ebin/rebar.app b/ebin/rebar.app
|
||||||
index 27707c3..f9b0c22 100644
|
index d3f8e42..986f12f 100644
|
||||||
--- a/ebin/rebar.app
|
--- a/ebin/rebar.app
|
||||||
+++ b/ebin/rebar.app
|
+++ b/ebin/rebar.app
|
||||||
@@ -44,7 +44,6 @@
|
@@ -44,7 +44,6 @@
|
||||||
|
@ -12,14 +12,14 @@ index 27707c3..f9b0c22 100644
|
||||||
rebar_xref,
|
rebar_xref,
|
||||||
rebar_metacmds,
|
rebar_metacmds,
|
||||||
- rebar_getopt,
|
- rebar_getopt,
|
||||||
rmemo ]},
|
rmemo,
|
||||||
|
rebar_rand_compat ]},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications,
|
|
||||||
diff --git a/src/rebar.erl b/src/rebar.erl
|
diff --git a/src/rebar.erl b/src/rebar.erl
|
||||||
index dcfb353..2040e7a 100644
|
index 2eb608d..91593c2 100644
|
||||||
--- a/src/rebar.erl
|
--- a/src/rebar.erl
|
||||||
+++ b/src/rebar.erl
|
+++ b/src/rebar.erl
|
||||||
@@ -233,7 +233,7 @@ run_aux(BaseConfig, Commands) ->
|
@@ -236,7 +236,7 @@ run_aux(BaseConfig, Commands) ->
|
||||||
%%
|
%%
|
||||||
help() ->
|
help() ->
|
||||||
OptSpecList = option_spec_list(),
|
OptSpecList = option_spec_list(),
|
||||||
|
@ -28,7 +28,7 @@ index dcfb353..2040e7a 100644
|
||||||
"[var=value,...] <command,...>",
|
"[var=value,...] <command,...>",
|
||||||
[{"var=value", "rebar global variables (e.g. force=1)"},
|
[{"var=value", "rebar global variables (e.g. force=1)"},
|
||||||
{"command", "Command to run (e.g. compile)"}]),
|
{"command", "Command to run (e.g. compile)"}]),
|
||||||
@@ -293,7 +293,7 @@ help() ->
|
@@ -301,7 +301,7 @@ help() ->
|
||||||
parse_args(RawArgs) ->
|
parse_args(RawArgs) ->
|
||||||
%% Parse getopt options
|
%% Parse getopt options
|
||||||
OptSpecList = option_spec_list(),
|
OptSpecList = option_spec_list(),
|
||||||
|
|
|
@ -8,10 +8,10 @@ Conflicts:
|
||||||
src/rebar_port_compiler.erl
|
src/rebar_port_compiler.erl
|
||||||
|
|
||||||
diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl
|
diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl
|
||||||
index 906bcb0..9ae4778 100644
|
index 9679c80..0ba9e84 100644
|
||||||
--- a/src/rebar_port_compiler.erl
|
--- a/src/rebar_port_compiler.erl
|
||||||
+++ b/src/rebar_port_compiler.erl
|
+++ b/src/rebar_port_compiler.erl
|
||||||
@@ -300,6 +300,12 @@ get_specs(Config, AppFile) ->
|
@@ -348,6 +348,12 @@ get_specs(Config, AppFile) ->
|
||||||
%% No spec provided. Construct a spec
|
%% No spec provided. Construct a spec
|
||||||
%% from old-school so_name and sources
|
%% from old-school so_name and sources
|
||||||
[port_spec_from_legacy(Config, AppFile)];
|
[port_spec_from_legacy(Config, AppFile)];
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
||||||
Date: Sat, 2 Mar 2013 10:39:15 +0400
|
|
||||||
Subject: [PATCH] Check system-wide libdir in case of source-based dependency
|
|
||||||
|
|
||||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
||||||
|
|
||||||
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
|
|
||||||
index a6e5b27..ba2b4e8 100644
|
|
||||||
--- a/src/rebar_deps.erl
|
|
||||||
+++ b/src/rebar_deps.erl
|
|
||||||
@@ -393,7 +393,12 @@ find_dep(Config, Dep, _Source) ->
|
|
||||||
%% _Source is defined. Regardless of what it is, we must find it
|
|
||||||
%% locally satisfied or fetch it from the original source
|
|
||||||
%% into the project's deps
|
|
||||||
- find_dep_in_dir(Config, Dep, get_deps_dir(Config, Dep#dep.app)).
|
|
||||||
+ case find_dep_in_dir(Config, Dep, get_deps_dir(Config, Dep#dep.app)) of
|
|
||||||
+ {_Config1, {avail, _Dir}} = Avail ->
|
|
||||||
+ Avail;
|
|
||||||
+ {Config1, {missing, _}} ->
|
|
||||||
+ find_dep_in_dir(Config1, Dep, get_lib_dir(Dep#dep.app))
|
|
||||||
+ end.
|
|
||||||
|
|
||||||
find_dep_in_dir(Config, _Dep, {false, Dir}) ->
|
|
||||||
{Config, {missing, Dir}};
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove any traces of long-time obsolete escript:foldl/3
|
||||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
|
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
|
||||||
index 64595a2..08f5b5f 100644
|
index a5cc0ff..5947277 100644
|
||||||
--- a/src/rebar_utils.erl
|
--- a/src/rebar_utils.erl
|
||||||
+++ b/src/rebar_utils.erl
|
+++ b/src/rebar_utils.erl
|
||||||
@@ -222,12 +222,7 @@ abort(String, Args) ->
|
@@ -225,12 +225,7 @@ abort(String, Args) ->
|
||||||
%% undocumented exported fun and has been removed in R14.
|
%% undocumented exported fun and has been removed in R14.
|
||||||
escript_foldl(Fun, Acc, File) ->
|
escript_foldl(Fun, Acc, File) ->
|
||||||
{module, zip} = code:ensure_loaded(zip),
|
{module, zip} = code:ensure_loaded(zip),
|
|
@ -4,18 +4,18 @@ Subject: [PATCH] remove abnfc
|
||||||
|
|
||||||
|
|
||||||
diff --git a/ebin/rebar.app b/ebin/rebar.app
|
diff --git a/ebin/rebar.app b/ebin/rebar.app
|
||||||
index f9b0c22..9f5ae44 100644
|
index 986f12f..167dad8 100644
|
||||||
--- a/ebin/rebar.app
|
--- a/ebin/rebar.app
|
||||||
+++ b/ebin/rebar.app
|
+++ b/ebin/rebar.app
|
||||||
@@ -5,7 +5,6 @@
|
@@ -5,7 +5,6 @@
|
||||||
[{description, "Rebar: Erlang Build Tool"},
|
[{description, "Rebar: Erlang Build Tool"},
|
||||||
{vsn, "2.6.1"},
|
{vsn, "2.6.4"},
|
||||||
{modules, [ rebar,
|
{modules, [ rebar,
|
||||||
- rebar_abnfc_compiler,
|
- rebar_abnfc_compiler,
|
||||||
rebar_app_utils,
|
rebar_app_utils,
|
||||||
rebar_appups,
|
rebar_appups,
|
||||||
rebar_asn1_compiler,
|
rebar_asn1_compiler,
|
||||||
@@ -81,7 +80,6 @@
|
@@ -82,7 +81,6 @@
|
||||||
%% Dir specific processing modules
|
%% Dir specific processing modules
|
||||||
{modules, [
|
{modules, [
|
||||||
{app_dir, [
|
{app_dir, [
|
||||||
|
@ -24,7 +24,7 @@ index f9b0c22..9f5ae44 100644
|
||||||
rebar_protobuffs_compiler,
|
rebar_protobuffs_compiler,
|
||||||
rebar_proto_gpb_compiler,
|
rebar_proto_gpb_compiler,
|
||||||
diff --git a/rebar.config b/rebar.config
|
diff --git a/rebar.config b/rebar.config
|
||||||
index bcd5368..6fa4f27 100644
|
index eda5a2c..7d0870e 100644
|
||||||
--- a/rebar.config
|
--- a/rebar.config
|
||||||
+++ b/rebar.config
|
+++ b/rebar.config
|
||||||
@@ -20,7 +20,6 @@
|
@@ -20,7 +20,6 @@
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Remove support for gpb compiler
|
||||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||||
|
|
||||||
diff --git a/ebin/rebar.app b/ebin/rebar.app
|
diff --git a/ebin/rebar.app b/ebin/rebar.app
|
||||||
index 9f5ae44..81aaafc 100644
|
index 167dad8..e22ad72 100644
|
||||||
--- a/ebin/rebar.app
|
--- a/ebin/rebar.app
|
||||||
+++ b/ebin/rebar.app
|
+++ b/ebin/rebar.app
|
||||||
@@ -31,7 +31,6 @@
|
@@ -31,7 +31,6 @@
|
||||||
|
@ -16,7 +16,7 @@ index 9f5ae44..81aaafc 100644
|
||||||
rebar_qc,
|
rebar_qc,
|
||||||
rebar_rel_utils,
|
rebar_rel_utils,
|
||||||
rebar_reltool,
|
rebar_reltool,
|
||||||
@@ -82,7 +81,6 @@
|
@@ -83,7 +82,6 @@
|
||||||
{app_dir, [
|
{app_dir, [
|
||||||
rebar_proto_compiler,
|
rebar_proto_compiler,
|
||||||
rebar_protobuffs_compiler,
|
rebar_protobuffs_compiler,
|
|
@ -1,64 +0,0 @@
|
||||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
||||||
Date: Wed, 2 Mar 2016 14:56:59 +0300
|
|
||||||
Subject: [PATCH] Disable eflame support for now
|
|
||||||
|
|
||||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
||||||
|
|
||||||
diff --git a/src/rebar.erl b/src/rebar.erl
|
|
||||||
index 2040e7a..b8935ac 100644
|
|
||||||
--- a/src/rebar.erl
|
|
||||||
+++ b/src/rebar.erl
|
|
||||||
@@ -156,11 +156,7 @@ init_config1(BaseConfig) ->
|
|
||||||
rebar_config:set_xconf(BaseConfig1, base_dir, AbsCwd).
|
|
||||||
|
|
||||||
profile(BaseConfig1, Commands) ->
|
|
||||||
- ?CONSOLE("Please take note that profiler=[fprof|eflame] is preliminary"
|
|
||||||
- " and will be~nreplaced with a different command line flag"
|
|
||||||
- " in the next release.~n", []),
|
|
||||||
- Profiler = rebar_config:get_global(BaseConfig1, profiler, "fprof"),
|
|
||||||
- profile(BaseConfig1, Commands, list_to_atom(Profiler)).
|
|
||||||
+ profile(BaseConfig1, Commands, fprof).
|
|
||||||
|
|
||||||
profile(Config, Commands, fprof) ->
|
|
||||||
try
|
|
||||||
@@ -182,28 +178,6 @@ profile(Config, Commands, fprof) ->
|
|
||||||
ok
|
|
||||||
end
|
|
||||||
end;
|
|
||||||
-profile(Config, Commands, eflame) ->
|
|
||||||
- case code:lib_dir(eflame) of
|
|
||||||
- {error, bad_name} ->
|
|
||||||
- ?ABORT("eflame not found in code path~n", []),
|
|
||||||
- ok;
|
|
||||||
- EflameDir ->
|
|
||||||
- Trace = "eflame.trace",
|
|
||||||
- try
|
|
||||||
- eflame:apply(normal_with_children, Trace,
|
|
||||||
- rebar, run, [Config, Commands])
|
|
||||||
- after
|
|
||||||
- %% generate flame graph
|
|
||||||
- Script = filename:join(EflameDir, "stack_to_flame.sh"),
|
|
||||||
- Svg = "eflame.svg",
|
|
||||||
- %% stack_to_flame.sh < eflame.trace > eflame.png
|
|
||||||
- Cmd = ?FMT("~s < ~s > ~s", [Script, Trace, Svg]),
|
|
||||||
- {ok, []} = rebar_utils:sh(Cmd, [{use_stdout, false},
|
|
||||||
- abort_on_error]),
|
|
||||||
- ?CONSOLE("See eflame.svg (generated from eflame.trace)~n", []),
|
|
||||||
- ok
|
|
||||||
- end
|
|
||||||
- end;
|
|
||||||
profile(_Config, _Commands, Profiler) ->
|
|
||||||
?ABORT("Unsupported profiler: ~s~n", [Profiler]).
|
|
||||||
|
|
||||||
@@ -499,9 +473,8 @@ option_spec_list() ->
|
|
||||||
{jobs, $j, "jobs", integer, JobsHelp},
|
|
||||||
{config, $C, "config", string, "Rebar config file to use"},
|
|
||||||
{profile, $p, "profile", undefined,
|
|
||||||
- "Profile this run of rebar. Via profiler= you can optionally select "
|
|
||||||
- "either fprof (default) or eflame. The result can be found in "
|
|
||||||
- "fprof.analysis or eflame.svg."},
|
|
||||||
+ "Profile this run of rebar. The result can be found in "
|
|
||||||
+ "fprof.analysis."},
|
|
||||||
{keep_going, $k, "keep-going", undefined,
|
|
||||||
"Keep running after a command fails"},
|
|
||||||
{recursive, $r, "recursive", boolean,
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove pre-R15B02 workaround
|
||||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
|
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
|
||||||
index 913f2f9..287cc84 100644
|
index f4d7b76..63f8c31 100644
|
||||||
--- a/src/rebar_eunit.erl
|
--- a/src/rebar_eunit.erl
|
||||||
+++ b/src/rebar_eunit.erl
|
+++ b/src/rebar_eunit.erl
|
||||||
@@ -435,18 +435,6 @@ get_beam_test_exports(ModuleStr) ->
|
@@ -436,18 +436,6 @@ get_beam_test_exports(ModuleStr) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
make_test_primitives(RawTests) ->
|
make_test_primitives(RawTests) ->
|
||||||
|
@ -27,7 +27,7 @@ index 913f2f9..287cc84 100644
|
||||||
?CONSOLE(" Running test function(s):~n", []),
|
?CONSOLE(" Running test function(s):~n", []),
|
||||||
F = fun({M, F2}, Acc) ->
|
F = fun({M, F2}, Acc) ->
|
||||||
?CONSOLE(" ~p:~p/0~n", [M, F2]),
|
?CONSOLE(" ~p:~p/0~n", [M, F2]),
|
||||||
@@ -455,23 +443,15 @@ make_test_primitives(RawTests) ->
|
@@ -456,23 +444,15 @@ make_test_primitives(RawTests) ->
|
||||||
case re:run(FNameStr, "_test_") of
|
case re:run(FNameStr, "_test_") of
|
||||||
nomatch ->
|
nomatch ->
|
||||||
%% Normal test
|
%% Normal test
|
||||||
|
@ -38,7 +38,7 @@ index 913f2f9..287cc84 100644
|
||||||
- MakePrimitive(generator, M, F2)
|
- MakePrimitive(generator, M, F2)
|
||||||
+ {generator, M, F2}
|
+ {generator, M, F2}
|
||||||
end,
|
end,
|
||||||
[NewFunction|Acc]
|
[eunit_module_suite(M, NewFunction)|Acc]
|
||||||
end,
|
end,
|
||||||
lists:foldl(F, [], RawTests).
|
lists:foldl(F, [], RawTests).
|
||||||
|
|
||||||
|
@ -50,6 +50,6 @@ index 913f2f9..287cc84 100644
|
||||||
-pre15b02_eunit_primitive(generator, M, F) ->
|
-pre15b02_eunit_primitive(generator, M, F) ->
|
||||||
- {generator, eunit_test:function_wrapper(M, F)}.
|
- {generator, eunit_test:function_wrapper(M, F)}.
|
||||||
-
|
-
|
||||||
%%
|
% Add a test group for eunit_surefire to be able to deduce the testsuite.
|
||||||
%% == run tests ==
|
% Calling eunit:test({module, M}) does exactly this as well.
|
||||||
%%
|
eunit_module_suite(M, X) ->
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] No such function erlang:timestamp/0
|
||||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
|
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
|
||||||
index 08f5b5f..348d06d 100644
|
index 5947277..047594d 100644
|
||||||
--- a/src/rebar_utils.erl
|
--- a/src/rebar_utils.erl
|
||||||
+++ b/src/rebar_utils.erl
|
+++ b/src/rebar_utils.erl
|
||||||
@@ -795,9 +795,9 @@ windows_temp_dir() ->
|
@@ -816,9 +816,9 @@ windows_temp_dir() ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
rebar_now() ->
|
rebar_now() ->
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow ignoring missing deps
|
||||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
|
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
|
||||||
index ba2b4e8..0f90e0f 100644
|
index 251bdee..577db64 100644
|
||||||
--- a/src/rebar_deps.erl
|
--- a/src/rebar_deps.erl
|
||||||
+++ b/src/rebar_deps.erl
|
+++ b/src/rebar_deps.erl
|
||||||
@@ -160,12 +160,17 @@ do_check_deps(Config) ->
|
@@ -163,12 +163,17 @@ do_check_deps(Config) ->
|
||||||
{Config1, {AvailDeps, []}} ->
|
{Config1, {AvailDeps, []}} ->
|
||||||
%% No missing deps
|
%% No missing deps
|
||||||
{Config1, AvailDeps};
|
{Config1, AvailDeps};
|
|
@ -1,165 +0,0 @@
|
||||||
From: =?UTF-8?q?Luis=20Rasc=C3=A3o?= <luis.rascao@gmail.com>
|
|
||||||
Date: Mon, 12 Oct 2015 13:48:09 +0100
|
|
||||||
Subject: [PATCH] Fix windows eunit tests
|
|
||||||
|
|
||||||
File tests: windows file operations should abort on error
|
|
||||||
the same as unix operations invoked through sh. Also
|
|
||||||
windows does not support the '?' character in filenames.
|
|
||||||
|
|
||||||
Eunit tests: the 'All' prefix is missing on the 'x tests passed'
|
|
||||||
message. Eunit only prints the 'All' prefix if there are more
|
|
||||||
than 2 passed tests, dropping the prefix on the match works
|
|
||||||
for all cases.
|
|
||||||
|
|
||||||
diff --git a/src/rebar_file_utils.erl b/src/rebar_file_utils.erl
|
|
||||||
index 0fc1403..a4d3be7 100644
|
|
||||||
--- a/src/rebar_file_utils.erl
|
|
||||||
+++ b/src/rebar_file_utils.erl
|
|
||||||
@@ -88,7 +88,7 @@ mv(Source, Dest) ->
|
|
||||||
?FMT("move /y \"~s\" \"~s\" 1> nul",
|
|
||||||
[filename:nativename(Source),
|
|
||||||
filename:nativename(Dest)]),
|
|
||||||
- [{use_stdout, false}, return_on_error]),
|
|
||||||
+ [{use_stdout, false}, abort_on_error]),
|
|
||||||
case R of
|
|
||||||
[] ->
|
|
||||||
ok;
|
|
||||||
@@ -131,14 +131,14 @@ delete_each_dir_win32([]) -> ok;
|
|
||||||
delete_each_dir_win32([Dir | Rest]) ->
|
|
||||||
{ok, []} = rebar_utils:sh(?FMT("rd /q /s \"~s\"",
|
|
||||||
[filename:nativename(Dir)]),
|
|
||||||
- [{use_stdout, false}, return_on_error]),
|
|
||||||
+ [{use_stdout, false}, abort_on_error]),
|
|
||||||
delete_each_dir_win32(Rest).
|
|
||||||
|
|
||||||
xcopy_win32(Source,Dest)->
|
|
||||||
{ok, R} = rebar_utils:sh(
|
|
||||||
?FMT("xcopy \"~s\" \"~s\" /q /y /e 2> nul",
|
|
||||||
[filename:nativename(Source), filename:nativename(Dest)]),
|
|
||||||
- [{use_stdout, false}, return_on_error]),
|
|
||||||
+ [{use_stdout, false}, abort_on_error]),
|
|
||||||
case length(R) > 0 of
|
|
||||||
%% when xcopy fails, stdout is empty and and error message is printed
|
|
||||||
%% to stderr (which is redirected to nul)
|
|
||||||
@@ -162,8 +162,10 @@ cp_r_win32({false, Source} = S,{true, DestDir}) ->
|
|
||||||
cp_r_win32(S, {false, filename:join(DestDir, filename:basename(Source))});
|
|
||||||
cp_r_win32({false, Source},{false, Dest}) ->
|
|
||||||
%% from file to file
|
|
||||||
- {ok,_} = file:copy(Source, Dest),
|
|
||||||
- ok;
|
|
||||||
+ case file:copy(Source, Dest) of
|
|
||||||
+ {ok,_} -> ok;
|
|
||||||
+ _ -> throw(rebar_abort)
|
|
||||||
+ end;
|
|
||||||
cp_r_win32({true, SourceDir}, {false, DestDir}) ->
|
|
||||||
case filelib:is_regular(DestDir) of
|
|
||||||
true ->
|
|
||||||
diff --git a/test/rebar_compiler_tests.erl b/test/rebar_compiler_tests.erl
|
|
||||||
index 3ed600b..104a7d8 100644
|
|
||||||
--- a/test/rebar_compiler_tests.erl
|
|
||||||
+++ b/test/rebar_compiler_tests.erl
|
|
||||||
@@ -84,11 +84,11 @@ not_keep_going_test_() ->
|
|
||||||
setup,
|
|
||||||
fun() ->
|
|
||||||
setup_basic_project(),
|
|
||||||
- setup_rebar_config(),
|
|
||||||
- rebar("compile")
|
|
||||||
+ setup_rebar_config()
|
|
||||||
end,
|
|
||||||
fun teardown/1,
|
|
||||||
- fun(RebarOut)->
|
|
||||||
+ fun()->
|
|
||||||
+ RebarOut = rebar("compile"),
|
|
||||||
[
|
|
||||||
{"Exit after error",
|
|
||||||
?_assert(string:str(RebarOut, "ERROR: compile failed") =/= 0)}
|
|
||||||
diff --git a/test/rebar_eunit_tests.erl b/test/rebar_eunit_tests.erl
|
|
||||||
index cb331a4..d481dae 100644
|
|
||||||
--- a/test/rebar_eunit_tests.erl
|
|
||||||
+++ b/test/rebar_eunit_tests.erl
|
|
||||||
@@ -56,7 +56,7 @@ eunit_test_() ->
|
|
||||||
?_assert(string:str(RebarOut, "myapp_mymod:") =/= 0)},
|
|
||||||
|
|
||||||
{"Tests are only run once",
|
|
||||||
- ?_assert(string:str(RebarOut, "All 2 tests passed") =/= 0)}]
|
|
||||||
+ ?_assert(string:str(RebarOut, "2 tests passed") =/= 0)}]
|
|
||||||
end}.
|
|
||||||
|
|
||||||
eunit_with_suites_and_tests_test_() ->
|
|
||||||
@@ -80,7 +80,7 @@ eunit_with_suites_and_tests_test_() ->
|
|
||||||
?_assert(string:str(RebarOut, "myapp_mymod:") =:= 0)},
|
|
||||||
|
|
||||||
{"Selected suite tests are only run once",
|
|
||||||
- ?_assert(string:str(RebarOut, "All 4 tests passed") =/= 0)}]
|
|
||||||
+ ?_assert(string:str(RebarOut, "4 tests passed") =/= 0)}]
|
|
||||||
end},
|
|
||||||
{"Ensure EUnit runs selected _tests suites",
|
|
||||||
setup, fun() ->
|
|
||||||
@@ -102,7 +102,7 @@ eunit_with_suites_and_tests_test_() ->
|
|
||||||
?_assert(string:str(RebarOut, "myapp_mymod:") =:= 0)},
|
|
||||||
|
|
||||||
{"Selected suite tests are only run once",
|
|
||||||
- ?_assert(string:str(RebarOut, "All 2 tests passed") =/= 0)}]
|
|
||||||
+ ?_assert(string:str(RebarOut, "2 tests passed") =/= 0)}]
|
|
||||||
end},
|
|
||||||
{"Ensure EUnit runs a specific test defined in a selected suite",
|
|
||||||
setup, fun() ->
|
|
||||||
@@ -154,7 +154,7 @@ eunit_with_suites_and_tests_test_() ->
|
|
||||||
"myapp_mymod2_tests:myfunc2_test/0") =/= 0)]},
|
|
||||||
|
|
||||||
{"Selected suite tests are run once",
|
|
||||||
- ?_assert(string:str(RebarOut, "All 3 tests passed") =/= 0)}]
|
|
||||||
+ ?_assert(string:str(RebarOut, "3 tests passed") =/= 0)}]
|
|
||||||
end},
|
|
||||||
{"Ensure EUnit runs specific test in a _tests suite",
|
|
||||||
setup,
|
|
||||||
@@ -190,7 +190,7 @@ eunit_with_suites_and_tests_test_() ->
|
|
||||||
=/= 0)]},
|
|
||||||
|
|
||||||
{"Selected suite tests is run once",
|
|
||||||
- ?_assert(string:str(RebarOut, "All 2 tests passed") =/= 0)}]
|
|
||||||
+ ?_assert(string:str(RebarOut, "2 tests passed") =/= 0)}]
|
|
||||||
end},
|
|
||||||
{"Ensure EUnit runs a specific test by qualified function name",
|
|
||||||
setup,
|
|
||||||
@@ -325,7 +325,11 @@ environment_test_() ->
|
|
||||||
|
|
||||||
assert_rebar_runs() ->
|
|
||||||
prepare_rebar_script(),
|
|
||||||
- ?assert(string:str(os:cmd(filename:nativename("./" ++ ?TMP_DIR ++ "rebar")),
|
|
||||||
+ {ok, Cwd} = file:get_cwd(),
|
|
||||||
+ ok = file:set_cwd(?TMP_DIR),
|
|
||||||
+ RebarOut = os:cmd(filename:nativename("./rebar")),
|
|
||||||
+ ok = file:set_cwd(Cwd),
|
|
||||||
+ ?assert(string:str(RebarOut,
|
|
||||||
"No command to run specified!") =/= 0).
|
|
||||||
|
|
||||||
basic_setup_test_() ->
|
|
||||||
diff --git a/test/rebar_file_utils_tests.erl b/test/rebar_file_utils_tests.erl
|
|
||||||
index fc76d58..c9b4192 100644
|
|
||||||
--- a/test/rebar_file_utils_tests.erl
|
|
||||||
+++ b/test/rebar_file_utils_tests.erl
|
|
||||||
@@ -36,7 +36,7 @@
|
|
||||||
|
|
||||||
-define(TMP_DIR, "tmp_file_utils").
|
|
||||||
|
|
||||||
--define(SRC, "source dir?").
|
|
||||||
+-define(SRC, "source dir").
|
|
||||||
-define(DST, "dest (dir)").
|
|
||||||
-define(FILE1, "file 1").
|
|
||||||
-define(FILE2, "file(2)").
|
|
||||||
diff --git a/test/rebar_xref_eunit.erl b/test/rebar_xref_eunit.erl
|
|
||||||
index 341fe2e..f32ea46 100644
|
|
||||||
--- a/test/rebar_xref_eunit.erl
|
|
||||||
+++ b/test/rebar_xref_eunit.erl
|
|
||||||
@@ -192,8 +192,8 @@ prepare_rebar_script() ->
|
|
||||||
{unix, _} ->
|
|
||||||
[] = os:cmd("chmod u+x " ++ Rebar);
|
|
||||||
{win32, _} ->
|
|
||||||
- {ok, _} = file:copy(?REBAR_SCRIPT ++ ".bat",
|
|
||||||
- ?TMP_DIR ++ "rebar.bat")
|
|
||||||
+ {ok, _} = file:copy(?REBAR_SCRIPT ++ ".cmd",
|
|
||||||
+ ?TMP_DIR ++ "rebar.cmd")
|
|
||||||
end.
|
|
||||||
|
|
||||||
rebar() ->
|
|
Loading…
Reference in New Issue