From: Luke Diamand Date: Fri, 17 Aug 2012 06:07:51 GMT Subject: Re: [PATCH 02/12] git p4 test: use p4d -L option to suppress log messages Message-ID: <502DDFB7.2010408@diamand.org> In-Reply-To: <1345160114-27654-3-git-send-email-pw@padd.com> On 17/08/12 00:35, Pete Wyckoff wrote: > Send p4d output to a logfile in the $TRASH_DIRECTORY. > Its messages add no value to testing. I'm not totally sold on this; I still fairly frequently see weird errors from p4d and these help me work out what's going on. For example, at the moment if you run a test too quickly after the last one, then it won't start up (or something like that). The problem with hiding the error messages is that I don't think I will think to look in this log file if tests start failing. > > Signed-off-by: Pete Wyckoff > --- > t/lib-git-p4.sh | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh > index 482eeac..edb4033 100644 > --- a/t/lib-git-p4.sh > +++ b/t/lib-git-p4.sh > @@ -35,12 +35,13 @@ db="$TRASH_DIRECTORY/db" > cli=$(test-path-utils real_path "$TRASH_DIRECTORY/cli") > git="$TRASH_DIRECTORY/git" > pidfile="$TRASH_DIRECTORY/p4d.pid" > +logfile="$TRASH_DIRECTORY/p4d.log" > > start_p4d() { > mkdir -p "$db" "$cli" "$git"&& > rm -f "$pidfile"&& > ( > - p4d -q -r "$db" -p $P4DPORT& > + p4d -q -r "$db" -p $P4DPORT -L "$logfile"& > echo $!>"$pidfile" > )&& >