Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
eb39af90
A
avocado
项目概览
openeuler
/
avocado
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
avocado
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eb39af90
编写于
10月 08, 2014
作者:
L
Lucas Meneghel Rodrigues
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #233 from ruda/manpage_multiplex_filters
Manpage: Update information regarding global filters and multiplexer.
上级
a0010a6c
e0253806
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
58 addition
and
21 deletion
+58
-21
avocado/plugins/multiplexer.py
avocado/plugins/multiplexer.py
+1
-1
man/avocado.rst
man/avocado.rst
+57
-20
未找到文件。
avocado/plugins/multiplexer.py
浏览文件 @
eb39af90
...
@@ -49,7 +49,7 @@ class Multiplexer(plugin.Plugin):
...
@@ -49,7 +49,7 @@ class Multiplexer(plugin.Plugin):
help
=
'Shows the multiplex tree structure'
)
help
=
'Shows the multiplex tree structure'
)
self
.
parser
.
add_argument
(
'-c'
,
'--contents'
,
action
=
'store_true'
,
default
=
False
,
self
.
parser
.
add_argument
(
'-c'
,
'--contents'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Keep temporary files generated by tests'
)
help
=
"Shows the variant's content (variables)"
)
super
(
Multiplexer
,
self
).
configure
(
self
.
parser
)
super
(
Multiplexer
,
self
).
configure
(
self
.
parser
)
def
run
(
self
,
args
):
def
run
(
self
,
args
):
...
...
man/avocado.rst
浏览文件 @
eb39af90
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
SYNOPSIS
SYNOPSIS
========
========
avocado [-h] [-v] [-
V] [-
-logdir LOGDIR] [--loglevel LOG_LEVEL] [--plugins PLUGINS_DIR]
avocado [-h] [-v] [--logdir LOGDIR] [--loglevel LOG_LEVEL] [--plugins PLUGINS_DIR]
{run,list,sysinfo,multiplex,plugins,datadir} ...
{run,list,sysinfo,multiplex,plugins,datadir} ...
DESCRIPTION
DESCRIPTION
...
@@ -39,19 +39,25 @@ of avocado subcommands::
...
@@ -39,19 +39,25 @@ of avocado subcommands::
plugins List all plugins loaded
plugins List all plugins loaded
datadir List all relevant directories used by avocado
datadir List all relevant directories used by avocado
To get usage instructions for a given subcommand run it with `--help`. Example::
To get usage instructions for a given subcommand
,
run it with `--help`. Example::
$ avocado multiplex --help
$ avocado multiplex --help
usage: avocado multiplex [-h] [--filter-only [FILTER_ONLY [FILTER_ONLY ...]]]
usage: avocado multiplex [-h] [-t] [-c] [multiplex_file]
[--filter-out [FILTER_OUT [FILTER_OUT ...]]] [-t]
[-c]
[multiplex_file]
positional arguments:
positional arguments:
multiplex_file Path to a multiplex file
multiplex_file
Path to a multiplex file
optional arguments:
optional arguments:
-h, --help show this help message and exit
-h, --help show this help message and exit
-t, --tree Shows the multiplex tree structure
--filter-only [FILTER_ONLY [FILTER_ONLY ...]]
-c, --contents Keep temporary files generated by tests
Filter only path(s) from multiplexing
--filter-out [FILTER_OUT [FILTER_OUT ...]]
Filter out path(s) from multiplexing
-t, --tree Shows the multiplex tree structure
-c, --contents Shows the variant's content (variables)
RUNNING A TEST
RUNNING A TEST
...
@@ -191,23 +197,54 @@ A command by the same name, `multiplex`, is available on the `avocado`
...
@@ -191,23 +197,54 @@ A command by the same name, `multiplex`, is available on the `avocado`
command line tool, and enables you to see all the test scenarios that can
command line tool, and enables you to see all the test scenarios that can
be run::
be run::
$ avocado multiplex tests/sleeptest.py.data/sleeptest.yaml
$ avocado multiplex
examples/
tests/sleeptest.py.data/sleeptest.yaml
Variants generated:
Variants generated:
Variant 1: ["short={'sleep_length': 0.5}"]
Variant 1: /short
Variant 2: ["medium={'sleep_length': 1}"]
sleep_length: 0.5
Variant 3: ["long={'sleep_length': 5}"]
Variant 2: /medium
Variant 4: ["longest={'sleep_length': 10}"]
sleep_length: 1
Variant 3: /long
sleep_length: 5
Variant 4: /longest
sleep_length: 10
$ avocado run --multiplex tests/sleeptest.py.data/sleeptest.yaml sleeptest
$ avocado run --multiplex
examples/
tests/sleeptest.py.data/sleeptest.yaml sleeptest
And the output should look like::
And the output should look like::
...
JOB ID : <id>
(1/4) sleeptest.py: PASS (0.50 s)
JOB LOG : /home/<user>/avocado/job-results/job-<date-<shortid>/job.log
(2/4) sleeptest.py.1: PASS (1.00 s)
TESTS : 4
(3/4) sleeptest.py.2: PASS (5.01 s)
(1/4) sleeptest.py.1: PASS (0.50 s)
(4/4) sleeptest.py.3: PASS (10.01 s)
(2/4) sleeptest.py.2: PASS (1.00 s)
...
(3/4) sleeptest.py.3: PASS (5.01 s)
(4/4) sleeptest.py.4: PASS (10.01 s)
PASS : 4
ERROR : 0
FAIL : 0
SKIP : 0
WARN : 0
NOT FOUND : 0
TIME : 16.53 s
The `multiplex` plugin and the test runner supports two kinds of global
filters, through the command line options `--filter-only` and `--filter-out`.
The `filter-only` exclusively includes one or more paths and
the `filter-out` removes one or more paths from being processed.
From the previous example, if we are interested to use the variants `/medium`
and `longest`, we do the following command line::
$ avocado run --multiplex examples/tests/sleeptest.py.data/sleeptest.yaml sleeptest \
--filter-only /medium /longest
And if you want to remove `/small` from the variants created,
we do the following::
$ avocado run --multiplex examples/tests/sleeptest.py.data/sleeptest.yaml sleeptest \
--filter-out /medium
Note that both filters can be arranged in the same command line.
DEBUGGING BINARIES RUN AS PART OF A TEST
DEBUGGING BINARIES RUN AS PART OF A TEST
========================================
========================================
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录