From ee39b19291cc0970fe1170deeafa7f0602c5352d Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 22 Apr 2016 20:59:02 -0400 Subject: [PATCH] cli: add --test-compatibility option to check the trace only 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 --- lttnganalyses/cli/command.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lttnganalyses/cli/command.py b/lttnganalyses/cli/command.py index 602d7dd..5128d41 100644 --- a/lttnganalyses/cli/command.py +++ b/lttnganalyses/cli/command.py @@ -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='', help='trace path', nargs='*') ap.add_argument('--output-progress', action='store_true', -- 2.34.1