Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #! -*- python -*- | 1 #! -*- python -*- |
| 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 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 shutil | 10 import shutil |
| (...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1961 return ('process_output_single' in extra or | 1961 return ('process_output_single' in extra or |
| 1962 'log_golden' in extra) | 1962 'log_golden' in extra) |
| 1963 | 1963 |
| 1964 # ---------------------------------------------------------- | 1964 # ---------------------------------------------------------- |
| 1965 DeclareBit('tests_use_irt', 'Non-browser tests also load the IRT image', False) | 1965 DeclareBit('tests_use_irt', 'Non-browser tests also load the IRT image', False) |
| 1966 | 1966 |
| 1967 # Translate the given pexe. | 1967 # Translate the given pexe. |
| 1968 def GetTranslatedNexe(env, pexe): | 1968 def GetTranslatedNexe(env, pexe): |
| 1969 pexe_name = pexe.abspath | 1969 pexe_name = pexe.abspath |
| 1970 nexe_name = pexe_name[:pexe_name.index('.pexe')] + '.nexe' | 1970 nexe_name = pexe_name[:pexe_name.index('.pexe')] + '.nexe' |
| 1971 trans_cmd = ('${TRANSLATE} ${TRANSLATEFLAGS} -Wl,-L${LIB_DIR} %s -o %s' % | 1971 trans_cmd = ('${TRANSLATECOM} ${SOURCES} -o ${TARGET}') |
|
robertm
2012/03/15 22:58:47
the "${SOURCES} -o ${TARGET}" part
could me moved
| |
| 1972 (pexe_name, nexe_name)) | 1972 |
| 1973 return env.Command(nexe_name, pexe_name, trans_cmd) | 1973 return env.Command(target=nexe_name, source=[pexe_name], |
| 1974 action=[Action(trans_cmd, '${TRANSLATECOMSTR}')]) | |
| 1974 | 1975 |
| 1975 pre_base_env.AddMethod(GetTranslatedNexe) | 1976 pre_base_env.AddMethod(GetTranslatedNexe) |
| 1976 | 1977 |
| 1977 def CommandSelLdrTestNacl(env, name, nexe, | 1978 def CommandSelLdrTestNacl(env, name, nexe, |
| 1978 args = None, | 1979 args = None, |
| 1979 log_verbosity=2, | 1980 log_verbosity=2, |
| 1980 sel_ldr_flags=None, | 1981 sel_ldr_flags=None, |
| 1981 loader=None, | 1982 loader=None, |
| 1982 size='medium', | 1983 size='medium', |
| 1983 # True for *.nexe statically linked with glibc | 1984 # True for *.nexe statically linked with glibc |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2251 def StripExecutable(env, name, exe): | 2252 def StripExecutable(env, name, exe): |
| 2252 """StripExecutable returns a node representing the stripped version of |exe|. | 2253 """StripExecutable returns a node representing the stripped version of |exe|. |
| 2253 The stripped version will be given the basename |name|. | 2254 The stripped version will be given the basename |name|. |
| 2254 NOTE: for now this only works with the untrusted toolchain. | 2255 NOTE: for now this only works with the untrusted toolchain. |
| 2255 STRIP does not appear to be a first-class citizen in SCons and | 2256 STRIP does not appear to be a first-class citizen in SCons and |
| 2256 STRIP has only been set to point at the untrusted toolchain. | 2257 STRIP has only been set to point at the untrusted toolchain. |
| 2257 """ | 2258 """ |
| 2258 return env.Command( | 2259 return env.Command( |
| 2259 target=name, | 2260 target=name, |
| 2260 source=[exe], | 2261 source=[exe], |
| 2261 action=[Action('${STRIPCOM} ${SOURCES} -o ${TARGET}')]) | 2262 action=[Action('${STRIPCOM} ${SOURCES} -o ${TARGET}', '${STRIPCOMSTR}')]) |
| 2262 | 2263 |
| 2263 pre_base_env.AddMethod(StripExecutable) | 2264 pre_base_env.AddMethod(StripExecutable) |
| 2264 | 2265 |
| 2265 | 2266 |
| 2266 # TODO(ncbray): pretty up the log output when running this builder. | 2267 # TODO(ncbray): pretty up the log output when running this builder. |
| 2267 def DisabledCommand(target, source, env): | 2268 def DisabledCommand(target, source, env): |
| 2268 pass | 2269 pass |
| 2269 | 2270 |
| 2270 pre_base_env['BUILDERS']['DisabledCommand'] = Builder(action=DisabledCommand) | 2271 pre_base_env['BUILDERS']['DisabledCommand'] = Builder(action=DisabledCommand) |
| 2271 | 2272 |
| (...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3879 nacl_env.ValidateSdk() | 3880 nacl_env.ValidateSdk() |
| 3880 | 3881 |
| 3881 if BROKEN_TEST_COUNT > 0: | 3882 if BROKEN_TEST_COUNT > 0: |
| 3882 msg = "There are %d broken tests." % BROKEN_TEST_COUNT | 3883 msg = "There are %d broken tests." % BROKEN_TEST_COUNT |
| 3883 if GetOption('brief_comstr'): | 3884 if GetOption('brief_comstr'): |
| 3884 msg += " Add --verbose to the command line for more information." | 3885 msg += " Add --verbose to the command line for more information." |
| 3885 print msg | 3886 print msg |
| 3886 | 3887 |
| 3887 # separate warnings from actual build output | 3888 # separate warnings from actual build output |
| 3888 Banner('B U I L D - O U T P U T:') | 3889 Banner('B U I L D - O U T P U T:') |
| OLD | NEW |