On 2/2/21 12:43 PM, Vladimir Sementsov-Ogievskiy wrote:
>> Not this patch's fault: I find the name tests/qemu-iotests/tests/name to
>> be rather long and a bit repetitive; maybe we want to rename the
>> directory structure to something simpler, like:
>>
>> tests/iotests/name
>>
>> (that is, move the named tests into a sibling directory of
>> qemu-iotests/check, rather than a subdirectory).
>
> Still, I think splitting test files from library (check, testenv,
> common.rc, etc) is a good thing.
>
> I remember someone suggested to rename qemu-iotests to just io..
>
> so we can have tests/io/tests/name
>
> or may be, what about
>
> tests/io/name
>
> and
>
> tests/io/lib/{check,testenv,common.rc,etc}
I like those.
>
>> And maybe rename
>> qemu-iotests/check to something that requires less typing. Oh, and
>> while I'm asking for rainbows and ponies, being able to run check from
>> the same directory where I run make, instead of having to change
>> directories, would be nice. But as I said, that's a wish list for a
>> separate series.
>
>
> I run check from any directory with my script:
>
> # cat /work/scripts/check
> #!/bin/bash
>
> root=$(git rev-parse --show-toplevel) || exit
>
> dir="$root/build/tests/qemu-iotests"
> check="$dir/check"
>
> test -f "$check" || { echo "Can't find '$check'. Is it a Qemu git?";
> exit 1; }
>
> cd "$dir"
> ./check $@
Useful idea, thanks. I'm not sure whether we want it in git, but I
already have local hacks (symlinks and such) so that for most of my
development, I can run 'make' and then './qemu-nbd' in the same
directory where I run 'git update', even though I actually configured
within a './build' subdirectory, and I only have to 'cd build-clang;
make' or similar when testing an alternative environment. This script
is another such hack I'd stick in my top-level directory to maintain my
personal guise of building locally.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org