bpo-30764: Fix regrtest --fail-env-changed --forever (#2536)

--forever now stops if a fail changes the environment.
This commit is contained in:
Victor Stinner 2017-07-03 11:15:58 +02:00 committed by GitHub
parent 34b54873b5
commit 5e87592fd1
1 changed files with 3 additions and 1 deletions

View File

@ -415,6 +415,8 @@ class Regrtest:
yield test
if self.bad:
return
if self.ns.fail_env_changed and self.environment_changed:
return
def display_header(self):
# Print basic platform information
@ -478,7 +480,7 @@ class Regrtest:
result = "FAILURE"
elif self.interrupted:
result = "INTERRUPTED"
elif self.environment_changed and self.ns.fail_env_changed:
elif self.ns.fail_env_changed and self.environment_changed:
result = "ENV CHANGED"
else:
result = "SUCCESS"