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

Side by Side Diff: runtime/bin/run_vm_tests.cc

Issue 1311963002: Add argument to Dart_Initialize for precompiled instructions. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/include/dart_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "bin/file.h" 7 #include "bin/file.h"
8 8
9 #include "vm/benchmark_test.h" 9 #include "vm/benchmark_test.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 run_filter = argv[argc - 1]; 95 run_filter = argv[argc - 1];
96 // Remove the first value (executable) from the arguments and 96 // Remove the first value (executable) from the arguments and
97 // exclude the last argument which is the test name. 97 // exclude the last argument which is the test name.
98 dart_argc = argc - 2; 98 dart_argc = argc - 2;
99 dart_argv = &argv[1]; 99 dart_argv = &argv[1];
100 } 100 }
101 bool set_vm_flags_success = Flags::ProcessCommandLineFlags(dart_argc, 101 bool set_vm_flags_success = Flags::ProcessCommandLineFlags(dart_argc,
102 dart_argv); 102 dart_argv);
103 ASSERT(set_vm_flags_success); 103 ASSERT(set_vm_flags_success);
104 const char* err_msg = Dart::InitOnce(dart::bin::vm_isolate_snapshot_buffer, 104 const char* err_msg = Dart::InitOnce(dart::bin::vm_isolate_snapshot_buffer,
105 NULL,
105 NULL, NULL, NULL, NULL, 106 NULL, NULL, NULL, NULL,
106 dart::bin::DartUtils::OpenFile, 107 dart::bin::DartUtils::OpenFile,
107 dart::bin::DartUtils::ReadFile, 108 dart::bin::DartUtils::ReadFile,
108 dart::bin::DartUtils::WriteFile, 109 dart::bin::DartUtils::WriteFile,
109 dart::bin::DartUtils::CloseFile, 110 dart::bin::DartUtils::CloseFile,
110 NULL); 111 NULL);
111 ASSERT(err_msg == NULL); 112 ASSERT(err_msg == NULL);
112 // Apply the filter to all registered tests. 113 // Apply the filter to all registered tests.
113 TestCaseBase::RunAll(); 114 TestCaseBase::RunAll();
114 // Apply the filter to all registered benchmarks. 115 // Apply the filter to all registered benchmarks.
115 Benchmark::RunAll(argv[0]); 116 Benchmark::RunAll(argv[0]);
116 // Print a warning message if no tests or benchmarks were matched. 117 // Print a warning message if no tests or benchmarks were matched.
117 if (run_matches == 0) { 118 if (run_matches == 0) {
118 fprintf(stderr, "No tests matched: %s\n", run_filter); 119 fprintf(stderr, "No tests matched: %s\n", run_filter);
119 return 1; 120 return 1;
120 } 121 }
121 return 0; 122 return 0;
122 } 123 }
123 124
124 } // namespace dart 125 } // namespace dart
125 126
126 127
127 int main(int argc, const char** argv) { 128 int main(int argc, const char** argv) {
128 return dart::Main(argc, argv); 129 return dart::Main(argc, argv);
129 } 130 }
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698