Chromium Code Reviews| Index: tools/testing/dart/test_options.dart |
| diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart |
| index 2d398f2ab4034332e4159cae2986e5ee3f75b749..36b8c870fe672c5fd3f0b31e171be168fcbbd50d 100644 |
| --- a/tools/testing/dart/test_options.dart |
| +++ b/tools/testing/dart/test_options.dart |
| @@ -34,6 +34,18 @@ class _TestOptionSpecification { |
| * Parser of test options. |
| */ |
| class TestOptionsParser { |
| + String specialCommandHelp = |
| +""" |
| +Special command support. Wraps the command line in |
| +a special command. The special command should contain |
| +an '@' character which will be replaced by the normal |
| +command. |
|
Bill Hesse
2011/12/07 13:14:14
Mention about no embedded spaces in arguments here
Mads Ager (google)
2011/12/07 13:23:02
Do we have any flags at this point where that make
|
| + |
| +For example if the normal command that will be executed |
| +is 'dart file.dart' and you specify special command |
| +'python -u valgrind.py @ suffix' the final command will be |
| +'python -u valgrind.py dart file.dart suffix'"""; |
| + |
| /** |
| * Creates a test options parser initialized with the known options. |
| */ |
| @@ -85,7 +97,7 @@ class TestOptionsParser { |
| 'compact'), |
| new _TestOptionSpecification( |
| 'report', |
| - 'Print a summary report of the number of tests, by expectation.', |
| + 'Print a summary report of the number of tests, by expectation', |
| ['--report'], |
| [], |
| false, |
| @@ -110,7 +122,20 @@ class TestOptionsParser { |
| ['-v', '--verbose'], |
| [], |
| false, |
| - 'bool')]; |
| + 'bool'), |
| + new _TestOptionSpecification( |
| + 'valgrind', |
| + 'Run tests through valgrind', |
| + ['--valgrind'], |
| + [], |
| + false, |
| + 'bool'), |
| + new _TestOptionSpecification( |
| + 'special-command', |
| + specialCommandHelp, |
| + ['--special-command'], |
| + [], |
| + '')]; |
| } |
| @@ -236,6 +261,16 @@ class TestOptionsParser { |
| if (configuration['component'] == 'most') { |
| configuration['component'] = 'vm,dartc'; |
| } |
| + if (configuration['valgrind']) { |
| + // TODO(ager): Get rid of this when there is only one checkout and |
| + // we don't have to special case for the runtime checkout. |
| + File valgrindFile = new File('runtime/tools/valgrind.py'); |
| + if (!valgrindFile.existsSync()) { |
| + valgrindFile = new File('../runtime/tools/valgrind.py'); |
| + } |
| + String valgrind = valgrindFile.fullPathSync(); |
| + configuration['special-command'] = 'python -u $valgrind @'; |
| + } |
| // Use verbose progress indication for verbose output. |
| if (configuration['verbose']) { |