diff options
author | Max Reitz <mreitz@redhat.com> | 2014-05-24 23:24:58 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-06-27 20:00:00 +0200 |
commit | ea81ca9de1354e9f42c4e09ead2af1b4d010bdde (patch) | |
tree | 83cbc3f7e5e756ba6195a2c6eede6a372158c141 /tests/qemu-iotests/check | |
parent | 7fed1a49ff72a5b794e3723612fa1731844b38f7 (diff) | |
download | qemu-ea81ca9de1354e9f42c4e09ead2af1b4d010bdde.zip qemu-ea81ca9de1354e9f42c4e09ead2af1b4d010bdde.tar.gz qemu-ea81ca9de1354e9f42c4e09ead2af1b4d010bdde.tar.bz2 |
iotests: Use $PYTHON for Python scripts
Instead of invoking Python scripts directly via ./, use $PYTHON to
obtain the correct Python interpreter command.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/check')
-rwxr-xr-x | tests/qemu-iotests/check | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 992b91e..8ca4011 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -288,10 +288,16 @@ 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 + 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` |