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

Side by Side Diff: test/cctest/cctest.cc

Issue 1369343002: [cctest] adding --help option to output basic information about cctest (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: extending help comment Created 5 years, 2 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 | « no previous file | tools/run-tests.py » ('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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE); 166 _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
167 _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); 167 _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
168 _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE); 168 _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
169 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); 169 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
170 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE); 170 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
171 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); 171 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
172 _set_error_mode(_OUT_TO_STDERR); 172 _set_error_mode(_OUT_TO_STDERR);
173 #endif // V8_CC_MSVC 173 #endif // V8_CC_MSVC
174 #endif // V8_OS_WIN 174 #endif // V8_OS_WIN
175 175
176 // hack to print cctest specific flags
177 for (int i = 1; i < argc; i++) {
178 char* arg = argv[i];
179 if ((strcmp(arg, "--help") == 0) || (strcmp(arg, "-h") == 0)) {
180 printf("Usage: %s [--list] [[V8_FLAGS] CCTEST]\n", argv[0]);
181 printf("\n");
182 printf("Options:\n");
183 printf(" --list: list all cctests\n");
184 printf(" CCTEST: cctest identfier returned by --list\n");
185 printf(" D8_FLAGS: see d8 output below\n");
186 printf("\n\n");
187 }
188 }
189
176 v8::V8::InitializeICU(); 190 v8::V8::InitializeICU();
177 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); 191 v8::Platform* platform = v8::platform::CreateDefaultPlatform();
178 v8::V8::InitializePlatform(platform); 192 v8::V8::InitializePlatform(platform);
179 v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true); 193 v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
180 v8::V8::Initialize(); 194 v8::V8::Initialize();
181 v8::V8::InitializeExternalStartupData(argv[0]); 195 v8::V8::InitializeExternalStartupData(argv[0]);
182 196
183 CcTestArrayBufferAllocator array_buffer_allocator; 197 CcTestArrayBufferAllocator array_buffer_allocator;
184 CcTest::set_array_buffer_allocator(&array_buffer_allocator); 198 CcTest::set_array_buffer_allocator(&array_buffer_allocator);
185 199
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 CcTest::TearDown(); 254 CcTest::TearDown();
241 // TODO(svenpanne) See comment above. 255 // TODO(svenpanne) See comment above.
242 // if (!disable_automatic_dispose_) v8::V8::Dispose(); 256 // if (!disable_automatic_dispose_) v8::V8::Dispose();
243 v8::V8::ShutdownPlatform(); 257 v8::V8::ShutdownPlatform();
244 delete platform; 258 delete platform;
245 return 0; 259 return 0;
246 } 260 }
247 261
248 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; 262 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL;
249 int RegisterThreadedTest::count_ = 0; 263 int RegisterThreadedTest::count_ = 0;
OLDNEW
« no previous file with comments | « no previous file | tools/run-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698