aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2018-04-06 15:49:43 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-04-06 16:32:51 -0400
commitf5ef48855733360c850be82221ce7454294a1580 (patch)
treeff566f219efb9df3cbf005830fa1c90259d749c6
parenteaaa1e283ada2e8808f9074829c27857adb35bdb (diff)
ktest.pl: No need to print no mailer is specified when mailto is not
If the user doesn't want to send mail, then don't bother them with output that says they didn't specify a mailer. That can be annoying. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rwxr-xr-xtools/testing/ktest/ktest.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 30a4c053f98b..07d0a47816e4 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -4135,12 +4135,14 @@ sub _sendmail_send {
4135} 4135}
4136 4136
4137sub send_email { 4137sub send_email {
4138 if (defined($mailto) && defined($mailer)) { 4138 if (defined($mailto)) {
4139 if (!defined($mailer)) {
4140 doprint "No email sent: email or mailer not specified in config.\n";
4141 return;
4142 }
4139 if ($mailer eq "mail" || $mailer eq "mailx"){ _mailx_send(@_);} 4143 if ($mailer eq "mail" || $mailer eq "mailx"){ _mailx_send(@_);}
4140 elsif ($mailer eq "sendmail" ) { _sendmail_send(@_);} 4144 elsif ($mailer eq "sendmail" ) { _sendmail_send(@_);}
4141 else { doprint "\nYour mailer: $mailer is not supported.\n" } 4145 else { doprint "\nYour mailer: $mailer is not supported.\n" }
4142 } else {
4143 print "No email sent: email or mailer not specified in config.\n"
4144 } 4146 }
4145} 4147}
4146 4148