diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-04 21:14:13 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-04 21:14:13 +0000 |
commit | b035017e785edaad1504db930e62608b32e6b961 (patch) | |
tree | 1a7fcdc501b1ef85d4b10f2912c82b3b116d7686 /native_client_sdk | |
parent | 059cad597aa1bbce0e153b326eae9968aff59b85 (diff) | |
download | chromium_src-b035017e785edaad1504db930e62608b32e6b961.zip chromium_src-b035017e785edaad1504db930e62608b32e6b961.tar.gz chromium_src-b035017e785edaad1504db930e62608b32e6b961.tar.bz2 |
[NaCl SDK] Make verification failures a little easier to read.
BUG=245011
R=sbc@chromium.org
Review URL: https://codereview.chromium.org/16336017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204047 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-x | native_client_sdk/src/build_tools/build_sdk.py | 27 | ||||
-rw-r--r-- | native_client_sdk/src/build_tools/sdk_files.list | 9 | ||||
-rwxr-xr-x | native_client_sdk/src/build_tools/verify_filelist.py | 2 |
3 files changed, 29 insertions, 9 deletions
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py index aabd552..dc34fc4 100755 --- a/native_client_sdk/src/build_tools/build_sdk.py +++ b/native_client_sdk/src/build_tools/build_sdk.py @@ -746,9 +746,30 @@ def GenerateNotice(fileroot, output_filename='NOTICE', extra_files=None): def BuildStepVerifyFilelist(pepperdir, platform): buildbot_common.BuildStep('Verify SDK Files') - verify_filelist.Verify(platform, os.path.join(SCRIPT_DIR, 'sdk_files.list'), - pepperdir) - print 'OK' + file_list_path = os.path.join(SCRIPT_DIR, 'sdk_files.list') + try: + verify_filelist.Verify(platform, file_list_path, pepperdir) + print 'OK' + except verify_filelist.ParseException, e: + buildbot_common.ErrorExit('Parsing sdk_files.list failed:\n\n%s' % e) + except verify_filelist.VerifyException, e: + file_list_rel = os.path.relpath(file_list_path) + verify_filelist_py = os.path.splitext(verify_filelist.__file__)[0] + '.py' + verify_filelist_py = os.path.relpath(verify_filelist_py) + pepperdir_rel = os.path.relpath(pepperdir) + + msg = """\ +SDK verification failed: + +%s +Add/remove files from %s to fix. + +Run: + ./%s %s %s +to test.""" % (e, file_list_rel, verify_filelist_py, file_list_rel, + pepperdir_rel) + buildbot_common.ErrorExit(msg) + def BuildStepTarBundle(pepper_ver, tarfile): diff --git a/native_client_sdk/src/build_tools/sdk_files.list b/native_client_sdk/src/build_tools/sdk_files.list index f42e499..a39d9f7 100644 --- a/native_client_sdk/src/build_tools/sdk_files.list +++ b/native_client_sdk/src/build_tools/sdk_files.list @@ -979,13 +979,10 @@ tools/nacl_gcc.mk [linux]tools/nacl_helper_bootstrap_x86_32 [linux]tools/nacl_helper_bootstrap_x86_64 tools/nacl_llvm.mk -[linux,mac]tools/ncval -[win]tools/ncval.exe +tools/ncval${EXE_EXT} tools/oshelpers.py tools/oshelpers.pyc tools/quote.py tools/run.py -[linux,mac]tools/sel_ldr_x86_32 -[linux]tools/sel_ldr_x86_64 -[win]tools/sel_ldr_x86_32.exe -[win]tools/sel_ldr_x86_64.exe +tools/sel_ldr_x86_32${EXE_EXT} +[linux,win]tools/sel_ldr_x86_64${EXE_EXT} diff --git a/native_client_sdk/src/build_tools/verify_filelist.py b/native_client_sdk/src/build_tools/verify_filelist.py index 7b75e91..b97e420 100755 --- a/native_client_sdk/src/build_tools/verify_filelist.py +++ b/native_client_sdk/src/build_tools/verify_filelist.py @@ -37,6 +37,7 @@ class Rules(object): self.exact_filenames = set() self.filename = filename self.platform = platform + self.exe_ext = '.exe' if platform == 'win' else '' if platform not in VALID_PLATFORMS: raise ParseException(self.filename, 1, 'Unknown platform %s' % platform) @@ -67,6 +68,7 @@ class Rules(object): pattern = match.group(2) pattern = pattern.replace('${PLATFORM}', self.platform) + pattern = pattern.replace('${EXE_EXT}', self.exe_ext) if '*' in pattern: # glob pattern |