Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
ea7d6560
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,发现更多精彩内容 >>
提交
ea7d6560
编写于
8月 06, 2014
作者:
L
Lucas Meneghel Rodrigues
提交者:
Lucas Meneghel Rodrigues
8月 06, 2014
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #129 from ruda/environmenmt_variables_documentation
docs.source.WritingTests: Introduce environment variables.
上级
db96c62a
bada11a6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
32 addition
and
2 deletion
+32
-2
docs/source/WritingTests.rst
docs/source/WritingTests.rst
+32
-2
未找到文件。
docs/source/WritingTests.rst
浏览文件 @
ea7d6560
...
...
@@ -57,10 +57,10 @@ Saving test generated (custom) data
Each test instance provides a so called ``whiteboard``. It that can be accessed
through ``self.whiteboard``. This whiteboard is simply a string that will be
automatically saved to test results (as long as the output format supports it).
If you choose to save binary data to the whiteboard, it's your responsi
ti
bility to
If you choose to save binary data to the whiteboard, it's your responsibility to
encoded it first (base64 is the obvious choice).
Building on the previously demonstrated sleeptest, supose that you want to save the
Building on the previously demonstrated sleeptest, sup
p
ose that you want to save the
sleep length to be used by some other script or data analysis tool::
def action(self):
...
...
@@ -430,6 +430,36 @@ This accomplishes a similar effect to the multiplex setup defined in there.
16:14:22 test L0376 ERROR| ERROR timeouttest.1 -> TestTimeoutError: Timeout reached waiting for timeouttest to end
16:14:22 test L0363 INFO |
Environment Variables for Dropin Tests
======================================
Avocado exports some environment variables to the running test. Those variables are interesting
to drop-in tests, because they can not make use of Avocado API directly with Python,
like the native tests can do.
Here is the current variables that Avocado exports to the tests:
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
| Environemnt Variable | Meaning | Example |
+=========================+=======================================+=======================================================================+
| AVOCADO_VERSION | Version of Avocado test runner | 0.8.0 |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
| AVOCADO_TEST_BASEDIR | Base directory of Avocado tests | $HOME/Downloads/avocado-source/avocado |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
| AVOCADO_TEST_DATADIR | Data directory for the test | $AVOCADO_TEST_BASEDIR/my_test.sh.data |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
| AVOCADO_TEST_WORKDIR | Work directory for the test | /var/tmp/avocado/my_test.sh |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
| AVOCADO_TEST_SRCDIR | Source directory for the test | /var/tmp/avocado/my-test.sh/src |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
| AVOCADO_TEST_LOGDIR | Log directory for the test | $HOME/logs/run-2014-08-06-10-51.53/home.rmoura.my_test.sh.1 |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
| AVOCADO_TEST_LOGFILE | Log file for the test | $HOME/logs/run-2014-08-06-10-51.53/home.rmoura.my_test.sh.1/debug.log |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
| AVOCADO_TEST_OUTPUTDIR | Output directory for the test | $HOME/logs/run-2014-08-06-10-51.53/home.rmoura.my_test.sh.1/data |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
| AVOCADO_TEST_SYSINFODIR | The system information directory | $HOME/logs/run-2014-08-06-10-51.53/home.rmoura.my_test.sh.1/sysinfo |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------+
Wrap Up
=======
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录