diff options
author | David Greene <greened@obbligato.org> | 2010-12-21 16:55:53 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2010-12-21 16:55:53 +0000 |
commit | 4d75d80d62f52ce440e6af7821d785ab49f30ea7 (patch) | |
tree | 2430a851da27a7c30671eca02d17142b9bed8fb6 /utils/lit | |
parent | fbadcd0826c2e69ed21c2d535310ba958acb4359 (diff) | |
download | external_llvm-4d75d80d62f52ce440e6af7821d785ab49f30ea7.zip external_llvm-4d75d80d62f52ce440e6af7821d785ab49f30ea7.tar.gz external_llvm-4d75d80d62f52ce440e6af7821d785ab49f30ea7.tar.bz2 |
Fix PR 8199. This patch prepends the build tool dir to LLVM programs
being tested. This ensures that we test the tools just built and not
some random tools that might happen to be in the user's PATH. This
makes LLVM testing much more stable and predictable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r-- | utils/lit/lit/TestRunner.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py index a2f97cd..bf6eed8 100644 --- a/utils/lit/lit/TestRunner.py +++ b/utils/lit/lit/TestRunner.py @@ -8,6 +8,8 @@ import Util import platform import tempfile +import re + class InternalShellError(Exception): def __init__(self, command, message): self.command = command @@ -444,11 +446,13 @@ def parseIntegratedTestScript(test, normalize_slashes=False): if ln[ln.index('END.'):].strip() == 'END.': break - # Apply substitutions to the script. + # Apply substitutions to the script. Allow full regular + # expression syntax. Replace each matching occurrence of regular + # expression pattern a with substitution b in line ln. def processLine(ln): # Apply substitutions for a,b in substitutions: - ln = ln.replace(a,b) + ln = re.sub(a, b, ln) # Strip the trailing newline and any extra whitespace. return ln.strip() |