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

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 8201)
+++ src/trusted/validator_arm/build.scons (working copy)
@@ -40,7 +40,8 @@
# Set of generated source files.
GEN_LIST = map(_gen_file, ['arm32_decode.cc', 'arm32_decode.h',
robertm 2012/04/11 01:28:43 use list comprehension, e.g. GEM_LIST = [_gen_fil
Karl 2012/04/16 23:18:10 Done.
- 'arm32_decode_named.cc' , 'arm32_decode_named.h'])
+ 'arm32_decode_named.cc' , 'arm32_decode_named.h',
+ 'arm32_decode_tests.cc'])
generate = False
gen_env = env.Clone();
@@ -86,15 +87,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 +116,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 +148,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'],
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