mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Revert 122341. It breaks some darwin tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122346 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -376,11 +376,6 @@ clang/test directory. </p>
|
|||||||
shell. Consequently the syntax differs from normal shell script syntax in a
|
shell. Consequently the syntax differs from normal shell script syntax in a
|
||||||
few ways. You can specify as many RUN lines as needed.</p>
|
few ways. You can specify as many RUN lines as needed.</p>
|
||||||
|
|
||||||
<p>lit performs substitution on each RUN line to replace LLVM tool
|
|
||||||
names with the full paths to the executable built for each tool (in
|
|
||||||
$(LLVM_OBJ_ROOT)/$(BuildMode)/bin). This ensures that lit does not
|
|
||||||
invoke any stray LLVM tools in the user's path during testing.</p>
|
|
||||||
|
|
||||||
<p>Each RUN line is executed on its own, distinct from other lines unless
|
<p>Each RUN line is executed on its own, distinct from other lines unless
|
||||||
its last character is <tt>\</tt>. This continuation character causes the RUN
|
its last character is <tt>\</tt>. This continuation character causes the RUN
|
||||||
line to be concatenated with the next one. In this way you can build up long
|
line to be concatenated with the next one. In this way you can build up long
|
||||||
|
39
test/lit.cfg
39
test/lit.cfg
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import re
|
|
||||||
|
|
||||||
# name: The name of this test suite.
|
# name: The name of this test suite.
|
||||||
config.name = 'LLVM'
|
config.name = 'LLVM'
|
||||||
@@ -149,44 +148,6 @@ for sub in ['llvmgcc', 'llvmgxx', 'emitir', 'compile_cxx', 'compile_c',
|
|||||||
else:
|
else:
|
||||||
config.substitutions.append(('%' + sub, site_exp[sub]))
|
config.substitutions.append(('%' + sub, site_exp[sub]))
|
||||||
|
|
||||||
# For each occurrence of an llvm tool name as its own word, replace it
|
|
||||||
# with the full path to the build directory holding that tool. This
|
|
||||||
# ensures that we are testing the tools just built and not some random
|
|
||||||
# tools that might happen to be in the user's PATH. Thus this list
|
|
||||||
# includes every tool placed in $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
|
|
||||||
# (llvm_tools_dir in lit parlance).
|
|
||||||
# Don't match 'bugpoint-'.
|
|
||||||
for pattern in [r"\bbugpoint\b(?!-)", r"\bclang\b",
|
|
||||||
r"\bedis\b", r"\bgold\b",
|
|
||||||
r"\bllc\b", r"\blli\b",
|
|
||||||
r"\bllvm-ar\b", r"\bllvm-as\b",
|
|
||||||
r"\bllvm-bcanalyzer\b", r"\bllvm-config\b",
|
|
||||||
r"\bllvm-diff\b", r"\bllvm-dis\b",
|
|
||||||
r"\bllvm-extract\b", r"\bllvm-ld\b",
|
|
||||||
r"\bllvm-link\b", r"\bllvm-mc\b",
|
|
||||||
r"\bllvm-nm\b", r"\bllvm-prof\b",
|
|
||||||
r"\bllvm-ranlib\b", r"\bllvm-shlib\b",
|
|
||||||
r"\bllvm-stub\b", r"\bllvm2cpp\b",
|
|
||||||
# Don't match '-llvmc'.
|
|
||||||
r"(?<!-)\bllvmc\b", r"\blto\b",
|
|
||||||
# Don't match '.opt', '-opt'
|
|
||||||
# or '^opt'.
|
|
||||||
r"\bmacho-dump\b", r"(?<!\.|-|\^)\bopt\b",
|
|
||||||
r"\btblgen\b", r"\bFileCheck\b",
|
|
||||||
r"\bFileUpdate\b", r"\bc-index-test\b",
|
|
||||||
r"\bfpcmp\b", r"\bllvm-PerfectShuffle\b",
|
|
||||||
# Handle these specially as they are strings searched
|
|
||||||
# for during testing.
|
|
||||||
r"\| \bcount\b", r"\| \bnot\b"]:
|
|
||||||
# Extract the tool name from the pattern. This relies on the tool
|
|
||||||
# name being surrounded by \b word match operators. If the
|
|
||||||
# pattern starts with "| ", include it in the string to be
|
|
||||||
# substituted.
|
|
||||||
substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
|
|
||||||
r"\2" + llvm_tools_dir + "/" + r"\4",
|
|
||||||
pattern)
|
|
||||||
config.substitutions.append((pattern, substitution))
|
|
||||||
|
|
||||||
excludes = []
|
excludes = []
|
||||||
|
|
||||||
# Provide target_triple for use in XFAIL and XTARGET.
|
# Provide target_triple for use in XFAIL and XTARGET.
|
||||||
|
@@ -8,8 +8,6 @@ import Util
|
|||||||
import platform
|
import platform
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import re
|
|
||||||
|
|
||||||
class InternalShellError(Exception):
|
class InternalShellError(Exception):
|
||||||
def __init__(self, command, message):
|
def __init__(self, command, message):
|
||||||
self.command = command
|
self.command = command
|
||||||
@@ -446,13 +444,11 @@ def parseIntegratedTestScript(test, normalize_slashes=False):
|
|||||||
if ln[ln.index('END.'):].strip() == 'END.':
|
if ln[ln.index('END.'):].strip() == 'END.':
|
||||||
break
|
break
|
||||||
|
|
||||||
# Apply substitutions to the script. Allow full regular
|
# Apply substitutions to the script.
|
||||||
# expression syntax. Replace each matching occurrence of regular
|
|
||||||
# expression pattern a with substitution b in line ln.
|
|
||||||
def processLine(ln):
|
def processLine(ln):
|
||||||
# Apply substitutions
|
# Apply substitutions
|
||||||
for a,b in substitutions:
|
for a,b in substitutions:
|
||||||
ln = re.sub(a, b, ln)
|
ln = ln.replace(a,b)
|
||||||
|
|
||||||
# Strip the trailing newline and any extra whitespace.
|
# Strip the trailing newline and any extra whitespace.
|
||||||
return ln.strip()
|
return ln.strip()
|
||||||
|
Reference in New Issue
Block a user