From: Kyr Shatskyy Date: Sat, 16 May 2020 00:22:17 +0000 (+0200) Subject: teuthology-describe-tests: rename to teuthology-describe X-Git-Tag: 1.1.0~108^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2d9e0ec71f28b06e636312ba8718114ea0992734;p=teuthology.git teuthology-describe-tests: rename to teuthology-describe Signed-off-by: Kyr Shatskyy --- diff --git a/scripts/describe.py b/scripts/describe.py new file mode 100644 index 000000000..f229b785f --- /dev/null +++ b/scripts/describe.py @@ -0,0 +1,78 @@ +import docopt + +import teuthology.config +import teuthology.describe_tests + +doc = """ +usage: + teuthology-describe-tests -h + teuthology-describe-tests [options] [--] + +Describe the contents of a qa suite by reading 'meta' elements from +yaml files in the suite. + +The 'meta' element should contain a list with a dictionary +of key/value pairs for entries, i.e.: + +meta: +- field1: value1 + field2: value2 + field3: value3 + desc: short human-friendly description + +Fields are user-defined, and are not required to be in all yaml files. + +positional arguments: + path of qa suite + +optional arguments: + -h, --help Show this help message and exit + -f , --fields Comma-separated list of fields to + include [default: desc] + --show-facet [yes|no] List the facet of each file + [default: yes] + --format [plain|json|csv] Output format (written to stdout) + [default: plain] + +options only for describing combinations represented by a suite: + -c, --combinations Describe test combinations rather than + individual yaml fragments + -s, --summary Print summary + --filter Only list tests whose description contains + at least one of the keywords in the comma + separated keyword string specified + --filter-out Do not list tests whose description contains + any of the keywords in the comma separated + keyword string specified + --filter-all Only list tests whose description contains + each of the keywords in the comma separated + keyword string specified + -F, --filter-fragments Check fragments additionaly to descriptions + using keywords specified with 'filter', + 'filter-out' and 'filter-all' options. + -p, --print-description Print job descriptions for the suite, + used only in combination with 'summary' + -P, --print-fragments Print file list inovolved for each facet, + used only in combination with 'summary' + -l , --limit List at most this many jobs + [default: 0] + --subset Instead of listing the entire + suite, break the set of jobs into + pieces (each of which + will contain each facet at least + once) and list piece . + Listing 0/, 1/, + 2/ ... -1/ + will list all jobs in the + suite (many more than once). + -S , --seed Used for pseudo-random tests generation + involving facet whose path ends with '$' + operator, where negative value used for + a random seed + [default: -1] +""" + + +def main(): + args = docopt.docopt(doc) + teuthology.describe_tests.main(args) diff --git a/scripts/describe_tests.py b/scripts/describe_tests.py deleted file mode 100644 index f229b785f..000000000 --- a/scripts/describe_tests.py +++ /dev/null @@ -1,78 +0,0 @@ -import docopt - -import teuthology.config -import teuthology.describe_tests - -doc = """ -usage: - teuthology-describe-tests -h - teuthology-describe-tests [options] [--] - -Describe the contents of a qa suite by reading 'meta' elements from -yaml files in the suite. - -The 'meta' element should contain a list with a dictionary -of key/value pairs for entries, i.e.: - -meta: -- field1: value1 - field2: value2 - field3: value3 - desc: short human-friendly description - -Fields are user-defined, and are not required to be in all yaml files. - -positional arguments: - path of qa suite - -optional arguments: - -h, --help Show this help message and exit - -f , --fields Comma-separated list of fields to - include [default: desc] - --show-facet [yes|no] List the facet of each file - [default: yes] - --format [plain|json|csv] Output format (written to stdout) - [default: plain] - -options only for describing combinations represented by a suite: - -c, --combinations Describe test combinations rather than - individual yaml fragments - -s, --summary Print summary - --filter Only list tests whose description contains - at least one of the keywords in the comma - separated keyword string specified - --filter-out Do not list tests whose description contains - any of the keywords in the comma separated - keyword string specified - --filter-all Only list tests whose description contains - each of the keywords in the comma separated - keyword string specified - -F, --filter-fragments Check fragments additionaly to descriptions - using keywords specified with 'filter', - 'filter-out' and 'filter-all' options. - -p, --print-description Print job descriptions for the suite, - used only in combination with 'summary' - -P, --print-fragments Print file list inovolved for each facet, - used only in combination with 'summary' - -l , --limit List at most this many jobs - [default: 0] - --subset Instead of listing the entire - suite, break the set of jobs into - pieces (each of which - will contain each facet at least - once) and list piece . - Listing 0/, 1/, - 2/ ... -1/ - will list all jobs in the - suite (many more than once). - -S , --seed Used for pseudo-random tests generation - involving facet whose path ends with '$' - operator, where negative value used for - a random seed - [default: -1] -""" - - -def main(): - args = docopt.docopt(doc) - teuthology.describe_tests.main(args) diff --git a/setup.py b/setup.py index 4d562b3fc..4becb3585 100644 --- a/setup.py +++ b/setup.py @@ -127,7 +127,7 @@ setup( 'teuthology-kill = scripts.kill:main', 'teuthology-queue = scripts.queue:main', 'teuthology-prune-logs = scripts.prune_logs:main', - 'teuthology-describe-tests = scripts.describe_tests:main', + 'teuthology-describe = scripts.describe:main', ], },