Add multi-session tests
[lttng-ust-java-tests.git] / src / org / lttng / ust / agent / utils / LttngSession.java
index d13e2fb53cbc5a268e6f95cbd9d5f3916f37df24..fa387fb2f3b67d724f14893e252e887460b5e933 100644 (file)
@@ -137,6 +137,14 @@ public class LttngSession implements AutoCloseable {
         return TestUtils.getOutputFromCommand(Arrays.asList("lttng", "view", sessionName));
     }
 
+    /**
+     * Utility method to destroy all existing sessions. Useful when first
+     * setting up a test to make sure no existing session interferes.
+     */
+    public static void destroyAllSessions() {
+        executeCommand(Arrays.asList("lttng", "destroy", "-a"));
+    }
+
     /**
      * Outside of the scope of lttng-tools, but this utility method can be used
      * to delete all traces currently under ~/lttng-traces/. This can be used by
This page took 0.022201 seconds and 4 git commands to generate.