Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: SConstruct

Issue 424763007: Non-SFI Mode: Centralise test whitelists; move to Scons (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | buildbot/buildbot_pnacl.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 json 7 import json
8 import os 8 import os
9 import platform 9 import platform
10 import re 10 import re
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 'run_ppapi_geturl_valid_test', 652 'run_ppapi_geturl_valid_test',
653 'run_ppapi_geturl_invalid_test', 653 'run_ppapi_geturl_invalid_test',
654 # http://code.google.com/p/chromium/issues/detail?id=108131 654 # http://code.google.com/p/chromium/issues/detail?id=108131
655 # we would need to list all of the glibc components as 655 # we would need to list all of the glibc components as
656 # web accessible resources in the extensions's manifest.json, 656 # web accessible resources in the extensions's manifest.json,
657 # not just the nexe and nmf file. 657 # not just the nexe and nmf file.
658 'run_ppapi_extension_mime_handler_browser_test', 658 'run_ppapi_extension_mime_handler_browser_test',
659 ]) 659 ])
660 nacl_glibc_skiplist.update(['%s_irt' % test for test in nacl_glibc_skiplist]) 660 nacl_glibc_skiplist.update(['%s_irt' % test for test in nacl_glibc_skiplist])
661 661
662 # Whitelist of tests to run for Non-SFI Mode. Note that typos here will
663 # not be caught automatically!
664 # TODO(mseaborn): Eventually we should run all of small_tests instead of
665 # this whitelist.
666 nonsfi_test_whitelist = set([
667 'run_clock_get_test',
668 'run_dup_test',
669 'run_fcntl_test',
670 'run_float_test',
671 'run_fork_test',
672 'run_getpid_test',
673 'run_hello_world_test',
674 'run_irt_futex_test',
675 'run_malloc_realloc_calloc_free_test',
676 'run_mmap_test',
677 'run_nanosleep_test',
678 'run_prctl_test',
679 'run_printf_test',
680 'run_pwrite_test',
681 'run_sigaction_test',
682 'run_signal_test',
683 'run_socket_test',
684 'run_stack_alignment_test',
685 'run_syscall_test',
686 'run_thread_test',
687 ])
688
662 689
663 # If a test is not in one of these suites, it will probally not be run on a 690 # If a test is not in one of these suites, it will probally not be run on a
664 # regular basis. These are the suites that will be run by the try bot or that 691 # regular basis. These are the suites that will be run by the try bot or that
665 # a large number of users may run by hand. 692 # a large number of users may run by hand.
666 MAJOR_TEST_SUITES = set([ 693 MAJOR_TEST_SUITES = set([
667 'small_tests', 694 'small_tests',
668 'medium_tests', 695 'medium_tests',
669 'large_tests', 696 'large_tests',
670 # Tests using the pepper plugin, only run with chrome 697 # Tests using the pepper plugin, only run with chrome
671 # TODO(ncbray): migrate pepper_browser_tests to chrome_browser_tests 698 # TODO(ncbray): migrate pepper_browser_tests to chrome_browser_tests
672 'pepper_browser_tests', 699 'pepper_browser_tests',
673 # Lightweight browser tests 700 # Lightweight browser tests
674 'chrome_browser_tests', 701 'chrome_browser_tests',
675 'huge_tests', 702 'huge_tests',
676 'memcheck_bot_tests', 703 'memcheck_bot_tests',
677 'tsan_bot_tests', 704 'tsan_bot_tests',
678 # Special testing environment for testing comparing x86 validators. 705 # Special testing environment for testing comparing x86 validators.
679 'ncval_testing', 706 'ncval_testing',
680 # Environment for validator difference testing 707 # Environment for validator difference testing
681 'validator_diff_tests', 708 'validator_diff_tests',
709 # Subset of tests enabled for Non-SFI Mode.
710 'nonsfi_tests',
682 ]) 711 ])
683 712
684 # These are the test suites we know exist, but aren't run on a regular basis. 713 # These are the test suites we know exist, but aren't run on a regular basis.
685 # These test suites are essentially shortcuts that run a specific subset of the 714 # These test suites are essentially shortcuts that run a specific subset of the
686 # test cases. 715 # test cases.
687 ACCEPTABLE_TEST_SUITES = set([ 716 ACCEPTABLE_TEST_SUITES = set([
688 'barebones_tests', 717 'barebones_tests',
689 'dynamic_load_tests', 718 'dynamic_load_tests',
690 'eh_tests', # Tests for C++ exception handling 719 'eh_tests', # Tests for C++ exception handling
691 'exception_tests', # Tests for hardware exception handling 720 'exception_tests', # Tests for hardware exception handling
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 return True 869 return True
841 870
842 if env.Bit('nacl_glibc') and node_name in nacl_glibc_skiplist: 871 if env.Bit('nacl_glibc') and node_name in nacl_glibc_skiplist:
843 return True 872 return True
844 873
845 return False 874 return False
846 875
847 pre_base_env.AddMethod(ShouldSkipTest) 876 pre_base_env.AddMethod(ShouldSkipTest)
848 877
849 878
879 def AddImplicitTestSuites(suite_list, node_name):
880 if node_name in nonsfi_test_whitelist:
881 suite_list = suite_list + ['nonsfi_tests']
882 return suite_list
883
884
850 def AddNodeToTestSuite(env, node, suite_name, node_name, is_broken=False, 885 def AddNodeToTestSuite(env, node, suite_name, node_name, is_broken=False,
851 is_flaky=False): 886 is_flaky=False):
852 global BROKEN_TEST_COUNT 887 global BROKEN_TEST_COUNT
853 888
854 # CommandTest can return an empty list when it silently discards a test 889 # CommandTest can return an empty list when it silently discards a test
855 if not node: 890 if not node:
856 return 891 return
857 892
858 assert node_name is not None 893 assert node_name is not None
859 test_name_regex = r'run_.*_(unit)?test.*$' 894 test_name_regex = r'run_.*_(unit)?test.*$'
860 assert re.match(test_name_regex, node_name), ( 895 assert re.match(test_name_regex, node_name), (
861 'test %r does not match "run_..._test" naming convention ' 896 'test %r does not match "run_..._test" naming convention '
862 '(precise regex is %s)' % (node_name, test_name_regex)) 897 '(precise regex is %s)' % (node_name, test_name_regex))
863 898
899 suite_name = AddImplicitTestSuites(suite_name, node_name)
864 ValidateTestSuiteNames(suite_name, node_name) 900 ValidateTestSuiteNames(suite_name, node_name)
865 901
866 AlwaysBuild(node) 902 AlwaysBuild(node)
867 903
868 if is_broken or is_flaky and env.Bit('disable_flaky_tests'): 904 if is_broken or is_flaky and env.Bit('disable_flaky_tests'):
869 # Only print if --verbose is specified 905 # Only print if --verbose is specified
870 if not GetOption('brief_comstr'): 906 if not GetOption('brief_comstr'):
871 print '*** BROKEN ', node_name 907 print '*** BROKEN ', node_name
872 BROKEN_TEST_COUNT += 1 908 BROKEN_TEST_COUNT += 1
873 env.Alias('broken_tests', node) 909 env.Alias('broken_tests', node)
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after
3645 nacl_irt_test_env.AddMethod(IrtTestDummyLibrary, 'ComponentLibrary') 3681 nacl_irt_test_env.AddMethod(IrtTestDummyLibrary, 'ComponentLibrary')
3646 3682
3647 def IrtTestAddNodeToTestSuite(env, node, suite_name, node_name=None, 3683 def IrtTestAddNodeToTestSuite(env, node, suite_name, node_name=None,
3648 is_broken=False, is_flaky=False, 3684 is_broken=False, is_flaky=False,
3649 disable_irt_suffix=False): 3685 disable_irt_suffix=False):
3650 # The disable_irt_suffix argument is there for allowing tests 3686 # The disable_irt_suffix argument is there for allowing tests
3651 # defined in nacl_irt_test_env to be part of chrome_browser_tests 3687 # defined in nacl_irt_test_env to be part of chrome_browser_tests
3652 # (rather than part of chrome_browser_tests_irt). 3688 # (rather than part of chrome_browser_tests_irt).
3653 # TODO(mseaborn): But really, all of chrome_browser_tests should be 3689 # TODO(mseaborn): But really, all of chrome_browser_tests should be
3654 # placed in nacl_irt_test_env rather than in nacl_env. 3690 # placed in nacl_irt_test_env rather than in nacl_env.
3691 suite_name = AddImplicitTestSuites(suite_name, node_name)
3655 if not disable_irt_suffix: 3692 if not disable_irt_suffix:
3656 if node_name is not None: 3693 if node_name is not None:
3657 node_name += '_irt' 3694 node_name += '_irt'
3658 suite_name = [name + '_irt' for name in suite_name] 3695 suite_name = [name + '_irt' for name in suite_name]
3659 # NOTE: This needs to be called directly to as we're overriding the 3696 # NOTE: This needs to be called directly to as we're overriding the
3660 # prior version. 3697 # prior version.
3661 return AddNodeToTestSuite(env, node, suite_name, node_name, 3698 return AddNodeToTestSuite(env, node, suite_name, node_name,
3662 is_broken, is_flaky) 3699 is_broken, is_flaky)
3663 nacl_irt_test_env.AddMethod(IrtTestAddNodeToTestSuite, 'AddNodeToTestSuite') 3700 nacl_irt_test_env.AddMethod(IrtTestAddNodeToTestSuite, 'AddNodeToTestSuite')
3664 3701
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
3946 nacl_env.ValidateSdk() 3983 nacl_env.ValidateSdk()
3947 3984
3948 if BROKEN_TEST_COUNT > 0: 3985 if BROKEN_TEST_COUNT > 0:
3949 msg = "There are %d broken tests." % BROKEN_TEST_COUNT 3986 msg = "There are %d broken tests." % BROKEN_TEST_COUNT
3950 if GetOption('brief_comstr'): 3987 if GetOption('brief_comstr'):
3951 msg += " Add --verbose to the command line for more information." 3988 msg += " Add --verbose to the command line for more information."
3952 print msg 3989 print msg
3953 3990
3954 # separate warnings from actual build output 3991 # separate warnings from actual build output
3955 Banner('B U I L D - O U T P U T:') 3992 Banner('B U I L D - O U T P U T:')
OLDNEW
« no previous file with comments | « no previous file | buildbot/buildbot_pnacl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698