| OLD | NEW |
| (Empty) |
| 1 # -*- python -*- | |
| 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 | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 import os | |
| 7 import sys | |
| 8 Import('env') | |
| 9 | |
| 10 # vdiff is x86 only | |
| 11 if not env.Bit('target_x86'): Return() | |
| 12 | |
| 13 # ------------------------------------------------------ | |
| 14 # General adjustments to the environment for builds. | |
| 15 | |
| 16 # Create environment for command-line tools and testing, rather than | |
| 17 # part of the TCB. Then define compile-time flag that communicates | |
| 18 # that we are compiling in the test environment (rather than for the TCB). | |
| 19 test_env = env.Clone() | |
| 20 test_env.Append(CPPDEFINES=['NACL_TRUSTED_BUT_NOT_TCB', 'NACL_RAGEL_DECODER']) | |
| 21 | |
| 22 vdiff = test_env.ComponentProgram( | |
| 23 'vdiff', | |
| 24 ['vdiff.c', 'nacl_tester.c', 'ragel_tester.c', 'str_utils.c', 'text2hex.c'], | |
| 25 EXTRA_LIBS=[test_env.NaClTargetArchSuffix('ncdis_util'), | |
| 26 test_env.NaClTargetArchSuffix('ncvalidate'), | |
| 27 test_env.NaClTargetArchSuffix('ncval_reg_sfi'), | |
| 28 test_env.NaClTargetArchSuffix('nc_decoder'), | |
| 29 test_env.NaClTargetArchSuffix('nc_opcode_modeling_verbose'), | |
| 30 test_env.NaClTargetArchSuffix('nc_opcode_modeling'), | |
| 31 test_env.NaClTargetArchSuffix('ncdis_decode_tables'), | |
| 32 test_env.NaClTargetArchSuffix('ncval_base_verbose'), | |
| 33 test_env.NaClTargetArchSuffix('ncval_base'), | |
| 34 'validators', | |
| 35 env.NaClTargetArchSuffix('ncvalidate'), | |
| 36 env.NaClTargetArchSuffix('dfa_validate_caller'), | |
| 37 'platform', 'nrd_xfer', 'gio', 'utils', | |
| 38 ]) | |
| 39 | |
| 40 # NOTE: can't use stdout_golden here because the test runs too long, | |
| 41 # so the bots kill it because with this option there is no output. | |
| 42 if env.Bit('target_x86_64'): | |
| 43 node = env.CommandTest( | |
| 44 'vdiff.out', command=[vdiff, '--easydiff'], | |
| 45 capture_output=0, time_warning=2500, time_error=5000) | |
| 46 env.AddNodeToTestSuite(node, ['validator_diff_tests'], 'run_vdiff_test') | |
| 47 | |
| 48 if env.Bit('target_x86_32'): | |
| 49 # No golden output for 32-bit until more diffs are fixed | |
| 50 node = env.CommandTest('vdiff.out', command=[vdiff], | |
| 51 time_warning=2500, time_error=5000) | |
| 52 env.AddNodeToTestSuite(node, ['validator_diff_tests'], 'run_vdiff_test') | |
| OLD | NEW |