| OLD | NEW |
| 1 #! -*- python -*- | 1 #! -*- python -*- |
| 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 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 import atexit | 6 import atexit |
| 7 import glob | 7 import glob |
| 8 import os | 8 import os |
| 9 import platform | 9 import platform |
| 10 import shutil | 10 import shutil |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1589 'use --flag=value instead') | 1589 'use --flag=value instead') |
| 1590 command.extend(['--browser_flag', flag]) | 1590 command.extend(['--browser_flag', flag]) |
| 1591 for key, value in test_args: | 1591 for key, value in test_args: |
| 1592 command.extend(['--test_arg', str(key), str(value)]) | 1592 command.extend(['--test_arg', str(key), str(value)]) |
| 1593 | 1593 |
| 1594 # Set a given file to be the nexe's stdin. | 1594 # Set a given file to be the nexe's stdin. |
| 1595 if nacl_exe_stdin is not None: | 1595 if nacl_exe_stdin is not None: |
| 1596 command.extend(['--nacl_exe_stdin', env.subst(nacl_exe_stdin['file'])]) | 1596 command.extend(['--nacl_exe_stdin', env.subst(nacl_exe_stdin['file'])]) |
| 1597 | 1597 |
| 1598 post_actions = [] | 1598 post_actions = [] |
| 1599 side_effects = [] |
| 1599 # Set a given file to be the nexe's stdout or stderr. The tester also | 1600 # Set a given file to be the nexe's stdout or stderr. The tester also |
| 1600 # compares this output against a golden file. | 1601 # compares this output against a golden file. |
| 1601 for stream, params in ( | 1602 for stream, params in ( |
| 1602 ('stdout', nacl_exe_stdout), | 1603 ('stdout', nacl_exe_stdout), |
| 1603 ('stderr', nacl_exe_stderr)): | 1604 ('stderr', nacl_exe_stderr)): |
| 1604 if params is None: | 1605 if params is None: |
| 1605 continue | 1606 continue |
| 1606 stream_file = env.subst(params['file']) | 1607 stream_file = env.subst(params['file']) |
| 1608 side_effects.append(stream_file) |
| 1607 command.extend(['--nacl_exe_' + stream, stream_file]) | 1609 command.extend(['--nacl_exe_' + stream, stream_file]) |
| 1608 golden_file = env.subst(params['golden']) | 1610 if 'golden' in params: |
| 1609 filter_regex = params.get('filter_regex', None) | 1611 golden_file = env.subst(params['golden']) |
| 1610 filter_inverse = params.get('filter_inverse', False) | 1612 filter_regex = params.get('filter_regex', None) |
| 1611 filter_group_only = params.get('filter_group_only', False) | 1613 filter_inverse = params.get('filter_inverse', False) |
| 1612 post_actions.append( | 1614 filter_group_only = params.get('filter_group_only', False) |
| 1613 GoldenFileCheckAction( | 1615 post_actions.append( |
| 1614 env, stream_file, golden_file, | 1616 GoldenFileCheckAction( |
| 1615 filter_regex, filter_inverse, filter_group_only)) | 1617 env, stream_file, golden_file, |
| 1618 filter_regex, filter_inverse, filter_group_only)) |
| 1616 | 1619 |
| 1617 if ShouldUseVerboseOptions(extra): | 1620 if ShouldUseVerboseOptions(extra): |
| 1618 env.MakeVerboseExtraOptions(target, log_verbosity, extra) | 1621 env.MakeVerboseExtraOptions(target, log_verbosity, extra) |
| 1619 # Heuristic for when to capture output... | 1622 # Heuristic for when to capture output... |
| 1620 capture_output = (extra.pop('capture_output', False) | 1623 capture_output = (extra.pop('capture_output', False) |
| 1621 or 'process_output_single' in extra) | 1624 or 'process_output_single' in extra) |
| 1622 node = env.CommandTest(target, | 1625 node = env.CommandTest(target, |
| 1623 command, | 1626 command, |
| 1624 # Set to 'huge' so that the browser tester's timeout | 1627 # Set to 'huge' so that the browser tester's timeout |
| 1625 # takes precedence over the default of the test_suite. | 1628 # takes precedence over the default of the test_suite. |
| 1626 size='huge', | 1629 size='huge', |
| 1627 capture_output=capture_output, | 1630 capture_output=capture_output, |
| 1628 **extra) | 1631 **extra) |
| 1632 for side_effect in side_effects: |
| 1633 env.SideEffect(side_effect, node) |
| 1629 # We can't check output if the test is not run. | 1634 # We can't check output if the test is not run. |
| 1630 if not env.Bit('do_not_run_tests'): | 1635 if not env.Bit('do_not_run_tests'): |
| 1631 for action in post_actions: | 1636 for action in post_actions: |
| 1632 env.AddPostAction(node, action) | 1637 env.AddPostAction(node, action) |
| 1633 return node | 1638 return node |
| 1634 | 1639 |
| 1635 pre_base_env.AddMethod(PPAPIBrowserTester) | 1640 pre_base_env.AddMethod(PPAPIBrowserTester) |
| 1636 | 1641 |
| 1637 | 1642 |
| 1638 # Disabled for ARM because Chrome binaries for ARM are not available. | 1643 # Disabled for ARM because Chrome binaries for ARM are not available. |
| (...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3132 'src/shared/ppapi/nacl.scons', | 3137 'src/shared/ppapi/nacl.scons', |
| 3133 'src/shared/ppapi_proxy/nacl.scons', | 3138 'src/shared/ppapi_proxy/nacl.scons', |
| 3134 ]) | 3139 ]) |
| 3135 | 3140 |
| 3136 nacl_env.Append( | 3141 nacl_env.Append( |
| 3137 BUILD_SCONSCRIPTS = [ | 3142 BUILD_SCONSCRIPTS = [ |
| 3138 'src/shared/srpc/nacl.scons', | 3143 'src/shared/srpc/nacl.scons', |
| 3139 'src/trusted/service_runtime/nacl.scons', | 3144 'src/trusted/service_runtime/nacl.scons', |
| 3140 'src/trusted/validator_x86/nacl.scons', | 3145 'src/trusted/validator_x86/nacl.scons', |
| 3141 'src/trusted/weak_ref/nacl.scons', | 3146 'src/trusted/weak_ref/nacl.scons', |
| 3147 'src/untrusted/crash_dump/nacl.scons', |
| 3142 'src/untrusted/irt_stub/nacl.scons', | 3148 'src/untrusted/irt_stub/nacl.scons', |
| 3143 'src/untrusted/nacl/nacl.scons', | 3149 'src/untrusted/nacl/nacl.scons', |
| 3144 'src/untrusted/nacl_ppapi_util/nacl.scons', | 3150 'src/untrusted/nacl_ppapi_util/nacl.scons', |
| 3145 'src/untrusted/pnacl_irt_shim/nacl.scons', | 3151 'src/untrusted/pnacl_irt_shim/nacl.scons', |
| 3146 'src/untrusted/pnacl_support_extension/nacl.scons', | 3152 'src/untrusted/pnacl_support_extension/nacl.scons', |
| 3147 'src/untrusted/ppapi/nacl.scons', | 3153 'src/untrusted/ppapi/nacl.scons', |
| 3148 'src/untrusted/valgrind/nacl.scons', | 3154 'src/untrusted/valgrind/nacl.scons', |
| 3149 #### ALPHABETICALLY SORTED #### | 3155 #### ALPHABETICALLY SORTED #### |
| 3150 ]) | 3156 ]) |
| 3151 | 3157 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3221 'tests/sysbasic/nacl.scons', | 3227 'tests/sysbasic/nacl.scons', |
| 3222 'tests/syscall_return_sandboxing/nacl.scons', | 3228 'tests/syscall_return_sandboxing/nacl.scons', |
| 3223 'tests/syscalls/nacl.scons', | 3229 'tests/syscalls/nacl.scons', |
| 3224 'tests/threads/nacl.scons', | 3230 'tests/threads/nacl.scons', |
| 3225 'tests/time/nacl.scons', | 3231 'tests/time/nacl.scons', |
| 3226 'tests/tls/nacl.scons', | 3232 'tests/tls/nacl.scons', |
| 3227 'tests/tls_perf/nacl.scons', | 3233 'tests/tls_perf/nacl.scons', |
| 3228 'tests/toolchain/nacl.scons', | 3234 'tests/toolchain/nacl.scons', |
| 3229 'tests/unittests/shared/platform/nacl.scons', | 3235 'tests/unittests/shared/platform/nacl.scons', |
| 3230 'tests/untrusted_check/nacl.scons', | 3236 'tests/untrusted_check/nacl.scons', |
| 3237 'tests/untrusted_crash_dump/nacl.scons', |
| 3231 #### ALPHABETICALLY SORTED #### | 3238 #### ALPHABETICALLY SORTED #### |
| 3232 ] | 3239 ] |
| 3233 | 3240 |
| 3234 # These are tests that are not worthwhile to run in an IRT variant. | 3241 # These are tests that are not worthwhile to run in an IRT variant. |
| 3235 # In some cases, that's because they are browser tests which always | 3242 # In some cases, that's because they are browser tests which always |
| 3236 # use the IRT. In others, it's because they are special-case tests | 3243 # use the IRT. In others, it's because they are special-case tests |
| 3237 # that are incompatible with having an IRT loaded. | 3244 # that are incompatible with having an IRT loaded. |
| 3238 nonvariant_tests = [ | 3245 nonvariant_tests = [ |
| 3239 #### ALPHABETICALLY SORTED #### | 3246 #### ALPHABETICALLY SORTED #### |
| 3240 'tests/barebones/nacl.scons', | 3247 'tests/barebones/nacl.scons', |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3769 nacl_env.ValidateSdk() | 3776 nacl_env.ValidateSdk() |
| 3770 | 3777 |
| 3771 if BROKEN_TEST_COUNT > 0: | 3778 if BROKEN_TEST_COUNT > 0: |
| 3772 msg = "There are %d broken tests." % BROKEN_TEST_COUNT | 3779 msg = "There are %d broken tests." % BROKEN_TEST_COUNT |
| 3773 if GetOption('brief_comstr'): | 3780 if GetOption('brief_comstr'): |
| 3774 msg += " Add --verbose to the command line for more information." | 3781 msg += " Add --verbose to the command line for more information." |
| 3775 print msg | 3782 print msg |
| 3776 | 3783 |
| 3777 # separate warnings from actual build output | 3784 # separate warnings from actual build output |
| 3778 Banner('B U I L D - O U T P U T:') | 3785 Banner('B U I L D - O U T P U T:') |
| OLD | NEW |