Base utils for xsd mi validation and saved sessions file
[deliverable/lttng-ivc.git] / lttng_ivc / utils / project.py
index bd389a59b4fb6b7257f63757b6074390fc098dad..912612067e294766dba9285ed0e902caf1fdd8c9 100644 (file)
@@ -6,7 +6,7 @@ import logging
 import lttng_ivc.settings as Settings
 
 from lttng_ivc.utils.utils import sha256_checksum
-from lttng_ivc.utils.utils import find_dir
+from lttng_ivc.utils.utils import find_dir, find_file
 
 _logger = logging.getLogger('project')
 
@@ -339,6 +339,15 @@ class Lttng_tools(Project):
         self.add_special_env_variable("LTTNG_SESSION_CONFIG_XSD_PATH",
                 os.path.join(self.installation_path, "share/xml/lttng/"))
 
+        # Find the mi xsd
+        for xsd in Settings.mi_xsd_file_name:
+            mi = find_file(self.source_path, xsd)
+            if mi:
+                break
+        if not mi:
+            raise Exception("MI xsd not found")
+        self.mi_xsd = mi
+
 
 class Babeltrace(Project):
     pass
This page took 0.024107 seconds and 5 git commands to generate.