[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 60/64] iotests: Allow running from different directory
From: |
Kevin Wolf |
Subject: |
[PULL 60/64] iotests: Allow running from different directory |
Date: |
Mon, 7 Sep 2020 13:09:32 +0200 |
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 3ab859ac1a..fe60c9d61d 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -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=$(realpath $(dirname "$0"))
else
# called from the source tree
source_iotests=$PWD
--
2.25.4
- [PULL 49/64] qemu-img: Use child access functions, (continued)
- [PULL 49/64] qemu-img: Use child access functions, Kevin Wolf, 2020/09/07
- [PULL 50/64] block: Drop backing_bs(), Kevin Wolf, 2020/09/07
- [PULL 42/64] block: Report data child for query-blockstats, Kevin Wolf, 2020/09/07
- [PULL 53/64] block: Leave BDS.backing_{file,format} constant, Kevin Wolf, 2020/09/07
- [PULL 54/64] iotests: Test that qcow2's data-file is flushed, Kevin Wolf, 2020/09/07
- [PULL 55/64] iotests: Let complete_and_wait() work with commit, Kevin Wolf, 2020/09/07
- [PULL 56/64] iotests: Add filter commit test cases, Kevin Wolf, 2020/09/07
- [PULL 52/64] block: Inline bdrv_co_block_status_from_*(), Kevin Wolf, 2020/09/07
- [PULL 58/64] iotests: Add test for commit in sub directory, Kevin Wolf, 2020/09/07
- [PULL 59/64] iotests: Test committing to overridden backing, Kevin Wolf, 2020/09/07
- [PULL 60/64] iotests: Allow running from different directory,
Kevin Wolf <=
- [PULL 61/64] file-win32: Fix "locking" option, Kevin Wolf, 2020/09/07
- [PULL 63/64] block/nvme: Use generic NvmeBar structure, Kevin Wolf, 2020/09/07
- [PULL 57/64] iotests: Add filter mirror test cases, Kevin Wolf, 2020/09/07
- [PULL 62/64] block/nvme: Group controller registers in NVMeRegs structure, Kevin Wolf, 2020/09/07
- [PULL 64/64] block/nvme: Pair doorbell registers, Kevin Wolf, 2020/09/07
- [PULL 37/64] block/snapshot: Fix fallback, Kevin Wolf, 2020/09/07
- [PULL 44/64] block-copy: Use CAF to find sync=top base, Kevin Wolf, 2020/09/07
- Re: [PULL 00/64] Block layer patches, Peter Maydell, 2020/09/07