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 os | 6 import os |
7 import sys | 7 import sys |
8 Import('env') | 8 Import('env') |
9 | 9 |
10 # vdiff is x86 only | 10 # vdiff is x86 only |
11 if not env.Bit('target_x86'): Return() | 11 if not env.Bit('target_x86'): Return() |
12 | 12 |
13 # ------------------------------------------------------ | 13 # ------------------------------------------------------ |
14 # General adjustments to the environment for builds. | 14 # General adjustments to the environment for builds. |
15 | 15 |
16 # Make a copy of debug CRT for now. | 16 # Make a copy of debug CRT for now. |
17 # TODO(bradnelson): Find a better way to generalize this requirement. | 17 # TODO(bradnelson): Find a better way to generalize this requirement. |
18 # NOTE: debug builds on windows break without this | 18 # NOTE: debug builds on windows break without this |
19 crt = [] | 19 crt = [] |
20 if env.AllBits('windows', 'debug'): | 20 if env.AllBits('windows', 'debug'): |
bradn
2012/08/28 21:14:10
So this crt stuff is obsolete. I should do a pass
| |
21 for i in ['.', '$STAGING_DIR']: | 21 for i in ['.', '$STAGING_DIR']: |
22 crt += env.Replicate(i, '$VC80_DIR/vc/redist/Debug_NonRedist/' | 22 crt += env.Replicate(i, '$VC80_DIR/vc/redist/Debug_NonRedist/' |
23 'x86/Microsoft.VC80.DebugCRT') | 23 'x86/Microsoft.VC80.DebugCRT') |
24 crt += env.Replicate(i, '$VC80_DIR/vc/redist/x86/Microsoft.VC80.CRT') | 24 crt += env.Replicate(i, '$VC80_DIR/vc/redist/x86/Microsoft.VC80.CRT') |
25 | 25 |
26 # Create environment for command-line tools and testing, rather than | 26 # Create environment for command-line tools and testing, rather than |
27 # part of the TCB. Then define compile-time flag that communicates | 27 # part of the TCB. Then define compile-time flag that communicates |
28 # that we are compiling in the test environment (rather than for the TCB). | 28 # that we are compiling in the test environment (rather than for the TCB). |
29 test_env = env.Clone() | 29 test_env = env.Clone() |
30 test_env.Append(CCFLAGS=['-DNACL_TRUSTED_BUT_NOT_TCB', '-DNACL_RAGEL_DECODER']) | 30 test_env.Append(CCFLAGS=['-DNACL_TRUSTED_BUT_NOT_TCB', '-DNACL_RAGEL_DECODER']) |
(...skipping 10 matching lines...) Expand all Loading... | |
41 test_env.NaClTargetArchSuffix('nc_opcode_modeling_verbose'), | 41 test_env.NaClTargetArchSuffix('nc_opcode_modeling_verbose'), |
42 test_env.NaClTargetArchSuffix('nc_opcode_modeling'), | 42 test_env.NaClTargetArchSuffix('nc_opcode_modeling'), |
43 test_env.NaClTargetArchSuffix('ncdis_decode_tables'), | 43 test_env.NaClTargetArchSuffix('ncdis_decode_tables'), |
44 test_env.NaClTargetArchSuffix('ncval_base_verbose'), | 44 test_env.NaClTargetArchSuffix('ncval_base_verbose'), |
45 test_env.NaClTargetArchSuffix('ncval_base'), | 45 test_env.NaClTargetArchSuffix('ncval_base'), |
46 'validators', | 46 'validators', |
47 env.NaClTargetArchSuffix('ncvalidate'), | 47 env.NaClTargetArchSuffix('ncvalidate'), |
48 env.NaClTargetArchSuffix('dfa_validate_caller'), | 48 env.NaClTargetArchSuffix('dfa_validate_caller'), |
49 'platform', 'gio', 'utils', | 49 'platform', 'gio', 'utils', |
50 ]) | 50 ]) |
51 env.Requires(vdiff, crt) | |
51 | 52 |
52 env.Requires(vdiff, crt) | 53 if env.Bit('target_x86_64'): |
54 node = env.CommandTest( | |
55 'vdiff.out', command=[vdiff, '--easydiff'], | |
56 stdout_golden=test_env.File('vdiff_x86_64_baseline.out'), | |
57 time_warning=800, time_error=2000) | |
58 env.AddNodeToTestSuite(node, ['validator_diff_tests'], 'vdiff_test') | |
Karl
2012/08/28 21:23:52
Should there be a blank line here for readability?
Brad Chen
2012/08/28 22:09:42
Done.
| |
59 if env.Bit('target_x86_32'): | |
60 # No golden output for 32-bit until more diffs are fixed | |
61 node = env.CommandTest('vdiff.out', command=[vdiff], | |
62 time_warning=800, time_error=2000) | |
63 env.AddNodeToTestSuite(node, ['validator_diff_tests'], 'vdiff_test') | |
OLD | NEW |