mirror of
https://github.com/qemu/qemu.git
synced 2024-12-12 05:03:42 +08:00
e8d81a61e1
POSIX requires $PWD to be reliable, and we expect all shells used by qemu scripts to be relatively close to POSIX. Thus, it is smarter to avoid forking the pwd executable for something that is already available in the environment. So replace it with the following: sed -i 's/\(`pwd`\|\$(pwd)\)/$PWD/g' $(git grep -l pwd) Then delete a pointless line assigning PWD to itself. Cc: kwolf@redhat.com Cc: mreitz@redhat.com Cc: eblake@redhat.com Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com> Message-Id: <20181024094051.4470-2-maozhongyi@cmss.chinamobile.com> Reviewed-by: Eric Blake <eblake@redhat.com> [eblake: touch up commit message, reorder series, tweak a couple more files] Signed-off-by: Eric Blake <eblake@redhat.com>
25 lines
443 B
Bash
Executable File
25 lines
443 B
Bash
Executable File
#!/bin/sh
|
|
|
|
FORMAT_LIST="raw qcow2 qed vmdk vpc"
|
|
if [ "$#" -ne 0 ]; then
|
|
FORMAT_LIST="$@"
|
|
fi
|
|
|
|
export QEMU_PROG="$PWD/x86_64-softmmu/qemu-system-x86_64"
|
|
export QEMU_IMG_PROG="$PWD/qemu-img"
|
|
export QEMU_IO_PROG="$PWD/qemu-io"
|
|
|
|
if [ ! -x $QEMU_PROG ]; then
|
|
echo "'make check-block' requires qemu-system-x86_64"
|
|
exit 1
|
|
fi
|
|
|
|
cd tests/qemu-iotests
|
|
|
|
ret=0
|
|
for FMT in $FORMAT_LIST ; do
|
|
./check -T -nocache -$FMT || ret=1
|
|
done
|
|
|
|
exit $ret
|