[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/38] tests/functional: simplify 'which' implementation
From: |
Thomas Huth |
Subject: |
[PULL 05/38] tests/functional: simplify 'which' implementation |
Date: |
Wed, 18 Dec 2024 12:09:25 +0100 |
From: Daniel P. Berrangé <berrange@redhat.com>
The 'access' check implies the file exists.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20241217155953.3950506-6-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/functional/qemu_test/cmd.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/functional/qemu_test/cmd.py
b/tests/functional/qemu_test/cmd.py
index 4106f1ee7c..600e0509db 100644
--- a/tests/functional/qemu_test/cmd.py
+++ b/tests/functional/qemu_test/cmd.py
@@ -25,7 +25,7 @@ def which(tool):
paths=os.getenv('PATH')
for p in paths.split(os.path.pathsep):
p = os.path.join(p, tool)
- if os.path.exists(p) and os.access(p, os.X_OK):
+ if os.access(p, os.X_OK):
return p
return None
--
2.47.1
- [PULL 00/38] Functional test improvements, and disallow libnfs v6, Thomas Huth, 2024/12/18
- [PULL 01/38] tests/functional: add execute permission to aspeed tests, Thomas Huth, 2024/12/18
- [PULL 02/38] tests/functional: remove many unused imports, Thomas Huth, 2024/12/18
- [PULL 03/38] tests/functional: resolve str(Asset) to cache file path, Thomas Huth, 2024/12/18
- [PULL 05/38] tests/functional: simplify 'which' implementation,
Thomas Huth <=
- [PULL 04/38] tests/functional: remove duplicated 'which' function impl, Thomas Huth, 2024/12/18
- [PULL 06/38] tests/functional: drop 'tesseract_available' helper, Thomas Huth, 2024/12/18
- [PULL 07/38] tests/functional: introduce some helpful decorators, Thomas Huth, 2024/12/18
- [PULL 08/38] tests/functional: switch to new test skip decorators, Thomas Huth, 2024/12/18
- [PULL 10/38] tests/functional: add helpers for building file paths, Thomas Huth, 2024/12/18
- [PULL 09/38] tests/functional: drop 'has_cmd' and 'has_cmds' helpers, Thomas Huth, 2024/12/18
- [PULL 11/38] tests/functional: switch over to using self.log_file(...), Thomas Huth, 2024/12/18
- [PULL 12/38] tests/functional: switch over to using self.build_file(...), Thomas Huth, 2024/12/18
- [PULL 13/38] tests/functional: switch over to using self.data_file(...), Thomas Huth, 2024/12/18
- [PULL 15/38] tests/functional: remove redundant 'rmtree' call, Thomas Huth, 2024/12/18