@@ -8,7 +8,9 @@ skipsdist = true
8
8
# basepython = python3.8
9
9
install_command = pip install {opts} {packages}
10
10
skip_install = true
11
- envdir = {toxinidir}/.env
11
+
12
+ [testenv:{tests,clang,ctest,bionic,lcov,lint,grind,clean,cover}]
13
+ envdir = {toxworkdir}/build
12
14
runner = ignore_env_name_mismatch
13
15
14
16
passenv =
@@ -20,48 +22,41 @@ passenv =
20
22
PIP_DOWNLOAD_CACHE
21
23
22
24
setenv =
23
- clang: CC = {env:CC:clang}
25
+ clang: CC = {env:CC:clang}
24
26
clang: CXX = {env:CXX:clang++}
25
27
clang: ENV_LLVM_VER = {env:ENV_LLVM_VER:15}
26
- {auto, bionic} : ENV_RIPC_RUNTIME_DIR = {env:ENV_RIPC_RUNTIME_DIR:{envtmpdir}}
28
+ bionic: ENV_RIPC_RUNTIME_DIR = {env:ENV_RIPC_RUNTIME_DIR:{envtmpdir}}
27
29
28
30
allowlist_externals =
29
- {tests,clang,ctest,bionic,lint,grind,clean,auto,autoclean,dist }: bash
31
+ {tests,clang,ctest,bionic,lint,grind,clean}: bash
30
32
{tests,clang,bionic,grind,cover}: mkdir
31
33
32
34
changedir =
33
35
{tests,bionic,clang,grind}: build
34
36
35
37
deps =
36
- pip>=21.0.1
37
- gcovr
38
- {tests,bionic,clang,ctest,grind,lcov}: lcov_cobertura
39
- {tests,bionic,clang,ctest,grind,lcov}: cmake
40
- {tests,bionic,clang,ctest,grind,lcov}: ninja
41
- {tests,bionic,clang,ctest,grind,lcov}: ValgrindCI
42
- {auto,dist,cover}: this-cli
38
+ {tests,bionic,clang,ctest,grind,lcov,lint,cover}: pip>=21.0.1
39
+ {tests,bionic,clang,ctest,grind,lcov,cover}: gcovr
40
+ {tests,bionic,clang,ctest,grind,lcov,cover}: lcov_cobertura
41
+ {tests,bionic,clang,ctest,grind,lcov,cover}: cmake
42
+ {tests,bionic,clang,ctest,grind,lcov,cover}: ninja
43
+ {tests,bionic,clang,ctest,grind,lcov,cover}: ValgrindCI
43
44
lint: cpplint
44
45
lint: beautysh
45
46
46
47
commands_pre =
47
48
bionic: mkdir -p {toxinidir}/coverage
48
49
{tests,clang,bionic,grind}: mkdir -p {toxinidir}/build
49
- {tests,clang,ctest,grind,dist }: bash -c ' {toxinidir}/scripts/run_redis.sh start > /dev/null'
50
- {tests,clang,ctest,grind,dist }: bash -c ' {toxinidir}/scripts/run_redis.sh status'
50
+ {tests,clang,ctest,grind}: bash -c ' {toxinidir}/scripts/run_redis.sh start > /dev/null'
51
+ {tests,clang,ctest,grind}: bash -c ' {toxinidir}/scripts/run_redis.sh status'
51
52
52
53
commands =
53
- # sadly this-cli cannot pass args to configure
54
- dist: this check
55
- dist: bash -c ' make clean'
56
- dist: bash -c ' make dist'
57
54
bionic: bash -c ' cmake -G {posargs:"Unix Makefiles"} -DWITH_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug ..'
58
55
bionic: bash -c ' cmake --build .'
59
- auto: bash -c ' autoreconf -fiv'
60
- auto: bash -c ' ./configure {posargs:"--with-coverage"}'
61
- {auto,bionic}: bash -c ' make cov || true'
62
- {auto,bionic}: bash -c ' RIPC_RUNTIME_DIR=$ENV_RIPC_RUNTIME_DIR {toxinidir}/scripts/run_redis.sh start > /dev/null'
63
- {auto,bionic}: bash -c ' RIPC_RUNTIME_DIR=$ENV_RIPC_RUNTIME_DIR {toxinidir}/scripts/run_redis.sh status'
64
- {auto,bionic}: bash -c ' RIPC_SERVER_PATH=$ENV_RIPC_RUNTIME_DIR/socket make cov'
56
+ bionic: bash -c ' make cov || true'
57
+ bionic: bash -c ' RIPC_RUNTIME_DIR=$ENV_RIPC_RUNTIME_DIR {toxinidir}/scripts/run_redis.sh start > /dev/null'
58
+ bionic: bash -c ' RIPC_RUNTIME_DIR=$ENV_RIPC_RUNTIME_DIR {toxinidir}/scripts/run_redis.sh status'
59
+ bionic: bash -c ' RIPC_SERVER_PATH=$ENV_RIPC_RUNTIME_DIR/socket make cov'
65
60
clang: bash -c ' cmake -DRIPC_BUILD_TESTING=ON -DCOVERAGE_BUILD=ON -DCOVERAGE_HTML=ON -DLLVM_VER=$ENV_LLVM_VER ..'
66
61
tests: bash -c ' cmake -DWITH_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug ..'
67
62
grind: bash -c ' cmake -DRIPC_BUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug ..'
@@ -70,12 +65,10 @@ commands =
70
65
clang: bash -c ' cmake --build . --target coverage'
71
66
lcov: lcov_cobertura build/coverage/lcov.info --base-dir {toxinidir} --output coverage.xml
72
67
lint: bash -c ' cpplint --output=gsed {toxinidir}/src/* {toxinidir}/inc/*'
73
- auto: gcovr --gcov-ignore-parse-errors =negative_hits.warn -s -b src/.libs/ test/
74
- auto: gcovr --xml-pretty -o coverage.xml src/.libs/ test/
75
68
{bionic,tests}: gcovr --gcov-ignore-parse-errors =negative_hits.warn -s -b -r {toxinidir} .
76
69
bionic: gcovr -r {toxinidir} --xml-pretty -o coverage.xml .
77
70
bionic: gcovr -r {toxinidir} --html --html-details -o {toxinidir}/coverage/coverage.html .
78
- {auto, bionic}: bash -c ' RIPC_RUNTIME_DIR=$ENV_RIPC_RUNTIME_DIR {toxinidir}/scripts/run_redis.sh stop'
71
+ {bionic}: bash -c ' RIPC_RUNTIME_DIR=$ENV_RIPC_RUNTIME_DIR {toxinidir}/scripts/run_redis.sh stop'
79
72
ctest: bash -c ' ctest --build-generator {posargs:"Unix Makefiles"} --build-and-test . build --build-options -DWITH_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug --test-command ctest --rerun-failed --output-on-failure -V'
80
73
ctest: gcovr --gcov-ignore-parse-errors =negative_hits.warn -s -b build/
81
74
cover: gcovr --xml-pretty -o coverage.xml build/
@@ -91,9 +84,51 @@ commands =
91
84
# xml exception (no errors in report) => junk after document element
92
85
# grind: bash -c '[[ -f command_check.xml ]] && valgrind-ci command_check.xml --number-of-errors || true'
93
86
# grind: bash -c '[[ -f command_check.xml ]] && valgrind-ci command_check.xml --summary || true'
94
- clean: bash -c ' rm -rf build/ coverage/ coverage.xml *.gcov'
95
- autoclean: bash -c ' make distclean-recursive'
96
- autoclean: bash -c ' rm -rf Makefile Makefile.in aclocal.m4 ar-lib autom4te.cache/ compile config.* coverage* configure configure~ depcomp install-sh libltdl/ ltmain.sh m4/ missing src/Makefile.in test-driver test/gmon.out test/Makefile.in'
87
+ clean: bash -c ' rm -rf build/ coverage/ coverage.xml *.gcov __pycache__/'
97
88
98
89
commands_post =
99
90
{tests,clang,ctest,grind,dist}: bash -c ' {toxinidir}/scripts/run_redis.sh stop > /dev/null'
91
+
92
+ [testenv:{auto,autoclean,dist}]
93
+ envdir = {toxworkdir}/auto
94
+ runner = ignore_env_name_mismatch
95
+
96
+ passenv =
97
+ pythonLocation
98
+ CC
99
+ CXX
100
+ CI
101
+ GITHUB*
102
+ PIP_DOWNLOAD_CACHE
103
+
104
+ setenv =
105
+ auto: ENV_RIPC_RUNTIME_DIR = {env:ENV_RIPC_RUNTIME_DIR:{envtmpdir}}
106
+
107
+ allowlist_externals =
108
+ {auto,autoclean,dist}: bash
109
+
110
+ deps =
111
+ {auto,autoclean,dist}: pip>=21.0.1
112
+ {auto,autoclean,dist}: this-cli
113
+ {auto,autoclean,dist}: gcovr
114
+
115
+ commands_pre =
116
+ {dist}: bash -c ' {toxinidir}/scripts/run_redis.sh start > /dev/null'
117
+ {dist}: bash -c ' {toxinidir}/scripts/run_redis.sh status'
118
+
119
+ commands =
120
+ # sadly this-cli cannot pass args to configure
121
+ dist: this check
122
+ dist: bash -c ' make clean'
123
+ dist: bash -c ' make dist'
124
+ auto: bash -c ' autoreconf -fiv'
125
+ auto: bash -c ' ./configure {posargs:"--with-coverage"}'
126
+ auto: bash -c ' make cov || true'
127
+ auto: bash -c ' RIPC_RUNTIME_DIR=$ENV_RIPC_RUNTIME_DIR {toxinidir}/scripts/run_redis.sh start > /dev/null'
128
+ auto: bash -c ' RIPC_RUNTIME_DIR=$ENV_RIPC_RUNTIME_DIR {toxinidir}/scripts/run_redis.sh status'
129
+ auto: bash -c ' RIPC_SERVER_PATH=$ENV_RIPC_RUNTIME_DIR/socket make cov'
130
+ auto: gcovr --gcov-ignore-parse-errors =negative_hits.warn -s -b src/.libs/ test/
131
+ auto: gcovr --gcov-ignore-parse-errors =negative_hits.warn --xml-pretty -o coverage.xml src/.libs/ test/
132
+ auto: bash -c ' RIPC_RUNTIME_DIR=$ENV_RIPC_RUNTIME_DIR {toxinidir}/scripts/run_redis.sh stop'
133
+ autoclean: bash -c ' make distclean-recursive'
134
+ autoclean: bash -c ' rm -rf Makefile Makefile.in aclocal.m4 ar-lib autom4te.cache/ compile config.* coverage* configure configure~ depcomp install-sh libltdl/ ltmain.sh m4/ missing src/Makefile.in test-driver test/gmon.out test/Makefile.in'
0 commit comments