@@ -89,10 +89,14 @@ class PrCfg:
89
89
# spending huge amounts of CI time.
90
90
allow_many_extensive : bool = False
91
91
92
+ # Run tests for `libm` that may otherwise be skipped due to no changed files.
93
+ always_test_libm : bool = False
94
+
92
95
# String values of directive names
93
96
DIR_ALLOW_REGRESSIONS : str = "allow-regressions"
94
97
DIR_SKIP_EXTENSIVE : str = "skip-extensive"
95
98
DIR_ALLOW_MANY_EXTENSIVE : str = "allow-many-extensive"
99
+ DIR_TEST_LIBM : str = "test-libm"
96
100
97
101
# Default threshold
98
102
MANY_EXTENSIVE_THRESHOLD : int = 20
@@ -107,6 +111,8 @@ def __init__(self, body: str):
107
111
self .skip_extensive = True
108
112
elif name == self .DIR_ALLOW_MANY_EXTENSIVE :
109
113
self .allow_many_extensive = True
114
+ elif name == self .DIR_TEST_LIBM :
115
+ self .always_test_libm = True
110
116
else :
111
117
eprint (f"Found unexpected directive `{ name } `" )
112
118
exit (1 )
@@ -256,6 +262,10 @@ def may_skip_libm_ci(self) -> bool:
256
262
eprint ("Is a PR but couldn't load PrInfo" )
257
263
exit (1 )
258
264
265
+ # Allow opting in to libm tests
266
+ if pr .cfg .always_test_libm :
267
+ return True
268
+
259
269
# By default, run if there are any changed files matching the pattern
260
270
return all (not re .match (TRIGGER_LIBM_CI_FILE_PAT , str (f )) for f in self .changed )
261
271
0 commit comments