Chromium Code Reviews| 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 | 6 |
| 7 import os | 7 import os |
| 8 import sys | 8 import sys |
| 9 Import('env') | 9 Import('env') |
| 10 | 10 |
| 11 | 11 |
| 12 env.ComponentLibrary(env.NaClTargetArchSuffix('ncfileutils'), ['ncfileutil.c']) | 12 env.ComponentLibrary(env.NaClTargetArchSuffix('ncfileutils'), ['ncfileutil.c']) |
| 13 | 13 |
| 14 val_lib_env = env.Clone() | 14 val_lib_env = env.Clone() |
|
Mark Seaborn
2014/10/06 17:47:55
Nit: the Clone() is not needed if the Append() is
shyamsundarr
2014/10/06 23:06:57
Done.
| |
| 15 if env.Bit('validator_ragel'): | |
| 16 val_lib_env.Append(CPPDEFINES=[['NACL_VALIDATOR_RAGEL', '1']]) | |
| 17 | 15 |
| 18 val_lib_env.ComponentLibrary('validation_cache', ['validation_cache.c']) | 16 val_lib_env.ComponentLibrary('validation_cache', ['validation_cache.c']) |
| 19 | 17 |
| 20 val_lib_env.ComponentLibrary('validators', ['validator_init.c']) | 18 val_lib_env.ComponentLibrary('validators', ['validator_init.c']) |
| 21 | 19 |
| 22 if env.Bit('target_x86') or env.Bit('target_mips32'): | 20 if env.Bit('target_x86') or env.Bit('target_mips32'): |
| 23 # TODO(ncbray) support ARM. This will require making validation caching safe | 21 # TODO(ncbray) support ARM. This will require making validation caching safe |
| 24 # for ARM and embedding ARM binary chunks in the test that can trigger various | 22 # for ARM and embedding ARM binary chunks in the test that can trigger various |
| 25 # validation scenarios. | 23 # validation scenarios. |
| 26 gtest_env = env.MakeGTestEnv() | 24 gtest_env = env.MakeGTestEnv() |
| 27 | 25 |
| 28 validation_cache_test_exe = gtest_env.ComponentProgram( | 26 validation_cache_test_exe = gtest_env.ComponentProgram( |
| 29 'validation_cache_test', | 27 'validation_cache_test', |
| 30 ['validation_cache_test.cc'], | 28 ['validation_cache_test.cc'], |
| 31 EXTRA_LIBS=['validators', 'nrd_xfer', 'validation_cache']) | 29 EXTRA_LIBS=['validators', 'nrd_xfer', 'validation_cache']) |
| 32 | 30 |
| 33 node = gtest_env.CommandTest( | 31 node = gtest_env.CommandTest( |
| 34 'validation_cache_test.out', | 32 'validation_cache_test.out', |
| 35 command=[validation_cache_test_exe]) | 33 command=[validation_cache_test_exe]) |
| 36 | 34 |
| 37 env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'], | 35 env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'], |
| 38 'run_validation_cache_test') | 36 'run_validation_cache_test') |
| OLD | NEW |