From: Peter Xu Subject: Re: [kvm-unit-tests PATCH v6 2/3] run_tests: put logs into per-test file Date: Thu, 12 Jan 2017 22:14:00 +0800 Message-ID: <20170112141400.GS4450@pxdev.xzpeter.org> References: <1484192182-13760-1-git-send-email-peterx@redhat.com> <1484192182-13760-3-git-send-email-peterx@redhat.com> <5269cdb1-ae12-31af-0e7d-7c8d2b9c6848@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Andrew Jones , qemu-devel@nongnu.org, kvm@vger.kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <5269cdb1-ae12-31af-0e7d-7c8d2b9c6848@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org On Thu, Jan 12, 2017 at 01:55:48PM +0100, Paolo Bonzini wrote: [...] > > diff --git a/scripts/functions.bash b/scripts/common.bash > > similarity index 75% > > rename from scripts/functions.bash > > rename to scripts/common.bash > > index ee9143c..2dd7360 100644 > > --- a/scripts/functions.bash > > +++ b/scripts/common.bash > > @@ -1,3 +1,12 @@ > > +: ${unittest_log_dir:=logs} > > + > > +function run_task() > > +{ > > + local testname="$2" > > + > > + RUNTIME_log_file="${unittest_log_dir}/${testname}.log" > > + "$@" > > +} > > This should go in run_tests.sh since that's the only place that uses > unittest_log_dir. (The last line then becomes 'run "$@"' and the > for_each_unittest call must be adjusted). Done and queued. Yes, this should be cleaner. Thanks, -- peterx