mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
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>
This commit is contained in:
parent
374eedd1c4
commit
b1cbc33a39
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ then
|
|||
_init_error "failed to obtain source tree name from check symlink"
|
||||
fi
|
||||
source_iotests=$(cd "$source_iotests"; pwd) || _init_error "failed to enter source tree"
|
||||
build_iotests=$PWD
|
||||
build_iotests=$(readlink -f $(dirname "$0"))
|
||||
else
|
||||
# called from the source tree
|
||||
source_iotests=$PWD
|
||||
|
|
Loading…
Add table
Reference in a new issue