|
31 | 31 |
|
32 | 32 | from acme import challenges |
33 | 33 |
|
| 34 | +# Set the environment variable RACE to anything other than 'true' to disable |
| 35 | +# race detection. This significantly speeds up integration testing cycles |
| 36 | +# locally. |
| 37 | +race_detection = True |
| 38 | +if os.environ.get('RACE', 'true') != 'true': |
| 39 | + race_detection = False |
| 40 | + |
34 | 41 | def run_client_tests(): |
35 | 42 | root = os.environ.get("CERTBOT_PATH") |
36 | 43 | assert root is not None, ( |
@@ -261,19 +268,19 @@ def main(): |
261 | 268 | now = datetime.datetime.utcnow() |
262 | 269 |
|
263 | 270 | six_months_ago = now+datetime.timedelta(days=-30*6) |
264 | | - if not startservers.start(race_detection=True, fakeclock=fakeclock(six_months_ago)): |
| 271 | + if not startservers.start(race_detection=race_detection, fakeclock=fakeclock(six_months_ago)): |
265 | 272 | raise(Exception("startservers failed (mocking six months ago)")) |
266 | 273 | v1_integration.caa_client = caa_client = chisel.make_client() |
267 | 274 | setup_six_months_ago() |
268 | 275 | startservers.stop() |
269 | 276 |
|
270 | 277 | twenty_days_ago = now+datetime.timedelta(days=-20) |
271 | | - if not startservers.start(race_detection=True, fakeclock=fakeclock(twenty_days_ago)): |
| 278 | + if not startservers.start(race_detection=race_detection, fakeclock=fakeclock(twenty_days_ago)): |
272 | 279 | raise(Exception("startservers failed (mocking twenty days ago)")) |
273 | 280 | setup_twenty_days_ago() |
274 | 281 | startservers.stop() |
275 | 282 |
|
276 | | - if not startservers.start(race_detection=True, fakeclock=None): |
| 283 | + if not startservers.start(race_detection=race_detection, fakeclock=None): |
277 | 284 | raise(Exception("startservers failed")) |
278 | 285 |
|
279 | 286 | if args.run_chisel: |
|
0 commit comments