[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] iotests: Use configured python

From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH] iotests: Use configured python
Date: Mon, 05 May 2014 18:25:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05.05.2014 14:26, Stefan Hajnoczi wrote:
On Sat, May 03, 2014 at 04:47:08PM +0200, Max Reitz wrote:
@@ -56,22 +57,22 @@ for IMGOPTS in "compat=0.10" "compat=1.1"; do
      echo === Create image with unknown header extension ===
      _make_test_img 64M
-    ./qcow2.py "$TEST_IMG" add-header-ext 0x12345678 "This is a test header 
-    ./qcow2.py "$TEST_IMG" dump-header
+    $PYTHON qcow2.py "$TEST_IMG" add-header-ext 0x12345678 "This is a test header 
+    $PYTHON qcow2.py "$TEST_IMG" dump-header
Please use "$PYTHON" to humor the people who like to put spaces in their
path names.

Following on Peter's explanation, me using ./configure --python=python2 results in PYTHON='python2 -B', which probably won't work so well with quotes around it.

@@ -215,9 +222,16 @@ do
          $timestamp && echo -n "        ["`date "+%T"`"]"
-        [ ! -x $seq ] && chmod u+x $seq # ensure we can run it
+        if [ "$(head -n 1 $seq)" == "#!/usr/bin/env python" ]; then
+            run_command="$PYTHON $seq"
The code generally uses the older `` notation instead of $().  Please
use ``.

If I'd send a v2 with ``, Eric would probably want me to send a v3 with $(). ;-)

I personally don't really care what to use, but so far nobody has picked on me for using $(), whereas Eric once criticized my use of `` (which I had taken over from other tests).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]