Update MLIR generate-test-checks.py to add the notice from the source into the generated file
Folks may not read the source of the tool and miss these instructions.
Differential Revision: https://reviews.llvm.org/D110082
diff --git a/mlir/utils/generate-test-checks.py b/mlir/utils/generate-test-checks.py
index f619755..474f812 100755
--- a/mlir/utils/generate-test-checks.py
+++ b/mlir/utils/generate-test-checks.py
@@ -32,7 +32,14 @@
import re
import sys
-ADVERT = '// NOTE: Assertions have been autogenerated by '
+ADVERT_BEGIN = '// NOTE: Assertions have been autogenerated by '
+ADVERT_END = """
+// The script is designed to make adding checks to
+// a test case fast, it is *not* designed to be authoritative
+// about what constitutes a good test! The CHECK should be
+// minimized and named to reflect the test intent.
+"""
+
# Regex command to match an SSA identifier.
SSA_RE_STR = '[0-9]+|[a-zA-Z$._-][a-zA-Z0-9$._-]*'
@@ -172,7 +179,7 @@
# Generate a note used for the generated check file.
script_name = os.path.basename(__file__)
- autogenerated_note = (ADVERT + 'utils/' + script_name)
+ autogenerated_note = (ADVERT_BEGIN + 'utils/' + script_name + "\n" + ADVERT_END)
source_segments = None
if args.source: