[PATCH i-g-t] scripts/test_list: Don't log missing testlist

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu Sep 19 08:16:03 UTC 2024


When tests are compiled conditionally and compilation flag is set
to false they have no binaries in the build directory. As testlist
is built from .c source file list, unnecessary warnings about missing
.testlist files are produced.

Avoid this warnings by skipping processing testlists for which binaries
weren't produced.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
Cc: Katarzyna Piecielska <katarzyna.piecielska at intel.com>
Cc: Christoph Manszewski <christoph.manszewski at intel.com>
---
 scripts/test_list.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/test_list.py b/scripts/test_list.py
index d050687fe1..40b6b7829b 100644
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -1127,8 +1127,13 @@ class TestList:
 
         """ Return a list of tests as reported by --list-subtests """
         tests = []
+        no_binaries = self.get_not_compiled()
         for name in self.filenames:
-            testlist = re.sub(r"\.c$", ".testlist", name.split('/')[-1])
+            binary = re.sub(r"\.c$", "", name.split('/')[-1])
+            if binary in no_binaries:
+                continue
+
+            testlist = binary + ".testlist"
             fname = os.path.join(self.igt_build_path, "tests", testlist)
 
             if not os.path.isfile(fname):
-- 
2.34.1



More information about the igt-dev mailing list