diff options
| author | Fred Hebert <mononcqc@ferd.ca> | 2019-10-04 09:27:26 -0400 | 
|---|---|---|
| committer | Fred Hebert <mononcqc@ferd.ca> | 2019-10-04 09:27:26 -0400 | 
| commit | 2addcfebe26e14c08b988e17c0a1abfd92a8f7a3 (patch) | |
| tree | 17078775bf2e1aabebd4ea709056d99794ad860d | |
| parent | e2ac32175806a80a3a92f1e5f554ee7688259350 (diff) | |
Reload logger config in CT suites
Fixes #2159; this is done by force-reloading the handlers to match the
config.
This can create a bit of a funny effect if sys.config specifies an INFO
log level (or lower) is specified. While apps are booted for config
changes before the cth_failonly hook is enabled, supervision and other
application log messages can start being output. They will start being
suppressed once the CT run begins.
This is not a bug, it's a race in instantiation of control and enabling
of log levels. Nothing we can do about that. It might however surprise
people a good bit. If non-default stdout handlers are added, they are
similarly likely to become noisy; specifying a test-specific sys.config
file may be necessary then.
Also includes a bump of cth_readable version, which now checks for
updates to the log formatter on every test output.
| -rw-r--r-- | rebar.config | 2 | ||||
| -rw-r--r-- | rebar.lock | 4 | ||||
| -rw-r--r-- | src/rebar_prv_common_test.erl | 2 | 
3 files changed, 4 insertions, 4 deletions
| diff --git a/rebar.config b/rebar.config index 8877e73..6ffdfd5 100644 --- a/rebar.config +++ b/rebar.config @@ -10,7 +10,7 @@          {bbmustache,          "1.6.1"},          {relx,                "3.33.0"},          {cf,                  "0.2.2"}, -        {cth_readable,        "1.4.5"}, +        {cth_readable,        "1.4.6"},          {eunit_formatters,    "0.5.0"}]}.  {post_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", @@ -2,7 +2,7 @@  [{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.6.1">>},0},   {<<"certifi">>,{pkg,<<"certifi">>,<<"2.5.1">>},0},   {<<"cf">>,{pkg,<<"cf">>,<<"0.2.2">>},0}, - {<<"cth_readable">>,{pkg,<<"cth_readable">>,<<"1.4.5">>},0}, + {<<"cth_readable">>,{pkg,<<"cth_readable">>,<<"1.4.6">>},0},   {<<"erlware_commons">>,{pkg,<<"erlware_commons">>,<<"1.3.1">>},0},   {<<"eunit_formatters">>,{pkg,<<"eunit_formatters">>,<<"0.5.0">>},0},   {<<"getopt">>,{pkg,<<"getopt">>,<<"1.0.1">>},0}, @@ -15,7 +15,7 @@   {<<"bbmustache">>, <<"9FB63FA60BD53AFBF47F02E6D8BD6B2BEAFC068E02E20975254DC7461FD4F397">>},   {<<"certifi">>, <<"867CE347F7C7D78563450A18A6A28A8090331E77FA02380B4A21962A65D36EE5">>},   {<<"cf">>, <<"7F2913FFF90ABCABD0F489896CFEB0B0674F6C8DF6C10B17A83175448029896C">>}, - {<<"cth_readable">>, <<"BE3765763F9BEA87320F03F33B578875F8B3A4E8BD970EAE198AFF8A3F1AB38F">>}, + {<<"cth_readable">>, <<"29DF6430584389B30D14B7D68D0EB7BC837ED31E2DF6E9D93598D4EC63B1E3BD">>},   {<<"erlware_commons">>, <<"0CE192AD69BC6FD0880246D852D0ECE17631E234878011D1586E053641ED4C04">>},   {<<"eunit_formatters">>, <<"6A9133943D36A465D804C1C5B6E6839030434B8879C5600D7DDB5B3BAD4CCB59">>},   {<<"getopt">>, <<"C73A9FA687B217F2FF79F68A3B637711BB1936E712B521D8CE466B29CBF7808A">>}, diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl index c31c060..ea1477e 100644 --- a/src/rebar_prv_common_test.erl +++ b/src/rebar_prv_common_test.erl @@ -261,7 +261,7 @@ select_tests(State, ProjectApps, CmdOpts, CfgOpts) ->      %% to our best ability.      rebar_paths:set_paths([deps, plugins], State),      [application:load(Application) || Config <- Configs, {Application, _} <- Config], -    rebar_utils:reread_config(Configs), +    rebar_utils:reread_config(Configs, [update_logger]),      Opts = merge_opts(CmdOpts,CfgOpts),      discover_tests(State, ProjectApps, Opts). | 
