| OLD | NEW |
| (Empty) | |
| 1 # -*- python -*- |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 # Test startup time for loading a basic PPAPI nexe in the browser. |
| 7 |
| 8 Import('env') |
| 9 |
| 10 nexe_name = env.ProgramNameForNmf('browser_startup_time') |
| 11 stripped_nexe = env.ProgramNameForNmf('browser_startup_time_stripped') |
| 12 |
| 13 browser_startup_nexe = env.ComponentProgram( |
| 14 nexe_name, |
| 15 ['hello_world.cc'], |
| 16 EXTRA_LIBS=['ppapi_cpp']) |
| 17 |
| 18 env.Publish(nexe_name, 'run', |
| 19 ['browser_startup_time.html', |
| 20 'browser_startup_time.js']) |
| 21 |
| 22 test_name = 'browser_startup_time.out' |
| 23 output_processor_1 = ['${PYTHON}', |
| 24 str(env.File( |
| 25 '${SCONSTRUCT_DIR}/tools/process_perf_output.py')), |
| 26 test_name, |
| 27 env.GetPerfEnvDescription()] |
| 28 output_processor_c = ['${PYTHON}', |
| 29 str(env.File( |
| 30 '${SCONSTRUCT_DIR}/tools/process_perf_combined.py'))] |
| 31 |
| 32 |
| 33 node = env.PPAPIBrowserTester( |
| 34 test_name, |
| 35 url='browser_startup_time.html', |
| 36 nmf_names=['browser_startup_time'], |
| 37 files=env.ExtractPublishedFiles(nexe_name), |
| 38 # Smooth out the timing data. |
| 39 num_runs=5, |
| 40 process_output_single=output_processor_1, |
| 41 process_output_combined=output_processor_c, |
| 42 # Assume verbosity level of 1 will give us NaClLogs for sel_ldr times. |
| 43 log_verbosity=1) |
| 44 |
| 45 # TODO(jvoung): use a single test suite when either |
| 46 # (a) performance_tests are always run, or |
| 47 # (b) we have decided to just fold this test into chrome_browser_tests. |
| 48 test_suites = ['chrome_browser_tests', 'performance_tests'] |
| 49 env.AddNodeToTestSuite(node, |
| 50 test_suites, |
| 51 'run_browser_startup_time_test', |
| 52 # This test relies on NACLLOG, which must be able to |
| 53 # open a file. This won't work with the outer sandbox |
| 54 # which is enabled in some cases. |
| 55 is_broken=(env.PPAPIBrowserTesterIsBroken() or |
| 56 env.Bit('disable_dynamic_plugin_loading'))) |
| 57 |
| 58 # Also check the size of this nexe. |
| 59 node = env.FileSizeTest('browser_startup_size.out', |
| 60 browser_startup_nexe) |
| 61 env.AddNodeToTestSuite(node, |
| 62 test_suites, |
| 63 'run_browser_startup_size_test') |
| 64 |
| 65 # Check size of stripped nexe. |
| 66 browser_startup_stripped_nexe = env.StripExecutable( |
| 67 stripped_nexe, |
| 68 browser_startup_nexe) |
| 69 node = env.FileSizeTest('browser_startup_stripped_size.out', |
| 70 browser_startup_stripped_nexe) |
| 71 env.AddNodeToTestSuite(node, |
| 72 test_suites, |
| 73 'run_browser_startup_stripped_size_test') |
| OLD | NEW |