Introduce test_ust_python_agent_vs_tools.py
[deliverable/lttng-ivc.git] / lttng_ivc / utils / utils.py
index 9bc9d8c8a47515b6488c382ec12eaed88dacf275..c174b44e192b17d5b45fff99fe43638adf15bf8d 100644 (file)
@@ -68,3 +68,16 @@ def file_contains(stderr_file, list_of_string):
             for s in list_of_string:
                 if s in line:
                     return True
+
+
+def find_dir(root, name):
+    """
+    Returns the absolute path or None.
+    """
+    abs_path = None
+    for base, dirs, files in os.walk(root):
+        for tmp in dirs:
+            print(tmp)
+            if tmp.endswith(name):
+                abs_path = os.path.abspath(os.path.join(base, tmp))
+    return abs_path
This page took 0.023212 seconds and 5 git commands to generate.