maruel@chromium.org | 8fb47fe | 2012-10-03 20:13:15 +0000 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # coding=utf-8 |
| 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 |
| 5 | # found in the LICENSE file. |
| 6 | |
| 7 | ### |
| 8 | # Run me to generate the documentation! |
| 9 | ### |
| 10 | |
maruel@chromium.org | a92f1e1 | 2012-11-08 17:08:20 +0000 | [diff] [blame^] | 11 | # Line too long (NN/80) |
| 12 | # pylint: disable=C0301 |
| 13 | |
maruel@chromium.org | 8fb47fe | 2012-10-03 20:13:15 +0000 | [diff] [blame] | 14 | """Test tracing and isolation infrastructure. |
| 15 | |
| 16 | Scripts are compartmentalized by their name: |
maruel@chromium.org | a92f1e1 | 2012-11-08 17:08:20 +0000 | [diff] [blame^] | 17 | - isolate_*.py: Executable isolation scripts. More information can be |
| 18 | found at |
| 19 | http://chromium.org/developers/testing/isolated-testing |
| 20 | - isolateserver_*.py: Tools to interact with the CAD server. The source code of |
| 21 | the isolate server can be found at |
| 22 | http://src.chromium.org/viewvc/chrome/trunk/tools/isolate_server/ |
| 23 | - run_*.py: Tools to run tests. |
| 24 | - swarm_*.py: Swarm interaction scripts. More information can be found |
| 25 | at |
| 26 | http://chromium.org/developers/testing/isolated-testing/swarm |
| 27 | - trace_*.py: Tracing infrastructure scripts. More information can be |
| 28 | found at |
| 29 | http://chromium.org/developers/testing/tracing-tools |
| 30 | - *_test_cases.py: Scripts specifically managing GTest executables. More |
| 31 | information about google-test can be found at |
| 32 | http://code.google.com/p/googletest/wiki/Primer |
maruel@chromium.org | 8fb47fe | 2012-10-03 20:13:15 +0000 | [diff] [blame] | 33 | |
| 34 | A few scripts have strict dependency rules: |
maruel@chromium.org | a92f1e1 | 2012-11-08 17:08:20 +0000 | [diff] [blame^] | 35 | - run_isolated.py, shard_test_cases.py and trace_inputs.py depends on no other |
| 36 | script so they can be run outside the checkout. |
| 37 | - The pure tracing scripts (trace_*.py) do not know about isolate |
| 38 | infrastructure. |
| 39 | - Scripts without '_test_cases' suffix do not know about GTest. |
| 40 | - Scripts without 'isolate_' prefix do not know about the isolation |
| 41 | infrastructure. |
maruel@chromium.org | 8fb47fe | 2012-10-03 20:13:15 +0000 | [diff] [blame] | 42 | |
| 43 | See http://dev.chromium.org/developers/testing/isolated-testing for more info. |
| 44 | """ |
| 45 | |
| 46 | import os |
| 47 | import sys |
| 48 | |
| 49 | |
| 50 | def main(): |
| 51 | for i in sorted(os.listdir(os.path.dirname(os.path.abspath(__file__)))): |
| 52 | if not i.endswith('.py') or i == 'PRESUBMIT.py': |
| 53 | continue |
| 54 | module = __import__(i[:-3]) |
| 55 | if hasattr(module, '__doc__'): |
| 56 | print module.__name__ |
| 57 | print ''.join(' %s\n' % i for i in module.__doc__.splitlines()) |
| 58 | return 0 |
| 59 | |
| 60 | |
| 61 | if __name__ == '__main__': |
| 62 | sys.exit(main()) |