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

Unified Diff: runtime/bin/run_vm_tests.cc

Issue 11018014: Change run_vm_tests to take the VM arguments before the test name so (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/run_vm_tests.cc
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index 77485fd1cb5544dc70eb021878bc413cf45a9036..f539d312952793f021ae645e25864f4c95331ae8 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -85,8 +85,8 @@ static void DumpPprofSymbolInfo(const char* pprof_filename) {
static void PrintUsage() {
fprintf(stderr, "run_vm_tests [--list | --benchmarks | "
"--tests | --all | <test name> | <benchmark name>]\n");
- fprintf(stderr, "run_vm_tests <test name> [vm-flags ...]\n");
- fprintf(stderr, "run_vm_tests <benchmark name> [flags ...]\n");
+ fprintf(stderr, "run_vm_tests [vm-flags ...] <test name>\n");
+ fprintf(stderr, "run_vm_tests [vm-flags ...] <benchmark name>\n");
}
@@ -117,20 +117,22 @@ static int Main(int argc, const char** argv) {
run_filter = argv[1];
}
} else {
- // First argument is the test name, the rest are vm flags.
- run_filter = argv[1];
+ // Last argument is the test name, the rest are vm flags.
+ run_filter = argv[argc - 1];
const char* pprof_option = "--generate_pprof_symbols=";
int length = strlen(pprof_option);
- if (strncmp(pprof_option, argv[2], length) == 0) {
- pprof_filename = (argv[2] + length);
+ if (strncmp(pprof_option, argv[1], length) == 0) {
+ pprof_filename = (argv[1] + length);
Dart_InitPprofSupport();
- // Remove the first three values from the arguments.
+ // Remove the first two values (executable, pprof flag) from the
+ // arguments and exclude the last argument which is the test name.
dart_argc = argc - 3;
- dart_argv = &argv[3];
+ dart_argv = &argv[2];
} else {
- // Remove the first two values from the arguments.
+ // Remove the first value (executable) from the arguments and
+ // exclude the last argument which is the test name.
dart_argc = argc - 2;
- dart_argv = &argv[2];
+ dart_argv = &argv[1];
}
}
bool set_vm_flags_success = Flags::ProcessCommandLineFlags(dart_argc,
« no previous file with comments | « no previous file | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698