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

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

Issue 26971007: Remove canned hello_world binary (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: Update. Created 7 years, 2 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
« no previous file with comments | « no previous file | src/trusted/service_runtime/testdata/arm/hello_world.nexe » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/build.scons
diff --git a/src/trusted/service_runtime/build.scons b/src/trusted/service_runtime/build.scons
index c2c14a62dba24869488d0895426926e22f831d9d..4a2cfe930e3d2eb8ed3b9d7b801a619316d8a3db 100644
--- a/src/trusted/service_runtime/build.scons
+++ b/src/trusted/service_runtime/build.scons
@@ -554,10 +554,13 @@ elif env.Bit('target_x86_64'):
else:
arch_testdata_dir = 'testdata/' + env['TARGET_ARCHITECTURE']
+untrusted_env = env.MakeUntrustedNativeEnv()
+hello_world_nexe = untrusted_env.File('$STAGING_DIR/hello_world.nexe')
# Doesn't work on windows under coverage.
# TODO(bradnelson): fix this to work on windows under coverage.
-if not env.Bit('windows') or not env.Bit('coverage_enabled'):
+if ((not env.Bit('windows') or not env.Bit('coverage_enabled')) and
+ env.Bit('nacl_static_link')):
# NOTE: uses validator
mmap_test_objs = [env.ComponentObject('mmap_test.c')]
mmap_test_exe = env.ComponentProgram(
@@ -580,8 +583,7 @@ if not env.Bit('windows') or not env.Bit('coverage_enabled'):
'sel_test',
])
- mmap_test_file = env.File(arch_testdata_dir + '/hello_world.nexe')
- mmap_test_command = env.AddBootstrap(mmap_test_exe, [mmap_test_file])
+ mmap_test_command = env.AddBootstrap(mmap_test_exe, [hello_world_nexe])
# TODO(robertm): This test emits lots of messages to stderr
node = env.CommandTest (
@@ -800,37 +802,21 @@ env.AddNodeToTestSuite(node, ['small_tests'], 'run_sel_ldr_exe_not_found_test')
# Check that "-F" makes sel_ldr stop after loading the nexe but before running
# it.
-if not env.Bit('bitcode') or env.Bit('target_mips32'):
- untrusted_env = env.MakeUntrustedNativeEnv()
- nullptr_src = env.File('${MAIN_DIR}/tests/nullptr/nullptr.c')
- nullptr_obj = untrusted_env.ComponentObject('nullptr', nullptr_src)
- nullptr_nexe = untrusted_env.ComponentProgram('nullptr', nullptr_obj)
+nullptr_nexe = untrusted_env.GetTranslatedNexe(
+ untrusted_env.File('$STAGING_DIR/nullptr$PROGSUFFIX'))
- node = env.CommandSelLdrTestNacl(
- 'fuzz_nullptr_test.out',
- nullptr_nexe,
- sel_ldr_flags=['-F'])
- env.AddNodeToTestSuite(node, ['small_tests'], 'run_fuzz_nullptr_test')
-
-# ----------------------------------------------------------
-# Small tests with canned binaries
-# ----------------------------------------------------------
-
-if env.Bit('target_x86_64'):
- node = env.CommandSelLdrTestNacl(
- 'hello_x32.out',
- env.File(os.path.join(arch_testdata_dir, 'hello_x32.nexe')),
- stdout_golden=env.File(os.path.join('${MAIN_DIR}',
- 'tests/hello_world',
- 'hello_world.stdout'))
- )
- env.AddNodeToTestSuite(node, ['small_tests'], 'run_hello_x32_test')
-
-# Test canned hello_world binary with obsolete, non-ragel based validator.
-if not env.Bit('validator_ragel') and env.Bit('target_x86'):
+node = env.CommandSelLdrTestNacl(
+ 'fuzz_nullptr_test.out',
+ nullptr_nexe,
+ sel_ldr_flags=['-F'])
+env.AddNodeToTestSuite(node, ['small_tests'], 'run_fuzz_nullptr_test')
+
+# Test hello_world binary with obsolete, non-ragel based validator.
+if (not env.Bit('validator_ragel') and env.Bit('target_x86')
+ and env.Bit('nacl_static_link')):
node = env.CommandSelLdrTestNacl(
'dfa_hwd.out',
- env.File(arch_testdata_dir + '/hello_world.nexe'),
+ hello_world_nexe,
stdout_golden = env.File('testdata/hello_world.stdout'),
stderr_golden = env.File('testdata/non_dfa_validator_hello.stderr'),
filter_regex = '"^(Hello, World!)$' + '|' +
@@ -845,7 +831,6 @@ if env.Bit('target_mips32'):
# Use arbitrary non-page-aligned addresses for data and rodata.
rodata_region_start = 0x10020094
data_region_start = 0x10030098
- untrusted_env = env.MakeUntrustedNativeEnv()
untrusted_env.Append(CPPFLAGS=['--pnacl-allow-native', '-arch', 'mips32'])
unaligned_data_objs = untrusted_env.ComponentObject(
'arch/mips/unaligned_data_test.S')
@@ -887,6 +872,20 @@ node = env.CommandSelLdrTestNacl(
env.AddNodeToTestSuite(node, ['small_tests'], 'run_unaligned_data_irt_test')
# ----------------------------------------------------------
+# Small tests with canned binaries
+# ----------------------------------------------------------
+
+if env.Bit('target_x86_64'):
+ node = env.CommandSelLdrTestNacl(
+ 'hello_x32.out',
+ env.File(os.path.join(arch_testdata_dir, 'hello_x32.nexe')),
+ stdout_golden=env.File(os.path.join('${MAIN_DIR}',
+ 'tests/hello_world',
+ 'hello_world.stdout'))
+ )
+ env.AddNodeToTestSuite(node, ['small_tests'], 'run_hello_x32_test')
+
+# ----------------------------------------------------------
# Integration Tests With Canned x86 Binaries
# ----------------------------------------------------------
# To update the canned tests run:
@@ -919,13 +918,13 @@ def AddIntegrationTest(test, location):
['medium_tests'],
'run_%s_integration_test' % test)
-if env.Bit('target_x86'):
+if env.Bit('target_x86') and env.Bit('nacl_static_link'):
RE_HELLO = '^(Hello, World!)$'
RE_IDENT = '^\[[0-9,:.]*\] (e_ident\+1 = ELF)$'
node = env.CommandSelLdrTestNacl(
'nacl_log.out',
- env.File(arch_testdata_dir + '/hello_world.nexe'),
+ hello_world_nexe,
log_golden = env.File('testdata/hello_world.log'),
stdout_golden = env.File('testdata/hello_world.stdout'),
filter_regex = '"' + RE_HELLO + '|' + RE_IDENT + '"',
« no previous file with comments | « no previous file | src/trusted/service_runtime/testdata/arm/hello_world.nexe » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698