Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Unified Diff: src/trusted/validator_arm/build.scons

Issue 9960043: Finish separation of testing from sel_ldr validation. Also, automate (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator_arm/build.scons
===================================================================
--- src/trusted/validator_arm/build.scons (revision 8275)
+++ 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'])
@@ -86,15 +93,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')
@@ -110,20 +122,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',
@@ -144,12 +154,12 @@
# 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'],
robertm 2012/04/17 17:12:19 is this gen/ dir different from the one above?
Karl 2012/04/17 19:28:31 It is the same as the above. However, this generat
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)

Powered by Google App Engine
This is Rietveld 408576698