Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1541)

Side by Side Diff: pnacl/prune_test.py

Issue 800553003: Update PNaCl to LLVM/Clang/Libcxx 223109 (nacl-change) (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Tests that a set of symbols are truly pruned from the translator. 6 """Tests that a set of symbols are truly pruned from the translator.
7 7
8 Compares the pruned down "on-device" translator with the "fat" host build 8 Compares the pruned down "on-device" translator with the "fat" host build
9 which has not been pruned down. 9 which has not been pruned down.
10 """ 10 """
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 """ 133 """
134 total = 0 134 total = 0
135 pruned_list = [ 135 pruned_list = [
136 'LLParser', 'LLLexer', 136 'LLParser', 'LLLexer',
137 'MCAsmParser', '::AsmParser', 137 'MCAsmParser', '::AsmParser',
138 'ARMAsmParser', 'X86AsmParser', 138 'ARMAsmParser', 'X86AsmParser',
139 'ELFAsmParser', 'COFFAsmParser', 'DarwinAsmParser', 139 'ELFAsmParser', 'COFFAsmParser', 'DarwinAsmParser',
140 'MCAsmLexer', '::AsmLexer', 140 'MCAsmLexer', '::AsmLexer',
141 # Gigantic Asm MatchTable (globbed for all targets), 141 # Gigantic Asm MatchTable (globbed for all targets),
142 'MatchTable', 142 'MatchTable',
143 'PBQP', 143 # Pruned out PBQP mostly, except the getCustomPBQPConstraints virtual.
144 'RegAllocPBQP', 'PBQP::RegAlloc',
144 # Can only check *InstPrinter::print*, not *::getRegisterName(): 145 # Can only check *InstPrinter::print*, not *::getRegisterName():
145 # https://code.google.com/p/nativeclient/issues/detail?id=3326 146 # https://code.google.com/p/nativeclient/issues/detail?id=3326
146 'ARMInstPrinter::print', 'X86.*InstPrinter::print', 147 'ARMInstPrinter::print', 'X86.*InstPrinter::print',
147 # Currently pruned by hacking Triple.h. That covers most things, 148 # Currently pruned by hacking Triple.h. That covers most things,
148 # but not all. E.g., container-specific relocation handling. 149 # but not all. E.g., container-specific relocation handling.
149 '.*MachObjectWriter', 'TargetLoweringObjectFileMachO', 150 '.*MachObjectWriter', 'TargetLoweringObjectFileMachO',
150 'MCMachOStreamer', '.*MCAsmInfoDarwin', 151 'MCMachOStreamer', '.*MCAsmInfoDarwin',
151 '.*COFFObjectWriter', 'TargetLoweringObjectFileCOFF', 152 '.*COFFObjectWriter', 'TargetLoweringObjectFileCOFF',
152 '.*COFFStreamer', '.*AsmInfoGNUCOFF', 153 '.*COFFStreamer', '.*AsmInfoGNUCOFF',
153 # This is not pruned out: 'MCSectionMachO', 'MCSectionCOFF', 154 # This is not pruned out: 'MCSectionMachO', 'MCSectionCOFF',
(...skipping 17 matching lines...) Expand all
171 if __name__ == '__main__': 172 if __name__ == '__main__':
172 if len(sys.argv) != 4: 173 if len(sys.argv) != 4:
173 print 'Usage: %s <nm_tool> <unpruned_host_binary> <pruned_target_binary>' 174 print 'Usage: %s <nm_tool> <unpruned_host_binary> <pruned_target_binary>'
174 sys.exit(1) 175 sys.exit(1)
175 suite = unittest.TestLoader().loadTestsFromTestCase(TestTranslatorPruned) 176 suite = unittest.TestLoader().loadTestsFromTestCase(TestTranslatorPruned)
176 result = unittest.TextTestRunner(verbosity=2).run(suite) 177 result = unittest.TextTestRunner(verbosity=2).run(suite)
177 if result.wasSuccessful(): 178 if result.wasSuccessful():
178 sys.exit(0) 179 sys.exit(0)
179 else: 180 else:
180 sys.exit(1) 181 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698