| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # Test startup time for loading a basic PPAPI nexe in the browser. | 6 # Test startup time for loading a basic PPAPI nexe in the browser. |
| 7 | 7 |
| 8 Import('env') | 8 Import('env') |
| 9 | 9 |
| 10 # Pull in the ppapi_test_example as a "barebones" PPAPI startup example. | 10 # Pull in the ppapi_test_example as a "barebones" PPAPI startup example. |
| 11 # Hope it does not change to do more than just the barebones. | 11 # Hope it does not change to do more than just the barebones. |
| 12 # We must make a separate build though, to get a different nexe "key" | 12 # We must make a separate build though, to get a different nexe "key" |
| 13 # for the env.Publish() / env.ExtractPublishedFiles() magic. | 13 # for the env.Publish() / env.ExtractPublishedFiles() magic. |
| 14 nexe_name = 'browser_startup_time_${TARGET_FULLARCH}' | 14 nexe_name = 'browser_startup_time_${TARGET_FULLARCH}' |
| 15 stripped_nexe = ('browser_startup_time_stripped_%s.nexe' % | 15 stripped_nexe = ('browser_startup_time_stripped_%s.nexe' % |
| 16 env.get('TARGET_FULLARCH')) | 16 env.get('TARGET_FULLARCH')) |
| 17 | 17 |
| 18 browser_startup_nexe = env.ComponentProgram( | 18 browser_startup_nexe = env.ComponentProgram( |
| 19 nexe_name, | 19 nexe_name, |
| 20 ['hello_world.cc'], | 20 ['hello_world.cc'], |
| 21 EXTRA_LIBS=['${PPAPI_LIBS}', 'ppapi_cpp']) | 21 EXTRA_LIBS=['${PPAPI_LIBS}', 'ppapi_cpp']) |
| 22 | 22 |
| 23 env.Publish(nexe_name, 'run', | 23 env.Publish(nexe_name, 'run', |
| 24 ['browser_startup_time.html', | 24 ['browser_startup_time.html', |
| 25 'browser_startup_time.nmf', | |
| 26 'browser_startup_time.js']) | 25 'browser_startup_time.js']) |
| 27 | 26 |
| 28 test_name = 'browser_startup_time.out' | 27 test_name = 'browser_startup_time.out' |
| 29 output_processor = ['${PYTHON}', | 28 output_processor = ['${PYTHON}', |
| 30 str(env.File( | 29 str(env.File( |
| 31 '${SCONSTRUCT_DIR}/tools/process_perf_output.py')), | 30 '${SCONSTRUCT_DIR}/tools/process_perf_output.py')), |
| 32 test_name, | 31 test_name, |
| 33 env.GetPerfEnvDescription()] | 32 env.GetPerfEnvDescription()] |
| 34 | 33 |
| 35 node = env.PPAPIBrowserTester( | 34 node = env.PPAPIBrowserTester( |
| 36 test_name, | 35 test_name, |
| 37 url='browser_startup_time.html', | 36 url='browser_startup_time.html', |
| 37 nmfs=['browser_startup_time.nmf'], |
| 38 files=env.ExtractPublishedFiles(nexe_name), | 38 files=env.ExtractPublishedFiles(nexe_name), |
| 39 args=['--enable_experimental_js'], | 39 args=['--enable_experimental_js'], |
| 40 process_output=output_processor, | 40 process_output=output_processor, |
| 41 # Assume verbosity level of 1 will give us NaClLogs for sel_ldr times. | 41 # Assume verbosity level of 1 will give us NaClLogs for sel_ldr times. |
| 42 log_verbosity=1) | 42 log_verbosity=1) |
| 43 | 43 |
| 44 # TODO(jvoung): use a single test suite when either | 44 # TODO(jvoung): use a single test suite when either |
| 45 # (a) performance_tests are always run, or | 45 # (a) performance_tests are always run, or |
| 46 # (b) we have decided to just fold this test into chrome_browser_tests. | 46 # (b) we have decided to just fold this test into chrome_browser_tests. |
| 47 test_suites = ['chrome_browser_tests', 'performance_tests'] | 47 test_suites = ['chrome_browser_tests', 'performance_tests'] |
| (...skipping 15 matching lines...) Expand all Loading... |
| 63 | 63 |
| 64 # Check size of stripped nexe. | 64 # Check size of stripped nexe. |
| 65 browser_startup_stripped_nexe = env.StripExecutable( | 65 browser_startup_stripped_nexe = env.StripExecutable( |
| 66 stripped_nexe, | 66 stripped_nexe, |
| 67 browser_startup_nexe) | 67 browser_startup_nexe) |
| 68 node = env.FileSizeTest('browser_startup_stripped_size.out', | 68 node = env.FileSizeTest('browser_startup_stripped_size.out', |
| 69 browser_startup_stripped_nexe) | 69 browser_startup_stripped_nexe) |
| 70 env.AddNodeToTestSuite(node, | 70 env.AddNodeToTestSuite(node, |
| 71 test_suites, | 71 test_suites, |
| 72 'run_browser_startup_stripped_size_test') | 72 'run_browser_startup_stripped_size_test') |
| OLD | NEW |