Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error handling in silent_exec when VERBOSE=1 #2398

Merged
merged 1 commit into from
Aug 8, 2019

Conversation

arcusfelis
Copy link
Contributor

tee was always returning 0

This PR addresses:

Before:

~/erlang/mim_july|master $ VERBOSE=1 ./tools/silent_exec.sh cat nonono
RUN: nonono
LOG: /Users/mikhailuvarov/erlang/mim_july/cat

./tools/silent_exec.sh: line 31: nonono: command not found
~/erlang/mim_july|master $ echo "$?"
0 # This is wrooong



~/erlang/mim_july|master $ VERBOSE=0 ./tools/silent_exec.sh cat nonono
RUN: nonono
LOG: /Users/mikhailuvarov/erlang/mim_july/cat

./tools/silent_exec.sh: line 33: nonono: command not found
~/erlang/mim_july|master $ echo "$?"
1

After:

VERBOSE=1 ./tools/silent_exec.sh cat nonono
RUN: nonono
LOG: /Users/mikhailuvarov/erlang/mim_july/cat

./tools/silent_exec.sh: line 38: nonono: command not found
~/erlang/mim_july|fix-exit-code-handling-in-silent-exec $ echo "$?"
127

@mongoose-im
Copy link
Collaborator

mongoose-im commented Aug 8, 2019

6960.1 / Erlang 22.0 / small_tests / 2b41446
Reports root / small


6960.2 / Erlang 22.0 / internal_mnesia / 2b41446
Reports root/ big
OK: 1258 / Failed: 0 / User-skipped: 167 / Auto-skipped: 0


6960.4 / Erlang 22.0 / ldap_mnesia / 2b41446
Reports root/ big
OK: 1232 / Failed: 1 / User-skipped: 206 / Auto-skipped: 0

mod_global_distrib_SUITE:mod_global_distrib:test_pm_with_graceful_reconnection_to_different_server
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"eve90.72166@localhost/res1">>,escalus_tcp,
          <0.20150.1>,
          [{event_manager,<0.20143.1>},
           {server,<<"localhost">>},
           {username,<<"eve90.72166">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.20143.1>},
            {server,<<"localhost">>},
            {username,<<"eve90.72166">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"eve90.72166">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {port,5222},
           {username,<<"eve90.72166">>},
           {server,<<"localhost">>},
           {password,<<"password">>},
           {port,5252},
           {stream_id,<<"B4E61B0EB1114AFE">>}]},
        5000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {mod_global_distrib_SUITE,
       '-test_pm_with_graceful_reconnection_to_different_server/1-fun-0-',
       3,
       [{file,"mod_global_distrib_SUITE.erl"},{line,573}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
        {line,72}]},
     {mod_global_distrib_...

Report log


6960.3 / Erlang 22.0 / odbc_mssql_mnesia / 2b41446
Reports root/ big
OK: 3163 / Failed: 0 / User-skipped: 278 / Auto-skipped: 0


6960.5 / Erlang 22.0 / elasticsearch_and_cassandra_mnesia / 2b41446
Reports root/ big
OK: 548 / Failed: 0 / User-skipped: 55 / Auto-skipped: 0


6960.8 / Erlang 21.3 / mysql_redis / 2b41446
Reports root/ big
OK: 3174 / Failed: 1 / User-skipped: 280 / Auto-skipped: 0

mod_global_distrib_SUITE:mod_global_distrib:test_pm_with_graceful_reconnection_to_different_server
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"eve77.214254@localhost/res1">>,escalus_tcp,
          <0.28825.3>,
          [{event_manager,<0.28818.3>},
           {server,<<"localhost">>},
           {username,<<"eve77.214254">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.28818.3>},
            {server,<<"localhost">>},
            {username,<<"eve77.214254">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"eve77.214254">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {port,5222},
           {username,<<"eve77.214254">>},
           {server,<<"localhost">>},
           {password,<<"password">>},
           {port,5252},
           {stream_id,<<"182B43A243AE1A3A">>}]},
        5000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {mod_global_distrib_SUITE,
       '-test_pm_with_graceful_reconnection_to_different_server/1-fun-0-',
       3,
       [{file,"mod_global_distrib_SUITE.erl"},{line,573}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
        {line,72}]},
     {mod_global_dis...

Report log


6960.7 / Erlang 21.3 / pgsql_mnesia / 2b41446
Reports root/ big / small
OK: 3195 / Failed: 0 / User-skipped: 246 / Auto-skipped: 0


6960.9 / Erlang 21.3 / riak_mnesia / 2b41446
Reports root/ big / small
OK: 1509 / Failed: 0 / User-skipped: 149 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Aug 8, 2019

Codecov Report

Merging #2398 into master will increase coverage by 1.82%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2398      +/-   ##
==========================================
+ Coverage   75.21%   77.03%   +1.82%     
==========================================
  Files         338      338              
  Lines       29374    29374              
==========================================
+ Hits        22094    22629     +535     
+ Misses       7280     6745     -535
Impacted Files Coverage Δ
...rc/global_distrib/mod_global_distrib_transport.erl 50% <0%> (-5%) ⬇️
src/mod_bosh_socket.erl 81.84% <0%> (-0.34%) ⬇️
src/mod_roster.erl 80.49% <0%> (+0.22%) ⬆️
src/mod_muc_log.erl 77.94% <0%> (+0.25%) ⬆️
src/mod_muc_room.erl 77.79% <0%> (+0.35%) ⬆️
src/ejabberd_c2s.erl 87.16% <0%> (+0.39%) ⬆️
src/mam/mod_mam_rdbms_arch.erl 52.61% <0%> (+0.4%) ⬆️
src/ejabberd_config.erl 78.29% <0%> (+0.42%) ⬆️
src/inbox/mod_inbox_rdbms.erl 92.85% <0%> (+1.19%) ⬆️
src/ejabberd_router.erl 74.21% <0%> (+1.25%) ⬆️
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ecb7d7...6d45aa9. Read the comment docs.

@arcusfelis arcusfelis merged commit 929b6aa into master Aug 8, 2019
@arcusfelis arcusfelis deleted the fix-exit-code-handling-in-silent-exec branch August 8, 2019 16:20
@fenek fenek added this to the 3.4.0++ milestone Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants