summaryrefslogtreecommitdiff
path: root/deps/gyp/test/ios/app-bundle/TestApp/check_no_signature.py
blob: 4f6e340072130b0a313bf5af1a9c73173ed1b19b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/python

import os
import subprocess
import sys

p = os.path.join(os.environ['BUILT_PRODUCTS_DIR'],os.environ['EXECUTABLE_PATH'])
proc = subprocess.Popen(['codesign', '-v', p],
                        stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
o = proc.communicate()[0].strip()
if "code object is not signed at all" not in o:
  sys.stderr.write('File should not already be signed.')
  sys.exit(1)