diff options
author | NĂcolas F. R. A. Prado <nfraprado@collabora.com> | 2024-07-06 02:29:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-12 11:59:06 +0300 |
commit | 0e7b7bde460304f44e8c6b212c3195ac2f69f6fe (patch) | |
tree | a2d7091b0715a54e5560e893c8c5d63b482ac9ff /tools/testing | |
parent | 0debb20c5c812f8750c20c3406bc94a1e8ea4742 (diff) | |
download | linux-0e7b7bde460304f44e8c6b212c3195ac2f69f6fe.tar.xz |
kselftest: Move ksft helper module to common directory
Move the ksft python module, which provides generic helpers for
kselftests, to a common directory so it can be more easily shared
between different tests.
Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240705-dev-err-log-selftest-v2-2-163b9cd7b3c1@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/Makefile | 1 | ||||
-rw-r--r-- | tools/testing/selftests/devices/probe/Makefile | 2 | ||||
-rwxr-xr-x | tools/testing/selftests/devices/probe/test_discoverable_devices.py | 7 | ||||
-rw-r--r-- | tools/testing/selftests/kselftest/ksft.py (renamed from tools/testing/selftests/devices/probe/ksft.py) | 0 |
4 files changed, 8 insertions, 2 deletions
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 37214201d974..7bd78b9f5cdd 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -251,6 +251,7 @@ ifdef INSTALL_PATH install -m 744 kselftest/runner.sh $(INSTALL_PATH)/kselftest/ install -m 744 kselftest/prefix.pl $(INSTALL_PATH)/kselftest/ install -m 744 kselftest/ktap_helpers.sh $(INSTALL_PATH)/kselftest/ + install -m 744 kselftest/ksft.py $(INSTALL_PATH)/kselftest/ install -m 744 run_kselftest.sh $(INSTALL_PATH)/ rm -f $(TEST_LIST) @ret=1; \ diff --git a/tools/testing/selftests/devices/probe/Makefile b/tools/testing/selftests/devices/probe/Makefile index 7a6eaa031cfe..f630108c3fdf 100644 --- a/tools/testing/selftests/devices/probe/Makefile +++ b/tools/testing/selftests/devices/probe/Makefile @@ -1,4 +1,4 @@ TEST_PROGS := test_discoverable_devices.py -TEST_FILES := boards ksft.py +TEST_FILES := boards include ../../lib.mk diff --git a/tools/testing/selftests/devices/probe/test_discoverable_devices.py b/tools/testing/selftests/devices/probe/test_discoverable_devices.py index 8f2200540a1f..d94a74b8a054 100755 --- a/tools/testing/selftests/devices/probe/test_discoverable_devices.py +++ b/tools/testing/selftests/devices/probe/test_discoverable_devices.py @@ -16,12 +16,17 @@ import argparse import glob -import ksft import os import re import sys import yaml +# Allow ksft module to be imported from different directory +this_dir = os.path.dirname(os.path.realpath(__file__)) +sys.path.append(os.path.join(this_dir, "../../kselftest/")) + +import ksft + pci_controllers = [] usb_controllers = [] diff --git a/tools/testing/selftests/devices/probe/ksft.py b/tools/testing/selftests/kselftest/ksft.py index cd89fb2bc10e..cd89fb2bc10e 100644 --- a/tools/testing/selftests/devices/probe/ksft.py +++ b/tools/testing/selftests/kselftest/ksft.py |