OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 assertEquals('string', typeof TEST_FILE_NAME); | 372 assertEquals('string', typeof TEST_FILE_NAME); |
373 var pathLen = TEST_FILE_NAME.lastIndexOf('/'); | 373 var pathLen = TEST_FILE_NAME.lastIndexOf('/'); |
374 if (pathLen == -1) { | 374 if (pathLen == -1) { |
375 pathLen = TEST_FILE_NAME.lastIndexOf('\\'); | 375 pathLen = TEST_FILE_NAME.lastIndexOf('\\'); |
376 } | 376 } |
377 assertTrue(pathLen != -1); | 377 assertTrue(pathLen != -1); |
378 var testsPath = TEST_FILE_NAME.substr(0, pathLen + 1); | 378 var testsPath = TEST_FILE_NAME.substr(0, pathLen + 1); |
379 var tp = new TickProcessor( | 379 var tp = new TickProcessor( |
380 new CppEntriesProviderMock(), separateIc, ignoreUnknown, stateFilter); | 380 new CppEntriesProviderMock(), separateIc, ignoreUnknown, stateFilter); |
381 var pm = new PrintMonitor(testsPath + refOutput); | 381 var pm = new PrintMonitor(testsPath + refOutput); |
382 tp.processLogFile(testsPath + logInput); | 382 tp.processLogFileInTest(testsPath + logInput); |
383 // Hack file name to avoid dealing with platform specifics. | |
384 tp.lastLogFileName_ = 'v8.log'; | |
385 tp.printStatistics(); | 383 tp.printStatistics(); |
386 pm.finish(); | 384 pm.finish(); |
387 }; | 385 }; |
388 | 386 |
389 | 387 |
390 (function testProcessing() { | 388 (function testProcessing() { |
391 var testData = { | 389 var testData = { |
392 'Default': [ | 390 'Default': [ |
393 false, false, null, | 391 false, false, null, |
394 'tickprocessor-test.log', 'tickprocessor-test.default'], | 392 'tickprocessor-test.log', 'tickprocessor-test.default'], |
395 'SeparateIc': [ | 393 'SeparateIc': [ |
396 true, false, null, | 394 true, false, null, |
397 'tickprocessor-test.log', 'tickprocessor-test.separate-ic'], | 395 'tickprocessor-test.log', 'tickprocessor-test.separate-ic'], |
398 'IgnoreUnknown': [ | 396 'IgnoreUnknown': [ |
399 false, true, null, | 397 false, true, null, |
400 'tickprocessor-test.log', 'tickprocessor-test.ignore-unknown'], | 398 'tickprocessor-test.log', 'tickprocessor-test.ignore-unknown'], |
401 'GcState': [ | 399 'GcState': [ |
402 false, false, TickProcessor.VmStates.GC, | 400 false, false, TickProcessor.VmStates.GC, |
403 'tickprocessor-test.log', 'tickprocessor-test.gc-state'], | 401 'tickprocessor-test.log', 'tickprocessor-test.gc-state'], |
404 'FunctionInfo': [ | 402 'FunctionInfo': [ |
405 false, false, null, | 403 false, false, null, |
406 'tickprocessor-test-func-info.log', 'tickprocessor-test.func-info'] | 404 'tickprocessor-test-func-info.log', 'tickprocessor-test.func-info'] |
407 }; | 405 }; |
408 for (var testName in testData) { | 406 for (var testName in testData) { |
409 print('=== testProcessing-' + testName + ' ==='); | 407 print('=== testProcessing-' + testName + ' ==='); |
410 driveTickProcessorTest.apply(null, testData[testName]); | 408 driveTickProcessorTest.apply(null, testData[testName]); |
411 } | 409 } |
412 })(); | 410 })(); |
OLD | NEW |