Lines Matching +full:- +full:- +full:porcelain
1 # coding: utf-8
42 If coverage is being run in a CI environment - this triggers trying to
46 A bool - if the tests ran successfully
114 A two-element tuple of unicode strings. The first is the name of the
116 will be one of: "ci-travis", "ci-circle", "ci-appveyor",
117 "ci-github-actions", "local"
121 return ('ci-travis', os.getenv('TRAVIS_BUILD_DIR'))
124 return ('ci-appveyor', os.getenv('APPVEYOR_BUILD_FOLDER'))
127 return ('ci-circle', os.getcwdu() if sys.version_info < (3,) else os.getcwd())
130 return ('ci-github-actions', os.getenv('GITHUB_WORKSPACE'))
140 json_data = json.loads(f.read().decode('utf-8'))
148 if env_name == 'ci-travis':
149 # http://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
150 …build_url = 'https://travis-ci.org/%s/jobs/%s' % (os.getenv('TRAVIS_REPO_SLUG'), os.getenv('TRAVIS…
163 elif env_name == 'ci-appveyor':
164 # http://www.appveyor.com/docs/environment-variables
185 elif env_name == 'ci-circle':
186 # https://circleci.com/docs/environment-variables
199 elif env_name == 'ci-github-actions':
227 git_status = _git_command(['status', '--porcelain'], root)
232 branch = _git_command(['rev-parse', '--abbrev-ref', 'HEAD'], root)
233 commit = _git_command(['rev-parse', '--verify', 'HEAD'], root)
234 tag = _git_command(['name-rev', '--tags', '--name-only', commit], root)
259 with open(os.path.join(root, 'coverage.xml'), 'r', encoding='utf-8') as f:
282 encoding = info[1] or 'utf-8'
288 'Content-Type': 'text/plain',
289 'x-amz-acl': 'public-read',
290 'x-amz-storage-class': 'REDUCED_REDUNDANCY'
298 data=payload.encode('utf-8')
313 A 2-element tuple of (stdout, stderr)
325 e = OSError('git exit code was non-zero')
328 return stdout.decode('utf-8').strip()
353 if value[0] == '"' and value[-1] == '"':
354 value = value[1:-1]
382 if os.path.exists('/etc/os-release'):
383 with open('/etc/os-release', 'r', encoding='utf-8') as f:
393 raise ValueError('No suitable version info found in /etc/os-release')
394 elif os.path.exists('/etc/lsb-release'):
395 with open('/etc/lsb-release', 'r', encoding='utf-8') as f:
400 raise ValueError('No suitable version info found in /etc/lsb-release')
455 A 2-element tuple:
456 - 0: a list of unicode strings to match against dirs
457 - 1: a list of unicode strings to match against dirs and files
468 with open(gitignore_path, 'r', encoding='utf-8') as f:
486 dir_patterns.append(line[:-1])
509 application/x-www-form-urlencoded), or a byte string of data.
518 A 3-element tuple:
519 - 0: A unicode string of the response content-type
520 - 1: A unicode string of the response encoding, or None
521 - 2: A byte string of the response body
530 data_bytes[key.encode('utf-8')] = data[key].encode('utf-8')
532 headers['Content-Type'] = 'application/x-www-form-urlencoded'
537 tempfd, tempf_path = tempfile.mkstemp('-coverage')
544 code += "$wc = New-Object Net.WebClient;"
548 …code += "[System.Text.Encoding]::GetEncoding('ISO-8859-1').GetString($wc.ResponseHeaders.ToByteArr…
551 # encoding (e.g. AE-09-3F) and they decode in python
554 [powershell_exe, '-Command', code],
559 if stdout[-2:] == b'\r\n' and b'\r\n\r\n' in stdout:
561 stdout = stdout[0:-2]
564 … stdout = parts[0] + b'\r\n\r\n' + codecs.decode(parts[1].replace(b'-', b''), 'hex_codec')
569 '--request',
571 '--location',
572 '--silent',
573 '--show-error',
574 '--include',
576 '--header', 'Expect:'
579 args.append('--header')
581 args.append('--data-binary')
604 for hline in header_block.decode('iso-8859-1').splitlines():
611 if name == 'content-type':
613 if name == 'content-length':
617 raise URLError("Error %sing %s, no content-type header:\n%s" % (method, url, stdout))
621 encoding = 'utf-8'
646 A 2-element tuple of (stdout, stderr)
659 stderr_str = stderr.decode('utf-8')
663 return _execute(params, cwd, retry, retries - 1)
666 return _execute(params, cwd, retry, retries - 1)