OLD | NEW |
| (Empty) |
1 # -*- python -*- | |
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 | |
4 # found in the LICENSE file. | |
5 | |
6 import os | |
7 import sys | |
8 Import('env') | |
9 | |
10 # | |
11 # Build the x86 specific library. | |
12 # | |
13 if not env.Bit('target_x86'): Return() | |
14 | |
15 # Create environment for building the common library for x86 validators. | |
16 lib_env = env.Clone() | |
17 lib_env.Append(CPPPATH=['${TARGET_ROOT}']) | |
18 lib_env.FilterOut(CCFLAGS=['-Wextra', '-Wswitch-enum', '-Wsign-compare']) | |
19 | |
20 lib_env.ComponentLibrary(lib_env.NaClTargetArchSuffix('ncval_base'), [ | |
21 'error_reporter.c', | |
22 'halt_trim.c', | |
23 'ncinstbuffer.c', | |
24 'x86_insts.c', | |
25 'nc_segment.c', | |
26 ]) | |
27 | |
28 lib_env.ComponentLibrary(lib_env.NaClTargetArchSuffix('ncval_base_verbose'), [ | |
29 'error_reporter_verbose.c', | |
30 'x86_insts_verbose.c', | |
31 ]) | |
32 | |
33 #---------- UNIT TESTS --------------------------------- | |
34 | |
35 # Create an environment to run unit tests using Gtest. | |
36 gtest_env = env.MakeGTestEnv() | |
37 | |
38 # List of (unit) test file prefixes to run unit tests on. | |
39 gtest_sources = [ | |
40 'halt_trim', | |
41 'nc_remaining_memory', | |
42 'nc_inst_bytes', | |
43 ] | |
44 | |
45 for source in gtest_sources: | |
46 test_exe = gtest_env.ComponentProgram( | |
47 'x86_validator_tests_' + source, | |
48 [source+'_tests.cc'], | |
49 EXTRA_LIBS=[gtest_env.NaClTargetArchSuffix('ncvalidate')]) | |
50 test_node = gtest_env.CommandTest( | |
51 source+'Tests.out', | |
52 command=[test_exe]) | |
53 gtest_env.AddNodeToTestSuite(test_node, ['small_tests'], | |
54 'run_x86_validator_tests') | |
OLD | NEW |