| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # coding=utf-8 | 2 # coding=utf-8 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 ### | 7 ### |
| 8 # Run me to generate the documentation! | 8 # Run me to generate the documentation! |
| 9 ### | 9 ### |
| 10 | 10 |
| 11 # Line too long (NN/80) | 11 # Line too long (NN/80) |
| 12 # pylint: disable=C0301 | 12 # pylint: disable=C0301 |
| 13 | 13 |
| 14 """Test tracing and isolation infrastructure. | 14 """Test tracing and isolation infrastructure. |
| 15 | 15 |
| 16 Scripts are compartmentalized by their name: | 16 See googletest/*.py for scripts specifically managing GTest executables. More |
| 17 - isolate_*.py: Executable isolation scripts. See: | 17 information about googletest can be found at |
| 18 https://code.google.com/p/swarming/wiki/IsolateDesign | 18 http://code.google.com/p/googletest/wiki/Primer |
| 19 https://code.google.com/p/swarming/wiki/IsolateUserGuide | |
| 20 - isolateserver_*.py: Tools to interact with the CAD server. | |
| 21 - run_*.py: Tools to run tests. | |
| 22 - swarm_*.py: Swarm interaction scripts. See | |
| 23 https://code.google.com/p/swarming/wiki/SwarmingDesign | |
| 24 https://code.google.com/p/swarming/wiki/SwarmingUserGuide | |
| 25 - trace_*.py: Tracing infrastructure scripts. See | |
| 26 https://code.google.com/p/swarming/wiki/TracingToolsDesign | |
| 27 https://code.google.com/p/swarming/wiki/TracingToolsUserGu
ide | |
| 28 - googletest/*.py: Scripts specifically managing GTest executables. More | |
| 29 information about googletest can be found at | |
| 30 http://code.google.com/p/googletest/wiki/Primer | |
| 31 | 19 |
| 32 A few scripts have strict dependency rules: | 20 A few scripts have strict dependency rules: |
| 33 - run_isolated.py and trace_inputs.py depends on no other script so they can be | |
| 34 run outside the checkout. | |
| 35 - The pure tracing scripts (trace_*.py) do not know about isolate | 21 - The pure tracing scripts (trace_*.py) do not know about isolate |
| 36 infrastructure. | 22 infrastructure. |
| 37 - Scripts without '_test_cases' suffix do not know about GTest. | 23 - Scripts outside googletest/ do not know about GTest. |
| 38 - Scripts without 'isolate_' prefix do not know about the isolation | |
| 39 infrastructure. | |
| 40 """ | 24 """ |
| 41 | 25 |
| 42 import os | 26 import os |
| 43 import sys | 27 import sys |
| 44 | 28 |
| 45 | 29 |
| 46 def main(): | 30 def main(): |
| 47 for i in sorted(os.listdir(os.path.dirname(os.path.abspath(__file__)))): | 31 for i in sorted(os.listdir(os.path.dirname(os.path.abspath(__file__)))): |
| 48 if not i.endswith('.py') or i == 'PRESUBMIT.py': | 32 if not i.endswith('.py') or i == 'PRESUBMIT.py': |
| 49 continue | 33 continue |
| 50 module = __import__(i[:-3]) | 34 module = __import__(i[:-3]) |
| 51 if hasattr(module, '__doc__'): | 35 if hasattr(module, '__doc__'): |
| 52 print module.__name__ | 36 print module.__name__ |
| 53 print ''.join(' %s\n' % i for i in module.__doc__.splitlines()) | 37 print ''.join(' %s\n' % i for i in module.__doc__.splitlines()) |
| 54 return 0 | 38 return 0 |
| 55 | 39 |
| 56 | 40 |
| 57 if __name__ == '__main__': | 41 if __name__ == '__main__': |
| 58 sys.exit(main()) | 42 sys.exit(main()) |
| OLD | NEW |