From cd523b6fadfa9e6a0d2f1d58e3b263640d1334e4 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Wed, 7 Aug 2024 10:47:40 +0200 Subject: [PATCH] test: Skip unused source scanning on examples directories with no CMakeLists.txt --- utils/tests/test-ns3.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/tests/test-ns3.py b/utils/tests/test-ns3.py index ceaf3e7e8..3bbf73873 100755 --- a/utils/tests/test-ns3.py +++ b/utils/tests/test-ns3.py @@ -294,6 +294,10 @@ class NS3UnusedSourcesTestCase(unittest.TestCase): if os.sep + "examples" not in example_directory: continue + # Skip directories without a CMakeLists.txt + if not os.path.exists(os.path.join(example_directory, "CMakeLists.txt")): + continue + # Open the examples CMakeLists.txt and read it with open( os.path.join(example_directory, "CMakeLists.txt"), "r", encoding="utf-8"