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.
scripts: add wait script for watching run
While using teuthology-suite with --wait option it is usefull sometimes to split the suite scheduling and the run waiting. For example, when using tools like Jenkins we might want to schedule a suite, report about successful schedule and start waiting only in the next steps. Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
- Loading branch information
Kyr Shatskyy
committed
Dec 11, 2020
1 parent
1c641e9
commit 20ce419
Showing
2 changed files
with
33 additions
and
1 deletion.
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