@@ -93,12 +93,24 @@ def check_test_file(test_file, existing_swift_features):
93
93
94
94
for feature in enabled_features .difference (existing_swift_features ):
95
95
enabled_features .remove (feature )
96
- print (f"error: { test_file } : Unknown feature in RUN line: { feature } " )
96
+
97
+ # Be careful to not use RUN with a colon after it or Lit will pick
98
+ # it up.
99
+ print (
100
+ f"{ test_file } : error: unknown feature '{ feature } ' enabled in 'RUN"
101
+ + ":' line"
102
+ )
97
103
had_error = True
98
104
99
105
for feature in required_features .difference (existing_swift_features ):
100
106
required_features .remove (feature )
101
- print (f"error: { test_file } : Unknown feature in REQUIRES line: { feature } " )
107
+
108
+ # Be careful to not use REQUIRES with a colon after it or Lit will pick
109
+ # it up.
110
+ print (
111
+ f"{ test_file } : error: unknown feature '{ feature } ' in 'REQUIRES"
112
+ + f":' line: swift_feature_{ feature } "
113
+ )
102
114
had_error = True
103
115
104
116
# If the sets are equal, we're fine.
@@ -110,12 +122,15 @@ def check_test_file(test_file, existing_swift_features):
110
122
for feature in enabled_features .difference (required_features ):
111
123
# Be careful to not use REQUIRES with a colon after it or Lit will pick
112
124
# it up.
113
- print (f"error: { test_file } : Missing 'REQUIRES" + f": swift_feature_{ feature } '" )
125
+ print (
126
+ f"{ test_file } : error: file enables '{ feature } ' but is missing '// REQUIRES"
127
+ + f": swift_feature_{ feature } '"
128
+ )
114
129
had_error = True
115
130
116
131
for feature in required_features .difference (enabled_features ):
117
132
print (
118
- f"error: { test_file } : Missing '-enable-(experimental|upcoming)- feature: { feature } '"
133
+ f"{ test_file } : error: file requires 'swift_feature_ { feature } ' but does not enable ' { feature } '"
119
134
)
120
135
had_error = True
121
136
0 commit comments