| 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 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 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 filter_group_only = params.get('filter_group_only', False) | 1535 filter_group_only = params.get('filter_group_only', False) |
| 1536 post_actions.append( | 1536 post_actions.append( |
| 1537 GoldenFileCheckAction( | 1537 GoldenFileCheckAction( |
| 1538 env, stream_file, golden_file, | 1538 env, stream_file, golden_file, |
| 1539 filter_regex, filter_inverse, filter_group_only)) | 1539 filter_regex, filter_inverse, filter_group_only)) |
| 1540 | 1540 |
| 1541 if ShouldUseVerboseOptions(extra): | 1541 if ShouldUseVerboseOptions(extra): |
| 1542 env.MakeVerboseExtraOptions(target, log_verbosity, extra) | 1542 env.MakeVerboseExtraOptions(target, log_verbosity, extra) |
| 1543 # Heuristic for when to capture output... | 1543 # Heuristic for when to capture output... |
| 1544 capture_output = (extra.pop('capture_output', False) | 1544 capture_output = (extra.pop('capture_output', False) |
| 1545 or 'process_output' in extra) | 1545 or 'process_output_single' in extra) |
| 1546 node = env.CommandTest(target, | 1546 node = env.CommandTest(target, |
| 1547 command, | 1547 command, |
| 1548 # Set to 'huge' so that the browser tester's timeout | 1548 # Set to 'huge' so that the browser tester's timeout |
| 1549 # takes precedence over the default of the test_suite. | 1549 # takes precedence over the default of the test_suite. |
| 1550 size='huge', | 1550 size='huge', |
| 1551 capture_output=capture_output, | 1551 capture_output=capture_output, |
| 1552 **extra) | 1552 **extra) |
| 1553 # We can't check output if the test is not run. | 1553 # We can't check output if the test is not run. |
| 1554 if not env.Bit('do_not_run_tests'): | 1554 if not env.Bit('do_not_run_tests'): |
| 1555 for action in post_actions: | 1555 for action in post_actions: |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1807 log_file = env.MakeNaClLogOption(target) | 1807 log_file = env.MakeNaClLogOption(target) |
| 1808 extra['log_file'] = log_file | 1808 extra['log_file'] = log_file |
| 1809 extra_env = ['NACLLOG=%s' % log_file, | 1809 extra_env = ['NACLLOG=%s' % log_file, |
| 1810 'NACLVERBOSITY=%d' % log_verbosity] | 1810 'NACLVERBOSITY=%d' % log_verbosity] |
| 1811 extra['osenv'] = extra.get('osenv', []) + extra_env | 1811 extra['osenv'] = extra.get('osenv', []) + extra_env |
| 1812 | 1812 |
| 1813 pre_base_env.AddMethod(MakeVerboseExtraOptions) | 1813 pre_base_env.AddMethod(MakeVerboseExtraOptions) |
| 1814 | 1814 |
| 1815 def ShouldUseVerboseOptions(extra): | 1815 def ShouldUseVerboseOptions(extra): |
| 1816 """ Heuristic for setting up Verbose NACLLOG options. """ | 1816 """ Heuristic for setting up Verbose NACLLOG options. """ |
| 1817 return ('process_output' in extra or | 1817 return ('process_output_single' in extra or |
| 1818 'log_golden' in extra) | 1818 'log_golden' in extra) |
| 1819 | 1819 |
| 1820 # ---------------------------------------------------------- | 1820 # ---------------------------------------------------------- |
| 1821 DeclareBit('tests_use_irt', 'Non-browser tests also load the IRT image', False) | 1821 DeclareBit('tests_use_irt', 'Non-browser tests also load the IRT image', False) |
| 1822 | 1822 |
| 1823 def CommandSelLdrTestNacl(env, name, nexe, | 1823 def CommandSelLdrTestNacl(env, name, nexe, |
| 1824 args = None, | 1824 args = None, |
| 1825 log_verbosity=2, | 1825 log_verbosity=2, |
| 1826 sel_ldr_flags=None, | 1826 sel_ldr_flags=None, |
| 1827 loader=None, | 1827 loader=None, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1887 env.Alias('irt_tests', node) | 1887 env.Alias('irt_tests', node) |
| 1888 return node | 1888 return node |
| 1889 | 1889 |
| 1890 pre_base_env.AddMethod(CommandSelLdrTestNacl) | 1890 pre_base_env.AddMethod(CommandSelLdrTestNacl) |
| 1891 | 1891 |
| 1892 # ---------------------------------------------------------- | 1892 # ---------------------------------------------------------- |
| 1893 TEST_EXTRA_ARGS = ['stdin', 'log_file', | 1893 TEST_EXTRA_ARGS = ['stdin', 'log_file', |
| 1894 'stdout_golden', 'stderr_golden', 'log_golden', | 1894 'stdout_golden', 'stderr_golden', 'log_golden', |
| 1895 'filter_regex', 'filter_inverse', 'filter_group_only', | 1895 'filter_regex', 'filter_inverse', 'filter_group_only', |
| 1896 'osenv', 'arch', 'subarch', 'exit_status', 'track_cmdtime', | 1896 'osenv', 'arch', 'subarch', 'exit_status', 'track_cmdtime', |
| 1897 'process_output', 'using_nacl_signal_handler'] | 1897 'num_runs', 'process_output_single', |
| 1898 'process_output_combined', 'using_nacl_signal_handler'] |
| 1898 | 1899 |
| 1899 TEST_TIME_THRESHOLD = { | 1900 TEST_TIME_THRESHOLD = { |
| 1900 'small': 2, | 1901 'small': 2, |
| 1901 'medium': 10, | 1902 'medium': 10, |
| 1902 'large': 60, | 1903 'large': 60, |
| 1903 'huge': 1800, | 1904 'huge': 1800, |
| 1904 } | 1905 } |
| 1905 | 1906 |
| 1906 # Valgrind handles SIGSEGV in a way our testing tools do not expect. | 1907 # Valgrind handles SIGSEGV in a way our testing tools do not expect. |
| 1907 UNSUPPORTED_VALGRIND_EXIT_STATUS = ['sigabrt', | 1908 UNSUPPORTED_VALGRIND_EXIT_STATUS = ['sigabrt', |
| (...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3642 nacl_env.ValidateSdk() | 3643 nacl_env.ValidateSdk() |
| 3643 | 3644 |
| 3644 if BROKEN_TEST_COUNT > 0: | 3645 if BROKEN_TEST_COUNT > 0: |
| 3645 msg = "There are %d broken tests." % BROKEN_TEST_COUNT | 3646 msg = "There are %d broken tests." % BROKEN_TEST_COUNT |
| 3646 if GetOption('brief_comstr'): | 3647 if GetOption('brief_comstr'): |
| 3647 msg += " Add --verbose to the command line for more information." | 3648 msg += " Add --verbose to the command line for more information." |
| 3648 print msg | 3649 print msg |
| 3649 | 3650 |
| 3650 # separate warnings from actual build output | 3651 # separate warnings from actual build output |
| 3651 Banner('B U I L D - O U T P U T:') | 3652 Banner('B U I L D - O U T P U T:') |
| OLD | NEW |