| Index: src/trusted/validator_arm/build.scons
|
| ===================================================================
|
| --- src/trusted/validator_arm/build.scons (revision 8336)
|
| +++ src/trusted/validator_arm/build.scons (working copy)
|
| @@ -39,8 +39,12 @@
|
| return '%s/%s' % (GEN_SRC_DIR, filename)
|
|
|
| # Set of generated source files.
|
| -GEN_LIST = map(_gen_file, ['arm32_decode.cc', 'arm32_decode.h',
|
| - 'arm32_decode_named.cc' , 'arm32_decode_named.h'])
|
| +GEN_LIST = [_gen_file(x) for x in
|
| + ['arm32_decode.cc', 'arm32_decode.h',
|
| + 'arm32_decode_named.cc' ,
|
| + 'arm32_decode_named_classes.h',
|
| + 'arm32_decode_named_decoder.h',
|
| + 'arm32_decode_tests.cc']]
|
|
|
| generate = False
|
| gen_env = env.Clone();
|
| @@ -59,7 +63,10 @@
|
| 'dgen_core.py',
|
| 'dgen_input.py',
|
| 'dgen_opt.py',
|
| - 'dgen_output.py'],
|
| + 'dgen_output.py',
|
| + 'dgen_decoder_output.py',
|
| + 'dgen_test_output.py',
|
| + ],
|
| action=['${SOURCES[1].abspath} ${SOURCES[0].abspath} '
|
| '${TARGET.abspath} Arm32DecoderState'])
|
|
|
| @@ -87,15 +94,20 @@
|
|
|
| env.SDKInstallBin('ncval', ncval, target='arm')
|
|
|
| -env.ComponentProgram('address_set_test_binary',
|
| - ['address_set_test.cc'],
|
| - LIBS=['arm_validator_core',
|
| - '${OPTIONAL_COVERAGE_LIBS}'])
|
| +# Build test environment to show that we are compiling in the test
|
| +# environment (rather than for the TCB).
|
| +gtest_env = env.MakeGTestEnv()
|
| +gtest_env.Append(CCFLAGS=['-DNACL_TRUSTED_BUT_NOT_TCB'])
|
|
|
| -address_set_test = env.Command(target='address_set_test.out',
|
| - source=['address_set_test_binary'],
|
| - action=['${SOURCES[0].abspath}'])
|
| +gtest_env.ComponentProgram('address_set_test_binary',
|
| + ['address_set_test.cc'],
|
| + LIBS=['arm_validator_core',
|
| + '${OPTIONAL_COVERAGE_LIBS}'])
|
|
|
| +address_set_test = gtest_env.Command(target='address_set_test.out',
|
| + source=['address_set_test_binary'],
|
| + action=['${SOURCES[0].abspath}'])
|
| +
|
| # TODO(cbiffle): get this wrapped in QEMU.
|
| #env.AddNodeToTestSuite(address_set_test, ['small_tests'], 'address_set_test')
|
|
|
| @@ -111,20 +123,18 @@
|
| }
|
|
|
| for test, exit_status in validator_tests.iteritems():
|
| - node = env.CommandTest(
|
| + node = gtest_env.CommandTest(
|
| test + '_actual.out',
|
| - [ncval, env.File('testdata/' + test + '.nexe')],
|
| + [ncval, gtest_env.File('testdata/' + test + '.nexe')],
|
| exit_status = str(exit_status),
|
| filter_regex = "'^ncval'",
|
| # NOTE: all stdout_golden are currently empty
|
| - stdout_golden = env.File('testdata/' + test + '.out'),
|
| - stderr_golden = env.File('testdata/' + test + '.err'))
|
| + stdout_golden = gtest_env.File('testdata/' + test + '.out'),
|
| + stderr_golden = gtest_env.File('testdata/' + test + '.err'))
|
|
|
| - env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'],
|
| - "run_arm_" + test)
|
| + gtest_env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'],
|
| + "run_arm_" + test)
|
|
|
| -gtest_env = env.MakeGTestEnv()
|
| -
|
| gtest_env.ComponentLibrary('decoder_test_tools',
|
| ['decoder_tester.cc',
|
| 'inst_classes_testers.cc',
|
| @@ -145,14 +155,14 @@
|
|
|
| # Test ARM (32-bit) instruction decoding.
|
| decoder_tests_exe = gtest_env.ComponentProgram(
|
| - 'decoder_tests',
|
| - ['decoder_tests.cc'],
|
| + 'arm32_decode_tests',
|
| + ['gen/arm32_decode_tests.cc'],
|
| EXTRA_LIBS=['decoder_test_tools', 'arm_validator_core'])
|
|
|
| decoder_test_node = gtest_env.CommandTest(
|
| - 'decoder_tests.out',
|
| + 'arm32_decode_tests.out',
|
| command=[decoder_tests_exe],
|
| - scale_timeout=10)
|
| + scale_timeout=100)
|
|
|
| gtest_env.AddNodeToTestSuite(decoder_test_node,
|
| ['huge_tests', 'arm_decoder_tests'],
|
|
|