From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlJVK-0001EW-Q7 for qemu-devel@nongnu.org; Fri, 16 May 2014 10:53:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlJVE-0008GO-IB for qemu-devel@nongnu.org; Fri, 16 May 2014 10:52:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlJVE-0008GH-9U for qemu-devel@nongnu.org; Fri, 16 May 2014 10:52:52 -0400 Message-ID: <5376263D.4000300@redhat.com> Date: Fri, 16 May 2014 16:52:45 +0200 From: Max Reitz MIME-Version: 1.0 References: <1400192774-606-1-git-send-email-mreitz@redhat.com> <1400192774-606-6-git-send-email-mreitz@redhat.com> <20140516075445.GE1941@T430.nay.redhat.com> In-Reply-To: <20140516075445.GE1941@T430.nay.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/7] iotests: Use $PYTHON for Python scripts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org, Stefan Hajnoczi , Markus Armbruster On 16.05.2014 09:54, Fam Zheng wrote: > On Fri, 05/16 00:26, Max Reitz wrote: >> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check >> index bd66630..9968db9 100755 >> --- a/tests/qemu-iotests/check >> +++ b/tests/qemu-iotests/check >> @@ -287,10 +287,17 @@ do >> >> start=`_wallclock` >> $timestamp && echo -n " ["`date "+%T"`"]" >> + >> + if [ "$(head -n 1 "$source_iotests/$seq")" == "#!/usr/bin/env python" ]; then >> + run_command="$PYTHON $seq" >> + else >> + [ ! -x "$source_iotests/$seq" ] && chmod u+x "$source_iotests/$seq" # ensure we can run it > No, I don't think we need chmod here, to change source tree. If the mode has no > x bit, we need a git commit to fix it. This is in fact due to a mistake of mine when splitting the commits. In patch 1, there is a hunk with: - [ ! -x $seq ] && chmod u+x $seq # ensure we can run it This should actually be part of this patch instead, so it is preexisting. However, you are right in that we should probably not do this, especially not for out-of-tree builds. I'll drop it from v2, if there are no objections. Max > Fam > >> + run_command="./$seq" >> + fi >> export OUTPUT_DIR="$PWD" >> (cd "$source_iotests"; >> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(($RANDOM % 255 + 1))} \ >> - ./$seq >$tmp.out 2>&1) >> + $run_command >$tmp.out 2>&1) >> sts=$? >> $timestamp && _timestamp >> stop=`_wallclock` >> -- >> 1.9.2 >> >>