Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
3faa592d
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,发现更多精彩内容 >>
未验证
提交
3faa592d
编写于
11月 19, 2018
作者:
C
Caio Carrara
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'clebergnu/python3_default_devel'
Signed-off-by:
N
Caio Carrara
<
ccarrara@redhat.com
>
上级
88797caf
03d81fea
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
11 deletion
+15
-11
.travis.yml
.travis.yml
+4
-3
Makefile
Makefile
+6
-4
selftests/checkall
selftests/checkall
+5
-4
未找到文件。
.travis.yml
浏览文件 @
3faa592d
...
...
@@ -40,7 +40,8 @@ install:
script
:
-
|
# First cleanup the previously installed files
python setup.py develop --uninstall
PYTHON=$(which python)
$(PYTHON) setup.py develop --uninstall
BINDIR=$(dirname $(which python))
for FILE in scripts/*; do
rm $BINDIR/$(basename $FILE)
...
...
@@ -61,8 +62,8 @@ script:
echo
echo
git checkout $COMMIT || ERR=$(echo -e "$ERR\nUnable to checkout $(git log -1 --oneline $COMMIT)")
make check || ERR=$(echo -e "$ERR\nmake check of $(git log -1 --oneline) failed")
make clean
make
PYTHON=$PYTHON
check || ERR=$(echo -e "$ERR\nmake check of $(git log -1 --oneline) failed")
make
PYTHON=$PYTHON
clean
done
if [ "$ERR" ]; then
echo
...
...
Makefile
浏览文件 @
3faa592d
PYTHON
=
$(
shell
which python 2>/dev/null
||
which python3 2>/dev/null
)
ifndef
PYTHON
PYTHON
=
$(
shell
which python3 2>/dev/null
||
which python 2>/dev/null
)
endif
VERSION
=
$(
shell
$(PYTHON)
setup.py
--version
2>/dev/null
)
PYTHON_DEVELOP_ARGS
=
$(
shell
if
(
$(PYTHON)
setup.py develop
--help
2>/dev/null |
grep
-q
'\-\-user'
)
;
then
echo
"--user"
;
else
echo
""
;
fi
)
DESTDIR
=
/
...
...
@@ -130,15 +132,15 @@ smokecheck: clean develop
check
:
clean develop modules_boundaries
# Unless manually set, this is equivalent to AVOCADO_CHECK_LEVEL=0
selftests/checkall
PYTHON
=
$(PYTHON)
selftests/checkall
selftests/check_tmp_dirs
check-full
:
clean develop modules_boundaries
AVOCADO_CHECK_LEVEL
=
2 selftests/checkall
PYTHON
=
$(PYTHON)
AVOCADO_CHECK_LEVEL
=
2 selftests/checkall
selftests/check_tmp_dirs
selfcheck
:
clean modules_boundaries develop
AVOCADO_SELF_CHECK
=
1 selftests/checkall
PYTHON
=
$(PYTHON)
AVOCADO_SELF_CHECK
=
1 selftests/checkall
selftests/check_tmp_dirs
modules_boundaries
:
...
...
selftests/checkall
浏览文件 @
3faa592d
#!/bin/bash
PYTHON
=
${
PYTHON
:-
python3
}
ERR
=()
RESULTS_DIR
=
$(
./scripts/avocado config |
grep
datadir.paths.logs_dir |
awk
'{print $2}'
)
# Very basic version of expanduser
...
...
@@ -72,7 +73,7 @@ parallel_selftests() {
for
I
in
$(
seq
0
$PER_SLICE
$((${#
ALL
[@]
}
-
1
))
)
;
do
TMP
=
$(
mktemp
/tmp/avocado_parallel_unittest_output_XXXXXX
)
TMPS+
=(
"
$TMP
"
)
(
python
-m
unittest
${
ALL
[@]
:
$I
:
$PER_SLICE
}
&>
$TMP
)
&
(
$PYTHON
-m
unittest
${
ALL
[@]
:
$I
:
$PER_SLICE
}
&>
$TMP
)
&
PIDS+
=(
"
$!
"
)
sleep
0.1
done
...
...
@@ -104,8 +105,8 @@ parallel_selftests() {
if
[
${#
FAILED_ONCE
[@]
}
-gt
0
]
;
then
if
[
${#
FAILED_ONCE
[@]
}
-le
24
]
;
then
echo
${#
FAILED_ONCE
[@]
}
failed during parallel execution, trying them
in
series
echo
"
python
-m unittest --failfast
${
FAILED_ONCE
[@]
}
"
if
python
-m
unittest
--failfast
${
FAILED_ONCE
[@]
}
;
then
echo
"
$PYTHON
-m unittest --failfast
${
FAILED_ONCE
[@]
}
"
if
$PYTHON
-m
unittest
--failfast
${
FAILED_ONCE
[@]
}
;
then
echo
"All failed tests passed when executed in series"
echo
for
I
in
$(
seq
0
$((${#
PIDS
[@]
}
-
1
))
)
;
do
...
...
@@ -126,7 +127,7 @@ parallel_selftests() {
for
I
in
$(
seq
0
$((${#
PIDS
[@]
}
-
1
))
)
;
do
if
[
-e
"
${
TMPS
[
$I
]
}
"
]
;
then
echo
echo
python
-m
unittest
${
ALL
[@]
:
$((
$I
*
$PER_SLICE
))
:
$PER_SLICE
}
echo
$PYTHON
-m
unittest
${
ALL
[@]
:
$((
$I
*
$PER_SLICE
))
:
$PER_SLICE
}
cat
"
${
TMPS
[
$I
]
}
"
rm
"
${
TMPS
[
$I
]
}
"
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录