iotests: Allow running from different directory
commitb1cbc33a3971b6bb005d5ac3569feae35a71de0f
authorKevin Wolf <kwolf@redhat.com>
Wed, 2 Sep 2020 11:03:26 +0000 (2 13:03 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 10 Sep 2020 09:11:05 +0000 (10 11:11 +0200)
treeadb7aa44c4c2a139b6b0057b9be69d136f4630f5
parent374eedd1c47bafca912a67d556eb2f1c1c0b171a
iotests: Allow running from different directory

It is convenient to be able to edit the tests and run them without
changing the current working directory back and forth. Instead of
assuming that $PWD is the qemu-iotests build directory, derive the build
directory from the executed script.

This allows 'check' to find the required files even when called from
another directory. The scratch directory will still be in the current
working directory.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200902110326.257115-1-kwolf@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/check