commit
730933f911
5 changed files with 26 additions and 10 deletions
12
.gitignore
vendored
12
.gitignore
vendored
|
@ -1,9 +1,11 @@
|
||||||
dumb-init
|
|
||||||
dist/
|
|
||||||
*.deb
|
*.deb
|
||||||
*.egg-info
|
*.egg-info
|
||||||
.tox
|
*.gc*
|
||||||
build/
|
*.o
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
.cache
|
.cache
|
||||||
|
.tox
|
||||||
|
__pycache__/
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
dumb-init
|
||||||
|
|
|
@ -9,14 +9,12 @@ sed -E \
|
||||||
-i /etc/apt/sources.list
|
-i /etc/apt/sources.list
|
||||||
|
|
||||||
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x5BB92C09DB82666C
|
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x5BB92C09DB82666C
|
||||||
echo 'deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu xenial main' >> /etc/apt/sources.list
|
echo 'deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main' >> /etc/apt/sources.list
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
git \
|
git \
|
||||||
python2.6-dev \
|
|
||||||
python2.7-dev \
|
python2.7-dev \
|
||||||
python3.5-dev \
|
|
||||||
python3.6-dev
|
python3.6-dev
|
||||||
|
|
||||||
# We cannot use the Ubuntu versions of tox or virtualenv:
|
# We cannot use the Ubuntu versions of tox or virtualenv:
|
||||||
|
|
5
ci/gcov-build
Executable file
5
ci/gcov-build
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
envbindir="$1"
|
||||||
|
cc -c dumb-init.c -o dumb-init.o -g --coverage
|
||||||
|
cc dumb-init.o -o "${envbindir}/dumb-init" -g --coverage
|
4
ci/gcov-report
Executable file
4
ci/gcov-report
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
gcov -f dumb-init.c
|
||||||
|
grep '#####' dumb-init.c.gcov | cut -d':' -f2 | xargs echo "Missing:"
|
11
tox.ini
11
tox.ini
|
@ -1,12 +1,19 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py26,py27,py35,py36
|
envlist = py27,py36,gcov
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = -r{toxinidir}/requirements-dev.txt
|
deps = -r{toxinidir}/requirements-dev.txt
|
||||||
passenv = HOME SSH_AUTH_SOCK USER
|
passenv = SSH_AUTH_SOCK
|
||||||
commands =
|
commands =
|
||||||
python -m pytest
|
python -m pytest
|
||||||
|
|
||||||
|
[testenv:gcov]
|
||||||
|
skip_install = True
|
||||||
|
commands =
|
||||||
|
{toxinidir}/ci/gcov-build {envbindir}
|
||||||
|
{[testenv]commands}
|
||||||
|
{toxinidir}/ci/gcov-report
|
||||||
|
|
||||||
[testenv:pre-commit]
|
[testenv:pre-commit]
|
||||||
basepython = /usr/bin/python3.6
|
basepython = /usr/bin/python3.6
|
||||||
commands = pre-commit {posargs:run --all-files}
|
commands = pre-commit {posargs:run --all-files}
|
||||||
|
|
Loading…
Reference in a new issue