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

Side by Side Diff: SConstruct

Issue 7242011: Get rid of assumptions about ".nexe" extension. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | site_scons/site_tools/component_builders.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- python -*- 1 # -*- python -*-
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 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 import atexit 6 import atexit
7 import glob 7 import glob
8 import os 8 import os
9 import platform 9 import platform
10 import stat 10 import stat
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 1113
1114 command = [validator] + validator_flags + [image] 1114 command = [validator] + validator_flags + [image]
1115 return CommandTest(env, name, command, size, **extra) 1115 return CommandTest(env, name, command, size, **extra)
1116 1116
1117 pre_base_env.AddMethod(CommandValidatorTestNacl) 1117 pre_base_env.AddMethod(CommandValidatorTestNacl)
1118 1118
1119 1119
1120 def ExtractPublishedFiles(env, target_name): 1120 def ExtractPublishedFiles(env, target_name):
1121 run_files = ['$STAGING_DIR/' + os.path.basename(published_file.path) 1121 run_files = ['$STAGING_DIR/' + os.path.basename(published_file.path)
1122 for published_file in env.GetPublished(target_name, 'run')] 1122 for published_file in env.GetPublished(target_name, 'run')]
1123 nexe = '$STAGING_DIR/' + target_name 1123 nexe = '$STAGING_DIR/%s${PROGSUFFIX}' % target_name
1124 return [env.File(file) for file in run_files + [nexe]] 1124 return [env.File(file) for file in run_files + [nexe]]
1125 1125
1126 pre_base_env.AddMethod(ExtractPublishedFiles) 1126 pre_base_env.AddMethod(ExtractPublishedFiles)
1127 1127
1128 1128
1129 # ---------------------------------------------------------- 1129 # ----------------------------------------------------------
1130 EXTRA_ENV = ['XAUTHORITY', 'HOME', 'DISPLAY', 'SSH_TTY', 'KRB5CCNAME'] 1130 EXTRA_ENV = ['XAUTHORITY', 'HOME', 'DISPLAY', 'SSH_TTY', 'KRB5CCNAME']
1131 1131
1132 def SetupBrowserEnv(env): 1132 def SetupBrowserEnv(env):
1133 for var_name in EXTRA_ENV: 1133 for var_name in EXTRA_ENV:
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 1436
1437 gdb = nacl_extra_sdk_env['GDB'] 1437 gdb = nacl_extra_sdk_env['GDB']
1438 command = ([gdb, '-q', '-batch', '-x', input, '--loader', sel_ldr] + 1438 command = ([gdb, '-q', '-batch', '-x', input, '--loader', sel_ldr] +
1439 gdb_flags + command) 1439 gdb_flags + command)
1440 1440
1441 return CommandTest(env, name, command, 'large', **extra) 1441 return CommandTest(env, name, command, 'large', **extra)
1442 1442
1443 pre_base_env.AddMethod(CommandGdbTestNacl) 1443 pre_base_env.AddMethod(CommandGdbTestNacl)
1444 1444
1445 1445
1446 def SelUniversalTest(env, name, command, sel_universal_flags=None, **kwargs): 1446 def SelUniversalTest(env, name, nexe, sel_universal_flags=None, **kwargs):
1447 # The dynamic linker's ability to receive arguments over IPC at 1447 # The dynamic linker's ability to receive arguments over IPC at
1448 # startup currently requires it to reject the plugin's first 1448 # startup currently requires it to reject the plugin's first
1449 # connection, but this interferes with the sel_universal-based 1449 # connection, but this interferes with the sel_universal-based
1450 # testing because sel_universal does not retry the connection. 1450 # testing because sel_universal does not retry the connection.
1451 # TODO(mseaborn): Fix by retrying the connection or by adding an 1451 # TODO(mseaborn): Fix by retrying the connection or by adding an
1452 # option to ld.so to disable its argv-over-IPC feature. 1452 # option to ld.so to disable its argv-over-IPC feature.
1453 if env.Bit('nacl_glibc') and not env.Bit('nacl_static_link'): 1453 if env.Bit('nacl_glibc') and not env.Bit('nacl_static_link'):
1454 return [] 1454 return []
1455 1455
1456 if sel_universal_flags is None: 1456 if sel_universal_flags is None:
1457 sel_universal_flags = [] 1457 sel_universal_flags = []
1458 1458
1459 # when run under qemu, sel_universal must sneeak in qemu to execv 1459 # when run under qemu, sel_universal must sneeak in qemu to execv
1460 # call that spawns sel_ldr. 1460 # call that spawns sel_ldr.
1461 if env.Bit('target_arm') and env.UsingEmulator(): 1461 if env.Bit('target_arm') and env.UsingEmulator():
1462 sel_universal_flags.append('--command_prefix') 1462 sel_universal_flags.append('--command_prefix')
1463 sel_universal_flags.append(env['EMULATOR']) 1463 sel_universal_flags.append(env['EMULATOR'])
1464 1464
1465 node = CommandSelLdrTestNacl(env, 1465 node = CommandSelLdrTestNacl(env,
1466 name, 1466 name,
1467 command, 1467 nexe,
1468 loader='sel_universal', 1468 loader='sel_universal',
1469 sel_ldr_flags=sel_universal_flags, 1469 sel_ldr_flags=sel_universal_flags,
1470 **kwargs) 1470 **kwargs)
1471 # sel_universal locates sel_ldr via /proc/self/exe on Linux. 1471 # sel_universal locates sel_ldr via /proc/self/exe on Linux.
1472 if not env.Bit('built_elsewhere'): 1472 if not env.Bit('built_elsewhere'):
1473 env.Depends(node, GetSelLdr(env)) 1473 env.Depends(node, GetSelLdr(env))
1474 return node 1474 return node
1475 1475
1476 pre_base_env.AddMethod(SelUniversalTest) 1476 pre_base_env.AddMethod(SelUniversalTest)
1477 1477
(...skipping 20 matching lines...) Expand all
1498 extra['osenv'] = extra.get('osenv', []) + extra_env 1498 extra['osenv'] = extra.get('osenv', []) + extra_env
1499 1499
1500 pre_base_env.AddMethod(MakeVerboseExtraOptions) 1500 pre_base_env.AddMethod(MakeVerboseExtraOptions)
1501 1501
1502 def ShouldUseVerboseOptions(extra): 1502 def ShouldUseVerboseOptions(extra):
1503 """ Heuristic for setting up Verbose NACLLOG options. """ 1503 """ Heuristic for setting up Verbose NACLLOG options. """
1504 return ('process_output' in extra or 1504 return ('process_output' in extra or
1505 'log_golden' in extra) 1505 'log_golden' in extra)
1506 1506
1507 # ---------------------------------------------------------- 1507 # ----------------------------------------------------------
1508 def CommandSelLdrTestNacl(env, name, command, 1508 def CommandSelLdrTestNacl(env, name, nexe,
1509 args = None,
1509 log_verbosity=2, 1510 log_verbosity=2,
1510 sel_ldr_flags=None, 1511 sel_ldr_flags=None,
1511 loader='sel_ldr', 1512 loader='sel_ldr',
1512 size='medium', 1513 size='medium',
1513 # True for *.nexe statically linked with glibc 1514 # True for *.nexe statically linked with glibc
1514 glibc_static=False, 1515 glibc_static=False,
1515 uses_ppapi=False, 1516 uses_ppapi=False,
1516 **extra): 1517 **extra):
1517 # Disable all sel_ldr tests for windows under coverage. 1518 # Disable all sel_ldr tests for windows under coverage.
1518 # Currently several .S files block sel_ldr from being instrumented. 1519 # Currently several .S files block sel_ldr from being instrumented.
1519 # See http://code.google.com/p/nativeclient/issues/detail?id=831 1520 # See http://code.google.com/p/nativeclient/issues/detail?id=831
1520 if ('TRUSTED_ENV' in env and 1521 if ('TRUSTED_ENV' in env and
1521 env['TRUSTED_ENV'].Bit('coverage_enabled') and 1522 env['TRUSTED_ENV'].Bit('coverage_enabled') and
1522 env['TRUSTED_ENV'].Bit('windows')): 1523 env['TRUSTED_ENV'].Bit('windows')):
1523 return [] 1524 return []
1524 1525
1526 command = [nexe]
1527 if args is not None:
1528 command += args
1529
1525 sel_ldr = GetSelLdr(env, loader); 1530 sel_ldr = GetSelLdr(env, loader);
1526 if not sel_ldr: 1531 if not sel_ldr:
1527 print 'WARNING: no sel_ldr found. Skipping test %s' % name 1532 print 'WARNING: no sel_ldr found. Skipping test %s' % name
1528 return [] 1533 return []
1529 1534
1530 # Avoid problems with [] as default arguments 1535 # Avoid problems with [] as default arguments
1531 if sel_ldr_flags is None: 1536 if sel_ldr_flags is None:
1532 sel_ldr_flags = [] 1537 sel_ldr_flags = []
1533 1538
1534 # Disable the validator if running a GLibC test under Valgrind. 1539 # Disable the validator if running a GLibC test under Valgrind.
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
3153 Default(['all_programs', 'all_bundles', 'all_test_programs', 'all_libraries']) 3158 Default(['all_programs', 'all_bundles', 'all_test_programs', 'all_libraries'])
3154 3159
3155 if BROKEN_TEST_COUNT > 0: 3160 if BROKEN_TEST_COUNT > 0:
3156 msg = "There are %d broken tests." % BROKEN_TEST_COUNT 3161 msg = "There are %d broken tests." % BROKEN_TEST_COUNT
3157 if GetOption('brief_comstr'): 3162 if GetOption('brief_comstr'):
3158 msg += " Add --verbose to the command line for more information." 3163 msg += " Add --verbose to the command line for more information."
3159 print msg 3164 print msg
3160 3165
3161 # separate warnings from actual build output 3166 # separate warnings from actual build output
3162 Banner('B U I L D - O U T P U T:') 3167 Banner('B U I L D - O U T P U T:')
OLDNEW
« no previous file with comments | « no previous file | site_scons/site_tools/component_builders.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698