Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
88857f15
D
Dak
项目概览
喜羊羊3508
/
Dak
9 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dak
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
88857f15
编写于
4月 12, 2019
作者:
I
Ivo De Decker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add test coverage
Based on patches by Niels Thykier to add coverage to britney.
上级
11fc5069
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
47 addition
and
3 deletion
+47
-3
.coveragerc
.coveragerc
+1
-0
.gitlab-ci.yml
.gitlab-ci.yml
+5
-1
debian/control
debian/control
+2
-0
debian/rules
debian/rules
+15
-1
debian/run-ci
debian/run-ci
+8
-0
integration-tests/dak-coverage.sh
integration-tests/dak-coverage.sh
+10
-0
setup/dak-setup.sh
setup/dak-setup.sh
+6
-1
未找到文件。
.coveragerc
浏览文件 @
88857f15
...
...
@@ -5,3 +5,4 @@ omit =
*/lib/python*/*
*/dist-packages/*
*/tests/*
source = .
.gitlab-ci.yml
浏览文件 @
88857f15
...
...
@@ -11,7 +11,10 @@ test stretch:
test buster
:
<<
:
*template
image
:
debian:buster
script
:
debian/run-ci
script
:
debian/run-ci --with-coverage
artifacts
:
paths
:
-
coverage
flake8
:
<<
:
*template
...
...
@@ -28,6 +31,7 @@ pages:
-
apt-get install -y python-epydoc
-
mkdir -p public/epydoc
-
epydoc -q --html --graph all --css blue -n DAK -o public/epydoc --include-log --show-imports dak dakweb
-
mv coverage public/coverage
artifacts
:
paths
:
-
public
...
...
debian/control
浏览文件 @
88857f15
...
...
@@ -11,11 +11,13 @@ Build-Depends: alembic,
postgresql-11-debversion | postgresql-9.6-debversion | postgresql-9.4-debversion,
python-all-dev,
python-apt,
python-coverage,
python-debian,
python-debianbts,
python-ldap,
python-psycopg2,
python-pytest,
python-pytest-cov,
python-rrdtool,
python-sqlalchemy,
python-tabulate,
...
...
debian/rules
浏览文件 @
88857f15
...
...
@@ -7,6 +7,10 @@ ifneq ($(JENKINS_EXPORTS_DIR),)
PYBUILD_EXTRA_ARGS = --junit-xml=$(JENKINS_EXPORTS_DIR)/test-results/tests.xml
endif
ifeq ($(RUN_COVERAGE),y)
PYTEST_COV_OPTIONS = --cov-branch --cov --cov-report=
endif
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifneq ($(JENKINS_EXPORTS_DIR),)
...
...
@@ -14,8 +18,18 @@ ifneq ($(JENKINS_EXPORTS_DIR),)
endif
mkdir -p debian/test-gnupghome
make -C tests/fixtures/packages
GNUPGHOME=$$(pwd)/debian/test-gnupghome py.test -v daklib tests $(PYBUILD_EXTRA_ARGS)
GNUPGHOME=$$(pwd)/debian/test-gnupghome py.test -v $(PYTEST_COV_OPTIONS) daklib tests $(PYBUILD_EXTRA_ARGS)
ifeq ($(RUN_COVERAGE),y)
python-coverage combine --append
endif
./integration-tests/run-tests
ifeq ($(RUN_COVERAGE),y)
python-coverage combine --append
python-coverage report -m
echo
python-coverage html -d coverage
endif
endif
# Replace with "debian/test-gnupghome/" in d/clean once
...
...
debian/run-ci
浏览文件 @
88857f15
...
...
@@ -16,6 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
if
[
"x
$1
"
=
"x--with-coverage"
]
;
then
RUN_COVERAGE
=
y
else
RUN_COVERAGE
=
fi
export
RUN_COVERAGE
set
-eu
if
[
!
-f
dak/dak.py
]
;
then
...
...
integration-tests/dak-coverage.sh
0 → 100755
浏览文件 @
88857f15
#!/bin/bash
# wrapper to collect coverage info when running dak
if
[
"
$RUN_COVERAGE
"
=
"y"
]
then
exec
python-coverage run
--rcfile
"
${
DAK_ROOT
}
/.coveragerc"
--parallel-mode
"
${
DAK_ROOT
}
/dak/dak.py"
"
$@
"
else
exec
"
${
DAK_ROOT
}
/dak/dak.py"
"
$@
"
fi
setup/dak-setup.sh
浏览文件 @
88857f15
...
...
@@ -75,7 +75,12 @@ dak-setup() {
(
cd
${
setupdir
}
;
./init_minimal_conf |
$USER_CMD
tee
${
DAK_CONFIG
}
>
/dev/null
)
$USER_CMD
echo
'DB::Role "dak";'
|
tee
-a
${
DAK_CONFIG
}
>
/dev/null
ln
-s
${
DAK_ROOT
}
/dak/dak.py
${
DAKBASE
}
/bin/dak
if
[[
!
-v
DAK_INTEGRATION_TEST
]]
;
then
ln
-s
${
DAK_ROOT
}
/dak/dak.py
${
DAKBASE
}
/bin/dak
else
# wrapper to collect coverage information
ln
-s
${
DAK_ROOT
}
/integration-tests/dak-coverage.sh
${
DAKBASE
}
/bin/dak
fi
# Update the database schema
$USER_CMD
${
DAK_ROOT
}
/dak/dak.py update-db
--yes
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录