Răsfoiți Sursa

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265444 91177308-0d34-0410-b5e6-96231b3b80d8
Sanjay Patel 9 ani în urmă
părinte
comite
3a27360c9d
1 a modificat fișierele cu 4 adăugiri și 3 ștergeri
  1. 4 3
      utils/update_test_checks.py

+ 4 - 3
utils/update_test_checks.py

@@ -38,6 +38,7 @@ import sys
 import tempfile
 import tempfile
 import re
 import re
 
 
+ADVERT = '; NOTE: Assertions have been autogenerated by '
 
 
 # RegEx: this is where the magic happens.
 # RegEx: this is where the magic happens.
 
 
@@ -275,8 +276,7 @@ def main():
   parser.add_argument('tests', nargs='+')
   parser.add_argument('tests', nargs='+')
   args = parser.parse_args()
   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)
   tool_basename = os.path.basename(args.tool_binary)
   if (tool_basename != "llc" and tool_basename != "opt"):
   if (tool_basename != "llc" and tool_basename != "opt"):
@@ -366,7 +366,8 @@ def main():
           is_in_function = False
           is_in_function = False
         continue
         continue
 
 
-      if input_line == autogenerated_note:
+      # Discard any previous script advertising.
+      if input_line.startswith(ADVERT):
         continue
         continue
 
 
       # If it's outside a function, it just gets copied to the output.
       # If it's outside a function, it just gets copied to the output.