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

Side by Side Diff: src/trusted/validator_arm/build.scons

Issue 7799013: Intial Thumb2 Sandbox (naclrev 6680) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix comma Created 9 years, 3 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
OLDNEW
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 os 6 import os
7 Import('env') 7 Import('env')
8 8
9 if env.Bit('linux'): 9 if env.Bit('linux'):
10 10
11 env.Append( 11 env.Append(
12 # TODO(cbiffle): give everyone else these warnings too. 12 # TODO(cbiffle): give everyone else these warnings too.
13 CXXFLAGS='-Weffc++ -Woverloaded-virtual -fno-rtti -fomit-frame-pointer', 13 CXXFLAGS='-Weffc++ -Woverloaded-virtual -fno-rtti -fomit-frame-pointer',
14 ) 14 )
15 15
16 # NOTE: we cannot use TARGET_ROOT here because we want to share this file 16 # NOTE: we cannot use TARGET_ROOT here because we want to share this file
17 # between different scons invocations 17 # between different scons invocations
18 gen_dec=('${DESTINATION_ROOT}/gen/native_client/src/trusted/validator_arm/' 18 gen_dec=('${DESTINATION_ROOT}/gen/native_client/src/trusted/validator_arm/'
19 'decode.cc') 19 'decode.cc')
20 20
21 env.Command(target=gen_dec, 21 env.Command(target=gen_dec,
22 source=['armv7-opt.table', 22 source=['armv7-opt.table',
23 'armv7-thumb.table',
23 'generate_decoder.py', 24 'generate_decoder.py',
24 'dgen_core.py', 25 'dgen_core.py',
25 'dgen_input.py', 26 'dgen_input.py',
26 'dgen_opt.py', 27 'dgen_opt.py',
27 'dgen_output.py'], 28 'dgen_output.py'],
28 action=['${SOURCES[1].abspath} ${SOURCES[0].abspath} ' 29 action=['${SOURCES[2].abspath} ${SOURCES[0].abspath} '
29 '${TARGET.abspath}']) 30 '${SOURCES[1].abspath} ${TARGET.abspath}'])
30 31
31 env.ComponentLibrary('arm_validator_core', 32 env.ComponentLibrary('arm_validator_core',
32 ['address_set.cc', 33 ['address_set.cc',
33 'inst_classes.cc', 34 'inst_classes.cc',
34 'validator.cc', 35 'validator.cc',
35 gen_dec]) 36 gen_dec])
36 37
37 env.ComponentLibrary('ncvalidate_arm_v2', 38 env.ComponentLibrary('ncvalidate_arm_v2',
38 ['ncvalidate.cc'], 39 ['ncvalidate.cc'],
39 LIBS=['arm_validator_core', 40 LIBS=['arm_validator_core',
(...skipping 24 matching lines...) Expand all
64 65
65 validator_tests = { 66 validator_tests = {
66 'test_external_jumps': 1, 67 'test_external_jumps': 1,
67 'test_forbidden_instructions': 1, 68 'test_forbidden_instructions': 1,
68 'test_internal_jumps': 1, 69 'test_internal_jumps': 1,
69 'test_sp_updates': 1, 70 'test_sp_updates': 1,
70 'test_stores': 1, 71 'test_stores': 1,
71 'test_vector_stores': 1, 72 'test_vector_stores': 1,
72 } 73 }
73 74
75 validator_tests_thumb = {
Karl 2011/09/19 19:56:05 NIT: Should this be named thumb2 instead of thunb?
jasonwkim 2011/09/26 21:35:52 not really. we are teting thumb MODE thumb MODE th
76 'local_allowed' : 0,
77 'local_disallowed' : 1,
78 'test_forbidden_instructions' : 1,
79 'masking_instructions' : 0,
80 'mem_test' : 1,
81 'branch_test' : 1,
82 'bundle_test' : 1,
83 'it_test' : 1,
84 'test_external_jumps' : 1,
85 'test_internal_jumps' : 1,
86 'test_sp_updates' : 1,
87 'test_stores' : 1,
88 'lit_pool_test' : 0
89 }
90
74 for test, exit_status in validator_tests.iteritems(): 91 for test, exit_status in validator_tests.iteritems():
75 node = env.CommandTest( 92 node = env.CommandTest(
76 test + '_actual.out', 93 test + '_actual.out',
77 [ncval, env.File('testdata/' + test + '.nexe')], 94 [ncval, env.File('testdata/' + test + '.nexe')],
78 exit_status = str(exit_status), 95 exit_status = str(exit_status),
79 filter_regex = "'^ncval'", 96 filter_regex = "'^ncval'",
80 # NOTE: all stdout_golden are currently empty 97 # NOTE: all stdout_golden are currently empty
81 stdout_golden = env.File('testdata/' + test + '.out'), 98 stdout_golden = env.File('testdata/' + test + '.out'),
82 stderr_golden = env.File('testdata/' + test + '.err')) 99 stderr_golden = env.File('testdata/' + test + '.err'))
83 100
84 env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'], 101 env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'],
85 "run_arm_" + test) 102 "run_arm_" + test)
86 103
104 for test, exit_status in validator_tests_thumb.iteritems():
105 node = env.CommandTest(
106 test + '_thumb_actual.out',
107 [ncval, env.File('testdata-thumb/' + test + '.nexe')],
Karl 2011/09/19 19:56:05 NIT: Again, isn't this thumb2, not thumb?
jasonwkim 2011/09/26 21:35:52 no this is for thumb MODE, this is not the ISA
108 exit_status = str(exit_status),
109 filter_regex = "'^ncval'",
110 # NOTE: all stdout_golden are currently empty
111 stdout_golden = env.File('testdata-thumb/' + test + '.out'),
112 stderr_golden = env.File('testdata-thumb/' + test + '.err'))
113
114 env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'],
115 "run_arm_" + test)
116
87 gtest_env = env.Clone() 117 gtest_env = env.Clone()
88 # gtest does not compile with our stringent settings. 118 # gtest does not compile with our stringent settings.
89 gtest_env.FilterOut( 119 gtest_env.FilterOut(
90 CCFLAGS=['-pedantic'], 120 CCFLAGS=['-pedantic'],
91 CXXFLAGS=['-fno-rtti', '-Weffc++']) 121 CXXFLAGS=['-fno-rtti', '-Weffc++'])
92 gtest_env.Prepend(CPPPATH=['${SOURCE_ROOT}/testing/gtest/include']) 122 gtest_env.Prepend(CPPPATH=['${SOURCE_ROOT}/testing/gtest/include'])
93 123
94 # Do NOT name this program 'validator_tests' because this is the same name as 124 # Do NOT name this program 'validator_tests' because this is the same name as
95 # a test suite, and scons will run that test suite if it ever builds 125 # a test suite, and scons will run that test suite if it ever builds
96 # a program of the same name. 126 # a program of the same name.
97 validator_tests_exe = gtest_env.ComponentProgram('arm_validator_tests', 127 validator_tests_exe = gtest_env.ComponentProgram('arm_validator_tests',
98 ['validator_tests.cc'], 128 ['validator_tests.cc'],
99 EXTRA_LIBS=['gtest', 'arm_validator_core']) 129 EXTRA_LIBS=['gtest', 'arm_validator_core'])
100 130
101 test_node = gtest_env.CommandTest( 131 test_node = gtest_env.CommandTest(
102 'validator_tests.out', 132 'validator_tests.out',
103 command=[validator_tests_exe]) 133 command=[validator_tests_exe])
104 gtest_env.AddNodeToTestSuite(test_node, ['small_tests'], 134 gtest_env.AddNodeToTestSuite(test_node, ['small_tests'],
105 'run_arm_validator_tests') 135 'run_arm_validator_tests')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698