summaryrefslogtreecommitdiffstats
path: root/llvm/utils/update_test_checks.py
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-04-05 19:50:21 +0000
committerSanjay Patel <spatel@rotateright.com>2016-04-05 19:50:21 +0000
commit16be4df94c1569ff3af32a50be935671f3ea962a (patch)
tree22c828350818cb59a7ec722d74894830ab0e0da6 /llvm/utils/update_test_checks.py
parenta19af5812fad6545623739c99ed3ebfbe05cf766 (diff)
downloadbcm5719-llvm-16be4df94c1569ff3af32a50be935671f3ea962a.tar.gz
bcm5719-llvm-16be4df94c1569ff3af32a50be935671f3ea962a.zip
fixed to discard earlier advertising
Also, hardcode (there must be a better way...) the 'utils' dir in the advertisement, so it's easier to find. llvm-svn: 265444
Diffstat (limited to 'llvm/utils/update_test_checks.py')
-rwxr-xr-xllvm/utils/update_test_checks.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/utils/update_test_checks.py b/llvm/utils/update_test_checks.py
index 3a5e388e508..84bb641e23b 100755
--- a/llvm/utils/update_test_checks.py
+++ b/llvm/utils/update_test_checks.py
@@ -38,6 +38,7 @@ import sys
import tempfile
import re
+ADVERT = '; NOTE: Assertions have been autogenerated by '
# RegEx: this is where the magic happens.
@@ -275,8 +276,7 @@ def main():
parser.add_argument('tests', nargs='+')
args = parser.parse_args()
- autogenerated_note = ('; NOTE: Assertions have been autogenerated by '
- + os.path.basename(__file__))
+ autogenerated_note = (ADVERT + 'utils/' + os.path.basename(__file__))
tool_basename = os.path.basename(args.tool_binary)
if (tool_basename != "llc" and tool_basename != "opt"):
@@ -366,7 +366,8 @@ def main():
is_in_function = False
continue
- if input_line == autogenerated_note:
+ # Discard any previous script advertising.
+ if input_line.startswith(ADVERT):
continue
# If it's outside a function, it just gets copied to the output.
OpenPOWER on IntegriCloud