| 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 json | 7 import json |
| 8 import os | 8 import os |
| 9 import platform | 9 import platform |
| 10 import re | 10 import re |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 BitFromArgument(env, 'do_not_run_tests', default=False, | 361 BitFromArgument(env, 'do_not_run_tests', default=False, |
| 362 desc='Prevents tests from running. This lets SCons build the files needed ' | 362 desc='Prevents tests from running. This lets SCons build the files needed ' |
| 363 'to run the specified test(s) without actually running them. This ' | 363 'to run the specified test(s) without actually running them. This ' |
| 364 'argument is a counterpart to built_elsewhere.') | 364 'argument is a counterpart to built_elsewhere.') |
| 365 | 365 |
| 366 BitFromArgument(env, 'no_gdb_tests', default=False, | 366 BitFromArgument(env, 'no_gdb_tests', default=False, |
| 367 desc='Prevents GDB tests from running. If GDB is not available, you can ' | 367 desc='Prevents GDB tests from running. If GDB is not available, you can ' |
| 368 'test everything else by specifying this flag.') | 368 'test everything else by specifying this flag.') |
| 369 | 369 |
| 370 BitFromArgument(env, 'validator_ragel', default=True, | |
| 371 desc='Use the R-DFA validator instead of the original validators.') | |
| 372 | |
| 373 # TODO(shcherbina): add support for other golden-based tests, not only | 370 # TODO(shcherbina): add support for other golden-based tests, not only |
| 374 # run_x86_*_validator_testdata_tests. | 371 # run_x86_*_validator_testdata_tests. |
| 375 BitFromArgument(env, 'regenerate_golden', default=False, | 372 BitFromArgument(env, 'regenerate_golden', default=False, |
| 376 desc='When running golden-based tests, instead of comparing results ' | 373 desc='When running golden-based tests, instead of comparing results ' |
| 377 'save actual output as golden data.') | 374 'save actual output as golden data.') |
| 378 | 375 |
| 379 BitFromArgument(env, 'x86_64_zero_based_sandbox', default=False, | 376 BitFromArgument(env, 'x86_64_zero_based_sandbox', default=False, |
| 380 desc='Use the zero-address-based x86-64 sandbox model instead of ' | 377 desc='Use the zero-address-based x86-64 sandbox model instead of ' |
| 381 'the r15-based model.') | 378 'the r15-based model.') |
| 382 | 379 |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 return bool(env.GetEmulator()) | 1182 return bool(env.GetEmulator()) |
| 1186 | 1183 |
| 1187 pre_base_env.AddMethod(UsingEmulator) | 1184 pre_base_env.AddMethod(UsingEmulator) |
| 1188 | 1185 |
| 1189 | 1186 |
| 1190 def GetValidator(env, validator): | 1187 def GetValidator(env, validator): |
| 1191 # NOTE: that the variable TRUSTED_ENV is set by ExportSpecialFamilyVars() | 1188 # NOTE: that the variable TRUSTED_ENV is set by ExportSpecialFamilyVars() |
| 1192 if 'TRUSTED_ENV' not in env: | 1189 if 'TRUSTED_ENV' not in env: |
| 1193 return None | 1190 return None |
| 1194 | 1191 |
| 1192 # TODO(shyamsundarr): rename ncval_new to ncval. |
| 1195 if validator is None: | 1193 if validator is None: |
| 1196 if env.Bit('build_arm'): | 1194 if env.Bit('build_arm'): |
| 1197 validator = 'arm-ncval-core' | 1195 validator = 'arm-ncval-core' |
| 1198 elif env.Bit('build_mips32'): | 1196 elif env.Bit('build_mips32'): |
| 1199 validator = 'mips-ncval-core' | 1197 validator = 'mips-ncval-core' |
| 1200 else: | 1198 else: |
| 1201 if env.Bit('validator_ragel'): | 1199 validator = 'ncval_new' |
| 1202 validator = 'ncval_new' | |
| 1203 else: | |
| 1204 validator = 'ncval' | |
| 1205 | 1200 |
| 1206 trusted_env = env['TRUSTED_ENV'] | 1201 trusted_env = env['TRUSTED_ENV'] |
| 1207 return trusted_env.File('${STAGING_DIR}/${PROGPREFIX}%s${PROGSUFFIX}' % | 1202 return trusted_env.File('${STAGING_DIR}/${PROGPREFIX}%s${PROGSUFFIX}' % |
| 1208 validator) | 1203 validator) |
| 1209 | 1204 |
| 1210 pre_base_env.AddMethod(GetValidator) | 1205 pre_base_env.AddMethod(GetValidator) |
| 1211 | 1206 |
| 1212 | 1207 |
| 1213 # Perform os.path.abspath rooted at the directory SConstruct resides in. | 1208 # Perform os.path.abspath rooted at the directory SConstruct resides in. |
| 1214 def SConstructAbsPath(env, path): | 1209 def SConstructAbsPath(env, path): |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2220 'src/nonsfi/irt/build.scons', | 2215 'src/nonsfi/irt/build.scons', |
| 2221 'src/nonsfi/loader/build.scons', | 2216 'src/nonsfi/loader/build.scons', |
| 2222 'src/shared/gio/build.scons', | 2217 'src/shared/gio/build.scons', |
| 2223 'src/shared/imc/build.scons', | 2218 'src/shared/imc/build.scons', |
| 2224 'src/shared/ldr/build.scons', | 2219 'src/shared/ldr/build.scons', |
| 2225 'src/shared/platform/build.scons', | 2220 'src/shared/platform/build.scons', |
| 2226 'src/shared/serialization/build.scons', | 2221 'src/shared/serialization/build.scons', |
| 2227 'src/shared/srpc/build.scons', | 2222 'src/shared/srpc/build.scons', |
| 2228 'src/shared/utils/build.scons', | 2223 'src/shared/utils/build.scons', |
| 2229 'src/third_party/gtest/build.scons', | 2224 'src/third_party/gtest/build.scons', |
| 2230 'src/tools/validator_tools/build.scons', | |
| 2231 'src/trusted/cpu_features/build.scons', | 2225 'src/trusted/cpu_features/build.scons', |
| 2232 'src/trusted/debug_stub/build.scons', | 2226 'src/trusted/debug_stub/build.scons', |
| 2233 'src/trusted/desc/build.scons', | 2227 'src/trusted/desc/build.scons', |
| 2234 'src/trusted/desc_cacheability/build.scons', | 2228 'src/trusted/desc_cacheability/build.scons', |
| 2235 'src/trusted/fault_injection/build.scons', | 2229 'src/trusted/fault_injection/build.scons', |
| 2236 'src/trusted/interval_multiset/build.scons', | 2230 'src/trusted/interval_multiset/build.scons', |
| 2237 'src/trusted/manifest_name_service_proxy/build.scons', | 2231 'src/trusted/manifest_name_service_proxy/build.scons', |
| 2238 'src/trusted/nacl_base/build.scons', | 2232 'src/trusted/nacl_base/build.scons', |
| 2239 'src/trusted/nonnacl_util/build.scons', | 2233 'src/trusted/nonnacl_util/build.scons', |
| 2240 'src/trusted/perf_counter/build.scons', | 2234 'src/trusted/perf_counter/build.scons', |
| 2241 'src/trusted/platform_qualify/build.scons', | 2235 'src/trusted/platform_qualify/build.scons', |
| 2242 'src/trusted/reverse_service/build.scons', | 2236 'src/trusted/reverse_service/build.scons', |
| 2243 'src/trusted/seccomp_bpf/build.scons', | 2237 'src/trusted/seccomp_bpf/build.scons', |
| 2244 'src/trusted/sel_universal/build.scons', | 2238 'src/trusted/sel_universal/build.scons', |
| 2245 'src/trusted/service_runtime/build.scons', | 2239 'src/trusted/service_runtime/build.scons', |
| 2246 'src/trusted/simple_service/build.scons', | 2240 'src/trusted/simple_service/build.scons', |
| 2247 'src/trusted/threading/build.scons', | 2241 'src/trusted/threading/build.scons', |
| 2248 'src/trusted/validator/build.scons', | 2242 'src/trusted/validator/build.scons', |
| 2249 'src/trusted/validator/driver/build.scons', | 2243 'src/trusted/validator/driver/build.scons', |
| 2250 'src/trusted/validator/x86/32/build.scons', | |
| 2251 'src/trusted/validator/x86/64/build.scons', | |
| 2252 'src/trusted/validator/x86/build.scons', | |
| 2253 'src/trusted/validator/x86/decoder/build.scons', | |
| 2254 'src/trusted/validator/x86/decoder/generator/build.scons', | |
| 2255 'src/trusted/validator/x86/ncval_reg_sfi/build.scons', | |
| 2256 'src/trusted/validator/x86/ncval_seg_sfi/build.scons', | |
| 2257 'src/trusted/validator/x86/ncval_seg_sfi/generator/build.scons', | |
| 2258 'src/trusted/validator/x86/testing/enuminsts/build.scons', | |
| 2259 'src/trusted/validator_arm/build.scons', | 2244 'src/trusted/validator_arm/build.scons', |
| 2260 'src/trusted/validator_ragel/build.scons', | 2245 'src/trusted/validator_ragel/build.scons', |
| 2261 'src/trusted/validator_x86/build.scons', | 2246 'src/trusted/validator_x86/build.scons', |
| 2262 'src/trusted/weak_ref/build.scons', | 2247 'src/trusted/weak_ref/build.scons', |
| 2263 'tests/common/build.scons', | 2248 'tests/common/build.scons', |
| 2264 'tests/lock_manager/build.scons', | 2249 'tests/lock_manager/build.scons', |
| 2265 'tests/performance/build.scons', | 2250 'tests/performance/build.scons', |
| 2266 'tests/python_version/build.scons', | 2251 'tests/python_version/build.scons', |
| 2267 'tests/sel_ldr_seccomp/build.scons', | 2252 'tests/sel_ldr_seccomp/build.scons', |
| 2268 'tests/srpc_message/build.scons', | 2253 'tests/srpc_message/build.scons', |
| (...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4030 nacl_env.ValidateSdk() | 4015 nacl_env.ValidateSdk() |
| 4031 | 4016 |
| 4032 if BROKEN_TEST_COUNT > 0: | 4017 if BROKEN_TEST_COUNT > 0: |
| 4033 msg = "There are %d broken tests." % BROKEN_TEST_COUNT | 4018 msg = "There are %d broken tests." % BROKEN_TEST_COUNT |
| 4034 if GetOption('brief_comstr'): | 4019 if GetOption('brief_comstr'): |
| 4035 msg += " Add --verbose to the command line for more information." | 4020 msg += " Add --verbose to the command line for more information." |
| 4036 print msg | 4021 print msg |
| 4037 | 4022 |
| 4038 # separate warnings from actual build output | 4023 # separate warnings from actual build output |
| 4039 Banner('B U I L D - O U T P U T:') | 4024 Banner('B U I L D - O U T P U T:') |
| OLD | NEW |