|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [PATCH v3 04/10] iotests/check: move QEMU_VXHS_PROG to common.rc |
Date: | Wed, 22 Apr 2020 08:14:20 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
21.04.2020 19:03, Kevin Wolf wrote:
Am 21.04.2020 um 09:35 hat Vladimir Sementsov-Ogievskiy geschrieben:QEMU_VXHS_PROG is used only in common.rc. So, move it to common.rc, simplifying a bit further conversion of check into python Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>This feels inconsistent when every other QEMU_*_PROG stays in check. Is QEMU_VXHS_PROG really so different?
Hmm, I was just too lazy to understand set_prog_path logic :) If you think it worth it, I'll try. +set_prog_path() +{ + p=$(command -v $1 2> /dev/null) + if [ -n "$p" -a -x "$p" ]; then + type -p "$p" + else + return 1 + fi +} Aha. It just tries to get path to the command and check that it is executable. So, in python, it probably should look like simply p = shutil.which(command) return p if os.access(p, os.X_OK) else None OK, I'll add it in next version. -- Best regards, Vladimir
[Prev in Thread] | Current Thread | [Next in Thread] |