Add --force option to test-backend.

This commit is contained in:
Steve Howell 2016-10-15 08:37:37 -07:00 committed by Tim Abbott
parent f48c5e55dc
commit 6e628e23aa
1 changed files with 9 additions and 4 deletions

View File

@ -59,6 +59,9 @@ if __name__ == "__main__":
parser.add_option('--profile', dest='profile',
action="store_true",
default=False, help='Profile test runtime.')
parser.add_option('--force', dest='force',
action="store_true",
default=False, help='Run tests despite possible problems.')
parser.add_option('--no-shallow', dest='no_shallow',
action="store_true",
default=False,
@ -124,10 +127,12 @@ if __name__ == "__main__":
else:
suites = args
ok, msg = get_provisioning_status()
if not ok:
print(msg)
sys.exit(1)
if not options.force:
ok, msg = get_provisioning_status()
if not ok:
print(msg)
print('If you really know what you are doing, use --force to run anyway.')
sys.exit(1)
if options.coverage:
import coverage