cli: add --test-compatibility option to check the trace only
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 23 Apr 2016 00:59:02 +0000 (20:59 -0400)
committerAntoine Busque <abusque@efficios.com>
Tue, 26 Apr 2016 17:10:00 +0000 (13:10 -0400)
This is a "dry-run" option to check if the trace could be analyzed,
without actually analyzing it.

This option is specified by LAMI 1.0.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
lttnganalyses/cli/command.py

index 602d7dd722d5baa05e184b4897dadc530925d72f..5128d411db6ce015c40106c8366664b0fdd00f14 100644 (file)
@@ -67,7 +67,10 @@ class Command:
             self._parse_args()
             self._open_trace()
             self._create_analysis()
-            self._run_analysis()
+
+            if self._mi_mode and not self._args.test_compatibility:
+                self._run_analysis()
+
             self._close_trace()
         except KeyboardInterrupt:
             sys.exit(0)
@@ -460,6 +463,8 @@ class Command:
                             help='Print MI version')
             ap.add_argument('--metadata', action='store_true',
                             help='Print analysis\' metadata')
+            ap.add_argument('--test-compatibility', action='store_true',
+                            help='Check if the provided trace is supported and exit')
             ap.add_argument('path', metavar='<path/to/trace>',
                             help='trace path', nargs='*')
             ap.add_argument('--output-progress', action='store_true',
This page took 0.026283 seconds and 5 git commands to generate.