Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
75dfea65
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,发现更多精彩内容 >>
提交
75dfea65
编写于
1月 28, 2015
作者:
L
Lucas Meneghel Rodrigues
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs: Update GetStartedGuide with the changes on the command list
Signed-off-by:
N
Lucas Meneghel Rodrigues
<
lmr@redhat.com
>
上级
cf7d8075
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
69 addition
and
14 deletion
+69
-14
docs/source/GetStartedGuide.rst
docs/source/GetStartedGuide.rst
+69
-14
未找到文件。
docs/source/GetStartedGuide.rst
浏览文件 @
75dfea65
...
...
@@ -43,23 +43,78 @@ Using the avocado test runner
The test runner is designed to conveniently run tests on your laptop. The tests
you can run are:
* Tests written in python, using the avocado API, which we'll call `native`.
* Tests written in python, using the avocado API, which we'll call
`instrumented`.
* Any executable in your box, really. The criteria for PASS/FAIL is the return
code of the executable. If it returns 0, the test PASSed, if it returned
!= 0, it FAILed. We'll call those tests `simple tests`.
!= 0, it FAILed. We'll call those tests `simple tests`. There is another type
of tests that we'll discuss in the next section.
Native
tests
------------
Listing
tests
------------
-
Avocado looks for avocado "native" tests in some locations, the main one is in
the config file ``/etc/avocado/avocado.conf``, section ``runner``, ``test_dir``
key. You can list tests by::
The ``avocado`` command line tool also has a ``list`` command, that lists the
known tests in a given path, be it a path to an individual test, or a path
to a directory. If no arguments provided, avocado will inspect the contents
of the test location being used by avocado (if you are in doubt about which
one is that, you may use ``avocado config --datadir``). The output looks like::
$ avocado list
Tests available:
failtest
sleeptest
synctest
INSTRUMENTED /usr/share/avocado/tests/abort.py
INSTRUMENTED /usr/share/avocado/tests/datadir.py
INSTRUMENTED /usr/share/avocado/tests/doublefail.py
INSTRUMENTED /usr/share/avocado/tests/doublefree.py
INSTRUMENTED /usr/share/avocado/tests/errortest.py
INSTRUMENTED /usr/share/avocado/tests/failtest.py
INSTRUMENTED /usr/share/avocado/tests/fiotest.py
INSTRUMENTED /usr/share/avocado/tests/gdbtest.py
INSTRUMENTED /usr/share/avocado/tests/gendata.py
INSTRUMENTED /usr/share/avocado/tests/linuxbuild.py
INSTRUMENTED /usr/share/avocado/tests/multiplextest.py
INSTRUMENTED /usr/share/avocado/tests/passtest.py
INSTRUMENTED /usr/share/avocado/tests/skiptest.py
INSTRUMENTED /usr/share/avocado/tests/sleeptenmin.py
INSTRUMENTED /usr/share/avocado/tests/sleeptest.py
INSTRUMENTED /usr/share/avocado/tests/synctest.py
INSTRUMENTED /usr/share/avocado/tests/timeouttest.py
INSTRUMENTED /usr/share/avocado/tests/trinity.py
INSTRUMENTED /usr/share/avocado/tests/warntest.py
INSTRUMENTED /usr/share/avocado/tests/whiteboard.py
Here, ``INSTRUMENTED`` means that the files there are python files with an
avocado
test class in them This means those tests have access to all avocado APIs and
facilities. Let's try to list a directory with a bunch of executable shell
scripts::
$ avocado list examples/wrappers/
SIMPLE examples/wrappers/dummy.sh
SIMPLE examples/wrappers/ltrace.sh
SIMPLE examples/wrappers/perf.sh
SIMPLE examples/wrappers/strace.sh
SIMPLE examples/wrappers/time.sh
SIMPLE examples/wrappers/valgrind.sh
Here, as covered in the previous section, ``SIMPLE`` means that those files are
executables, that avocado will simply execute and return PASS or FAIL
depending on their return codes (PASS -> 0, FAIL -> any integer different
than 0). You can also provide the ``--verbose``, or ``-V`` flag to display files
that were detected but are not avocado tests, along with summary information::
$ avocado list examples/gdb-prerun-scripts/ -V
Type file
NOT_A_TEST examples/gdb-prerun-scripts/README
NOT_A_TEST examples/gdb-prerun-scripts/pass-sigusr1
SIMPLE: 0
INSTRUMENTED: 0
BUGGY: 0
MISSING: 0
NOT_A_TEST: 2
Running Tests
-------------
You can run them using the subcommand ``run``::
...
...
@@ -76,7 +131,7 @@ You can run them using the subcommand ``run``::
TIME : 1.01 s
Job ID
------
======
The Job ID is a SHA1 string that has some information encoded:
...
...
@@ -89,7 +144,7 @@ the purposes of joining on a single database results obtained by jobs run
on different systems.
Simple Tests
------------
============
You can run any number of test in an arbitrary order, as well as mix and match
native tests and simple tests::
...
...
@@ -115,7 +170,7 @@ native tests and simple tests::
TIME : 1.04 s
Debugging tests
---------------
===============
When developing new tests, you frequently want to look at the straight
output of the job log in the stdout, without having to tail the job log.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录