mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
[LIT] Add support for UNSUPPORTED tag to TestRunner.parseIntegratedTestScript
Summary: This patch gives me just enough to leverage the existing functionality in `TestRunner` for use in `libc++` and `libc++abi` . It does the following: * Adds the `UNSUPPORTED` tag to `TestRunner.parseIntegratedTestScript`. * Allows `parseIntegratedTestScript` to return an empty script if a script is not required by the caller. Reviewers: ddunbar, EricWF Reviewed By: EricWF Subscribers: cfe-commits, llvm-commits Differential Revision: http://reviews.llvm.org/D6589 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223915 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,6 +7,15 @@ import signal
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
def to_bytes(str):
|
||||
# Encode to UTF-8 to get binary data.
|
||||
return str.encode('utf-8')
|
||||
|
||||
def to_string(bytes):
|
||||
if isinstance(bytes, str):
|
||||
return bytes
|
||||
return to_bytes(bytes)
|
||||
|
||||
def detectCPUs():
|
||||
"""
|
||||
Detects the number of CPUs on a system. Cribbed from pp.
|
||||
@@ -156,11 +165,6 @@ def executeCommand(command, cwd=None, env=None):
|
||||
if exitCode == -signal.SIGINT:
|
||||
raise KeyboardInterrupt
|
||||
|
||||
def to_string(bytes):
|
||||
if isinstance(bytes, str):
|
||||
return bytes
|
||||
return bytes.encode('utf-8')
|
||||
|
||||
# Ensure the resulting output is always of string type.
|
||||
try:
|
||||
out = to_string(out.decode('utf-8'))
|
||||
|
||||
Reference in New Issue
Block a user