forked from ceph/teuthology
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ceph#1589 from kshtsk/wip-wait
Add teuthology-wait command
- Loading branch information
Showing
3 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import docopt | ||
import sys | ||
|
||
import logging | ||
|
||
import teuthology | ||
import teuthology.suite | ||
from teuthology.config import config | ||
|
||
doc = """ | ||
usage: teuthology-wait --help | ||
teuthology-wait [-v] --run <name> | ||
Wait until run is finished. Returns exit code 0 on success, otherwise 1. | ||
Miscellaneous arguments: | ||
-h, --help Show this help message and exit | ||
-v, --verbose Be more verbose | ||
Standard arguments: | ||
-r, --run <name> Run name to watch. | ||
""" | ||
|
||
|
||
def main(argv=sys.argv[1:]): | ||
args = docopt.docopt(doc, argv=argv) | ||
if args.get('--verbose'): | ||
teuthology.log.setLevel(logging.DEBUG) | ||
name = args.get('--run') | ||
return teuthology.suite.wait(name, config.max_job_time, None) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters