Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
21877980
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,发现更多精彩内容 >>
未验证
提交
21877980
编写于
12月 16, 2018
作者:
C
Cleber Rosa
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'ldoktor/inf-recursion-selftests-proper'
Signed-off-by:
N
Cleber Rosa
<
crosa@redhat.com
>
上级
1c143ea4
ea258cdd
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
107 addition
and
0 deletion
+107
-0
selftests/__init__.py
selftests/__init__.py
+16
-0
selftests/unit/test_job.py
selftests/unit/test_job.py
+5
-0
selftests/unit/test_jobdata.py
selftests/unit/test_jobdata.py
+4
-0
selftests/unit/test_jsonresult.py
selftests/unit/test_jsonresult.py
+5
-0
selftests/unit/test_loader.py
selftests/unit/test_loader.py
+6
-0
selftests/unit/test_replay.py
selftests/unit/test_replay.py
+5
-0
selftests/unit/test_runner_queue.py
selftests/unit/test_runner_queue.py
+5
-0
selftests/unit/test_safeloader.py
selftests/unit/test_safeloader.py
+5
-0
selftests/unit/test_test.py
selftests/unit/test_test.py
+6
-0
selftests/unit/test_utils_asset.py
selftests/unit/test_utils_asset.py
+5
-0
selftests/unit/test_utils_cloudinit.py
selftests/unit/test_utils_cloudinit.py
+5
-0
selftests/unit/test_utils_genio.py
selftests/unit/test_utils_genio.py
+5
-0
selftests/unit/test_utils_iso9660.py
selftests/unit/test_utils_iso9660.py
+5
-0
selftests/unit/test_utils_kernel.py
selftests/unit/test_utils_kernel.py
+5
-0
selftests/unit/test_utils_process.py
selftests/unit/test_utils_process.py
+5
-0
selftests/unit/test_utils_service.py
selftests/unit/test_utils_service.py
+5
-0
selftests/unit/test_utils_software_manager.py
selftests/unit/test_utils_software_manager.py
+5
-0
selftests/unit/test_utils_vmimage.py
selftests/unit/test_utils_vmimage.py
+5
-0
selftests/unit/test_xunit.py
selftests/unit/test_xunit.py
+5
-0
未找到文件。
selftests/__init__.py
浏览文件 @
21877980
import
logging
import
os
import
pkg_resources
import
sys
...
...
@@ -52,6 +53,21 @@ def python_module_available(module_name):
return
False
def
setup_avocado_loggers
():
"""
Setup avocado loggers to contain at least one logger
This is required for tests that directly utilize avocado.Test classes
because they require those loggers to be configured. Without this
it might (py2) result in infinite recursion while attempting to log
"No handlers could be found for logger ..." message.
"""
for
name
in
(
''
,
'avocado.test'
,
'avocado.app'
):
logger
=
logging
.
getLogger
(
name
)
if
not
logger
.
handlers
:
logger
.
handlers
.
append
(
logging
.
NullHandler
())
#: The plugin module names and directories under optional_plugins
PLUGINS
=
{
'varianter_yaml_to_mux'
:
'avocado-framework-plugin-varianter-yaml-to-mux'
,
'runner_remote'
:
'avocado-framework-plugin-runner-remote'
,
...
...
selftests/unit/test_job.py
浏览文件 @
21877980
...
...
@@ -16,6 +16,11 @@ from avocado.core import job
from
avocado.core
import
test
from
avocado.utils
import
path
as
utils_path
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
JobTest
(
unittest
.
TestCase
):
...
...
selftests/unit/test_jobdata.py
浏览文件 @
21877980
...
...
@@ -6,6 +6,10 @@ from six import PY3
from
avocado.core
import
jobdata
from
..
import
BASEDIR
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
JobdataTest
(
unittest
.
TestCase
):
...
...
selftests/unit/test_jsonresult.py
浏览文件 @
21877980
...
...
@@ -10,6 +10,11 @@ from avocado.core import job
from
avocado.core.result
import
Result
from
avocado.plugins
import
jsonresult
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
FakeJob
(
object
):
...
...
selftests/unit/test_loader.py
浏览文件 @
21877980
...
...
@@ -8,6 +8,12 @@ from avocado.core import test
from
avocado.core
import
loader
from
avocado.utils
import
script
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
#: What is commonly known as "0664" or "u=rw,g=rw,o=r"
DEFAULT_NON_EXEC_MODE
=
(
stat
.
S_IRUSR
|
stat
.
S_IWUSR
|
stat
.
S_IRGRP
|
stat
.
S_IWGRP
|
...
...
selftests/unit/test_replay.py
浏览文件 @
21877980
...
...
@@ -6,6 +6,11 @@ import unittest
from
avocado.core
import
test
from
avocado.plugins
import
replay
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
Replay
(
unittest
.
TestCase
):
...
...
selftests/unit/test_runner_queue.py
浏览文件 @
21877980
...
...
@@ -11,6 +11,11 @@ from avocado.core.result import Result
from
avocado.core.runner
import
TestRunner
from
avocado.core.tree
import
TreeNode
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
TestRunnerQueue
(
unittest
.
TestCase
):
"""
...
...
selftests/unit/test_safeloader.py
浏览文件 @
21877980
...
...
@@ -7,6 +7,11 @@ import unittest
from
avocado.core
import
safeloader
from
avocado.utils
import
script
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
KEEP_METHODS_ORDER
=
'''
from avocado import Test
...
...
selftests/unit/test_test.py
浏览文件 @
21877980
...
...
@@ -10,6 +10,12 @@ except ImportError:
from
avocado.core
import
test
,
exceptions
from
avocado.utils
import
astring
,
script
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
PASS_SCRIPT_CONTENTS
=
"""#!/bin/sh
true
"""
...
...
selftests/unit/test_utils_asset.py
浏览文件 @
21877980
...
...
@@ -6,6 +6,11 @@ import unittest
from
avocado.utils
import
asset
from
avocado.utils.filelock
import
FileLock
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
TestAsset
(
unittest
.
TestCase
):
...
...
selftests/unit/test_utils_cloudinit.py
浏览文件 @
21877980
...
...
@@ -15,6 +15,11 @@ from avocado.utils import iso9660
from
avocado.utils
import
network
from
avocado.utils
import
data_factory
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
def
has_iso_create_write
():
return
iso9660
.
iso9660
(
os
.
devnull
,
[
"create"
,
"write"
])
is
not
None
...
...
selftests/unit/test_utils_genio.py
浏览文件 @
21877980
...
...
@@ -4,6 +4,11 @@ import unittest
from
avocado.utils
import
genio
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
TestGenio
(
unittest
.
TestCase
):
def
test_check_pattern_in_directory
(
self
):
...
...
selftests/unit/test_utils_iso9660.py
浏览文件 @
21877980
...
...
@@ -14,6 +14,11 @@ except ImportError:
from
avocado.utils
import
iso9660
,
process
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
Capabilities
(
unittest
.
TestCase
):
...
...
selftests/unit/test_utils_kernel.py
浏览文件 @
21877980
...
...
@@ -2,6 +2,11 @@ import unittest
from
avocado.utils.kernel
import
KernelBuild
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
TestKernelBuild
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
selftests/unit/test_utils_process.py
浏览文件 @
21877980
...
...
@@ -19,6 +19,11 @@ from avocado.utils import path
from
six
import
string_types
,
PY2
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
def
probe_binary
(
binary
):
try
:
...
...
selftests/unit/test_utils_service.py
浏览文件 @
21877980
...
...
@@ -25,6 +25,11 @@ except ImportError:
from
avocado.utils
import
service
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
TestMultipleInstances
(
unittest
.
TestCase
):
...
...
selftests/unit/test_utils_software_manager.py
浏览文件 @
21877980
...
...
@@ -4,6 +4,11 @@ import unittest
from
avocado.utils
import
distro
from
avocado.utils
import
software_manager
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
def
apt_supported_distro
():
"""
...
...
selftests/unit/test_utils_vmimage.py
浏览文件 @
21877980
...
...
@@ -8,6 +8,11 @@ from six.moves.urllib.error import HTTPError
from
avocado.utils
import
vmimage
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
VMImage
(
unittest
.
TestCase
):
...
...
selftests/unit/test_xunit.py
浏览文件 @
21877980
...
...
@@ -21,6 +21,11 @@ from avocado.core import job
from
avocado.core.result
import
Result
from
avocado.plugins
import
xunit
from
..
import
setup_avocado_loggers
setup_avocado_loggers
()
class
ParseXMLError
(
Exception
):
pass
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录