OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <cstring> | 5 #include <cstring> |
6 #include <fstream> | 6 #include <fstream> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "test/cctest/interpreter/bytecode-expectations-printer.h" | 9 #include "test/cctest/interpreter/bytecode-expectations-printer.h" |
10 | 10 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 options.do_expressions_ = true; | 219 options.do_expressions_ = true; |
220 } else if (strcmp(argv[i], "--verbose") == 0) { | 220 } else if (strcmp(argv[i], "--verbose") == 0) { |
221 options.verbose_ = true; | 221 options.verbose_ = true; |
222 } else if (strncmp(argv[i], "--output=", 9) == 0) { | 222 } else if (strncmp(argv[i], "--output=", 9) == 0) { |
223 options.output_filename_ = argv[i] + 9; | 223 options.output_filename_ = argv[i] + 9; |
224 } else if (strncmp(argv[i], "--test-function-name=", 21) == 0) { | 224 } else if (strncmp(argv[i], "--test-function-name=", 21) == 0) { |
225 options.test_function_name_ = argv[i] + 21; | 225 options.test_function_name_ = argv[i] + 21; |
226 } else if (strncmp(argv[i], "--", 2) != 0) { // It doesn't start with -- | 226 } else if (strncmp(argv[i], "--", 2) != 0) { // It doesn't start with -- |
227 options.input_filenames_.push_back(argv[i]); | 227 options.input_filenames_.push_back(argv[i]); |
228 } else { | 228 } else { |
229 REPORT_ERROR("Unknonwn option " << argv[i]); | 229 REPORT_ERROR("Unknown option " << argv[i]); |
230 options.parsing_failed_ = true; | 230 options.parsing_failed_ = true; |
231 break; | 231 break; |
232 } | 232 } |
233 } | 233 } |
234 | 234 |
235 if (options.rebaseline_ && options.input_filenames_.empty()) { | 235 if (options.rebaseline_ && options.input_filenames_.empty()) { |
236 #ifdef V8_OS_POSIX | 236 #ifdef V8_OS_POSIX |
237 if (options.verbose_) { | 237 if (options.verbose_) { |
238 std::cout << "Looking for golden files in " << kGoldenFilesPath << '\n'; | 238 std::cout << "Looking for golden files in " << kGoldenFilesPath << '\n'; |
239 } | 239 } |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 } | 576 } |
577 } | 577 } |
578 | 578 |
579 if (!options.rebaseline()) { | 579 if (!options.rebaseline()) { |
580 if (!WriteExpectationsFile(snippet_list, platform, options, | 580 if (!WriteExpectationsFile(snippet_list, platform, options, |
581 options.output_filename())) { | 581 options.output_filename())) { |
582 return 3; | 582 return 3; |
583 } | 583 } |
584 } | 584 } |
585 } | 585 } |
OLD | NEW |