From: Zhang, Yixin <yixin.zhang@intel.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 ltp] runltp: fix shellcheck error for sending email
Date: Mon, 15 Oct 2018 19:19:44 +0800 [thread overview]
Message-ID: <20181015111944.GA20818@yixin-dev> (raw)
In-Reply-To: <20181015095214.GA32587@dell5510>
Thanks Petr, please ignore the patch, I'll look into the new runner.
Yixin
On 2018-10-15 at 11:52:14 +0200, Petr Vorel wrote:
> Hi Yixin,
>
> > runltp:894:11: error: Couldn't parse this test expression. [SC1073]
> > runltp:894:13: error: If grouping expressions inside [..], use \( ..\). [SC1026]
> > runltp:894:15: error: Expected test to end here (don't wrap commands in []/[[]]).
> > Fix any mentioned problems and try again. [SC1072]
>
> > Change '-o' to '&&' according to the comment and context.
> > Then as "$LOGFILE_NAME" is always not empty, remove below "if" statement
> > and update indentation accordingly:
>
> > if [ -z "$HTMLFILE_NAME" ] && [ -z "$OUTPUTFILE_NAME" ] && [ -z "$LOGFILE_NAME" ]; then
> > ##User does not have output/logs/html-output, nothing to be mailed in this situation
> > echo "Nothing to be mailed here...."
>
> Just to warn you this file si deprecated as Cyril Hrubis works on new runner [1] [2]
> So it might be better test it than invest time into something which is going to
> be deleted.
>
> > Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
> > ---
> > runltp | 139 +++++++++++++++++++++++++++++++----------------------------------
> > 1 file changed, 67 insertions(+), 72 deletions(-)
>
> ...
> > + if [ "$ALT_EMAIL_OUT" -eq 1 ] ; then ## User wants reports to be e-mailed
> > + TAR_FILE_NAME=LTP_RUN_$version_date$DEFAULT_FILE_NAME_GENERATION_TIME.tar
> > + if [ "$HTMLFILE_NAME" ] ; then ## HTML file Exists
> > + if [ "$ALT_HTML_OUT" -ne 1 ] ; then ## The HTML file path is absolute and not $LTPROOT/output
> > + mkdir -p $LTPROOT/output ## We need to create this Directory
> > + cp $HTMLFILE_NAME $LTPROOT/output/
> > + fi
> > + fi
> > + if [ "$OUTPUTFILE_NAME" ] ; then ## Output file exists
> > + if [ "$ALT_DIR_OUT" -ne 1 ] ; then ## The Output file path is absolute and not $LTPROOT/output
> > + mkdir -p $LTPROOT/output ## We need to create this Directory
> > + cp $OUTPUTFILE_NAME $LTPROOT/output/
> > + fi
> > + fi
> > + if [ "$LOGFILE_NAME" ] ; then ## Log file exists
> As I wrote in comment to v1 [3], $LOGFILE_NAME is always defined, so no need to check for it.
> And the same is for for $OUTPUTFILE_NAME
>
> > + if [ "$ALT_DIR_RES" -ne 1 ] ; then ## The Log file path is absolute and not $LTPROOT/results
> > + mkdir -p $LTPROOT/results ## We need to create this Directory
> > + cp $LOGFILE_NAME $LTPROOT/results/
> > + fi
> > + fi
>
>
> Kind regards,
> Petr
>
> [1] https://hackweek.suse.com/17/projects/prototype-new-ltp-upstream-runltp-script
> [2] https://github.com/metan-ucw/ltp
> [3] http://lists.linux.it/pipermail/ltp/2018-July/008783.html
next prev parent reply other threads:[~2018-10-15 11:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 8:34 [LTP] [PATCH v2 ltp] runltp: fix shellcheck error for sending email Yixin Zhang
2018-10-15 9:52 ` Petr Vorel
2018-10-15 11:19 ` Zhang, Yixin [this message]
2018-10-15 14:18 ` Dan Rue
2018-10-15 14:51 ` Cyril Hrubis
2018-10-15 19:16 ` Petr Vorel
2018-10-15 19:07 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181015111944.GA20818@yixin-dev \
--to=yixin.zhang@intel.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.