cros_generate_breakpad_symbols: Add directory exclusion list
Add new parameter to cros_generate_breakpad_symbols to exclude elf files
residing in a given directory and its subdirectories.
TEST=pass cros_generate_breakpad_symbols_unittest.py
BUG=chrome-os-partner:23671
Change-Id: Iea28dc210fd82ca26b606f8f567d546fc5645ee2
Reviewed-on: https://chromium-review.googlesource.com/175032
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
diff --git a/scripts/cros_generate_breakpad_symbols_unittest.py b/scripts/cros_generate_breakpad_symbols_unittest.py
index b9c0d66..dfc8f19 100755
--- a/scripts/cros_generate_breakpad_symbols_unittest.py
+++ b/scripts/cros_generate_breakpad_symbols_unittest.py
@@ -187,6 +187,14 @@
self.assertEquals(gen_mock.call_count, 2)
self.assertExists(dummy_file)
+ def testExclusionList(self, gen_mock):
+ """Verify files in directories of the exclusion list are excluded"""
+ exclude_dirs = ['bin', 'usr', 'fake/dir/fake']
+ with parallel_unittest.ParallelMock():
+ ret = cros_generate_breakpad_symbols.GenerateBreakpadSymbols(
+ self.board, sysroot=self.board_dir, exclude_dirs=exclude_dirs)
+ self.assertEquals(ret, 0)
+ self.assertEquals(gen_mock.call_count, 1)
class GenerateSymbolTest(cros_test_lib.MockTempDirTestCase):