From 27099b29c9b976ee18d62f72a553f27bfa321101 Mon Sep 17 00:00:00 2001
From: Mitchel Humpherys <mitchelh@codeaurora.org>
Date: Fri, 2 May 2014 16:09:38 -0700
Subject: [PATCH] lrdp-v2: sort the parsers before running

Currently the registered parsers can be run in basically any order. It
would be slightly messy to run them in the order the user specified on
the command line, so just run them alphabetically for now.

This is needed to do regression testing on the LRDP (diff'ing output of
the same dumps with different LRDP code).

Change-Id: Ib63c9b5fecaf1170df0e9e121980fcd0e4f35623
---
 linux-ramdump-parser-v2/parser_util.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-ramdump-parser-v2/parser_util.py b/linux-ramdump-parser-v2/parser_util.py
index 040f374..786019a 100644
--- a/linux-ramdump-parser-v2/parser_util.py
+++ b/linux-ramdump-parser-v2/parser_util.py
@@ -92,7 +92,7 @@ def get_parsers():
 
     """
     parsers_dir = os.path.join(os.path.dirname(__file__), 'parsers')
-    for f in glob.glob(os.path.join(parsers_dir, '*.py')):
+    for f in sorted(glob.glob(os.path.join(parsers_dir, '*.py'))):
         modname_ext = os.path.basename(f)
         if modname_ext == '__init__.py':
             continue
-- 
GitLab