Improve observability of checkForLttngTools for debugging
[lttng-ust-java-tests.git] / lttng-ust-java-tests-common / src / main / java / org / lttng / ust / agent / utils / LttngUtils.java
index 884d69c2d0fdc3a4af36010e56191d8a4dd65120..2be57f373994a667cb7afb092c7cabcba2deffa9 100644 (file)
@@ -44,6 +44,7 @@ public final class LttngUtils {
      *         was an error
      */
     public static boolean checkForLttngTools(Domain domain) {
+        System.out.println("Sanity check: start");
         try (ILttngSession session = ILttngSession.createSession(null, domain)) {
             boolean ret1 = session.enableAllEvents();
             boolean ret2 = session.start();
@@ -52,6 +53,10 @@ public final class LttngUtils {
              * "lttng view" also tests that Babeltrace is installed and working
              */
             List<String> contents = session.view();
+            if (!contents.isEmpty()) {
+                System.out.print(String.join("\n", contents));
+           }
+            System.out.println("Sanity check: end");
             return (ret1 && ret2 && ret3 && contents.isEmpty());
         }
     }
This page took 0.023596 seconds and 4 git commands to generate.