Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
af2c55aa
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,发现更多精彩内容 >>
提交
af2c55aa
编写于
12月 04, 2014
作者:
L
Lucas Meneghel Rodrigues
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #288 from ldoktor/envtest
avocado.test: Support params passing to DropinTests [v2]
上级
6c16e21f
7c662c01
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
5 deletion
+11
-5
avocado/job.py
avocado/job.py
+1
-1
avocado/test.py
avocado/test.py
+3
-1
docs/source/WritingTests.rst
docs/source/WritingTests.rst
+6
-3
examples/tests/env_variables.sh
examples/tests/env_variables.sh
+1
-0
未找到文件。
avocado/job.py
浏览文件 @
af2c55aa
...
...
@@ -120,7 +120,7 @@ class TestRunner(object):
else
:
test_class
=
test
.
DropinTest
test_instance
=
test_class
(
path
=
test_path
,
test_instance
=
test_class
(
pa
rams
=
params
,
pa
th
=
test_path
,
base_logdir
=
self
.
job
.
logdir
,
job
=
self
.
job
)
...
...
avocado/test.py
浏览文件 @
af2c55aa
...
...
@@ -572,7 +572,9 @@ class DropinTest(Test):
Run the executable, and log its detailed execution.
"""
try
:
result
=
process
.
run
(
self
.
path
,
verbose
=
True
)
test_params
=
{
str
(
key
):
str
(
val
)
for
key
,
val
in
self
.
params
.
iteritems
()}
result
=
process
.
run
(
self
.
path
,
verbose
=
True
,
env
=
test_params
)
self
.
_log_detailed_cmd_info
(
result
)
except
exceptions
.
CmdError
,
details
:
self
.
_log_detailed_cmd_info
(
details
.
result
)
...
...
docs/source/WritingTests.rst
浏览文件 @
af2c55aa
...
...
@@ -646,9 +646,10 @@ This accomplishes a similar effect to the multiplex setup defined in there.
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.
Avocado exports avocado variables and multiplexed variables as BASH environment
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 and also they can modify the test parameters.
Here are the current variables that Avocado exports to the tests:
...
...
@@ -673,6 +674,8 @@ Here are the current variables that Avocado exports to the tests:
+-------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------+
| AVOCADO_TEST_SYSINFODIR | The system information directory | $HOME/logs/job-results/job-2014-09-16T14.38-ac332e6/test-results/home.rmoura.my_test.sh.1/sysinfo |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------+
| * | All variables from --multiplex-file | TIMEOUT=60; IO_WORKERS=10; VM_BYTES=512M; ... |
+-------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------+
Wrap Up
=======
...
...
examples/tests/env_variables.sh
浏览文件 @
af2c55aa
...
...
@@ -10,6 +10,7 @@ echo "Avocado Test logdir: $AVOCADO_TEST_LOGDIR"
echo
"Avocado Test logfile:
$AVOCADO_TEST_LOGFILE
"
echo
"Avocado Test outputdir:
$AVOCADO_TEST_OUTPUTDIR
"
echo
"Avocado Test sysinfodir:
$AVOCADO_TEST_SYSINFODIR
"
echo
"Custom variable:
$CUSTOM_VARIABLE
"
test
-d
"
$AVOCADO_TEST_BASEDIR
"
-a
\
-d
"
$AVOCADO_TEST_WORKDIR
"
-a
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录