aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-10-28 08:51:20 -0400
committerJack Lloyd <[email protected]>2020-10-28 08:51:20 -0400
commit8f59d9a619fcfba00c6f745b834b866c05cb8909 (patch)
treeeda8c41c93db931dce9a73cb12c41ba2bc4c4aaa /src/scripts
parentad0bc8febe8b1f83cd3ace6db8bde93f0a21e8a2 (diff)
Move CI coverage build to Ubuntu 20.04
Diffstat (limited to 'src/scripts')
-rwxr-xr-xsrc/scripts/ci/setup_travis.sh5
-rw-r--r--src/scripts/ci/travis.yml3
-rwxr-xr-xsrc/scripts/ci_build.py12
3 files changed, 8 insertions, 12 deletions
diff --git a/src/scripts/ci/setup_travis.sh b/src/scripts/ci/setup_travis.sh
index 681836875..f039e574d 100755
--- a/src/scripts/ci/setup_travis.sh
+++ b/src/scripts/ci/setup_travis.sh
@@ -69,15 +69,12 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get install pylint
elif [ "$TARGET" = "coverage" ]; then
- # need updated softhsm to avoid https://github.com/opendnssec/SoftHSMv2/issues/239
- sudo add-apt-repository -y ppa:pkg-opendnssec/ppa
sudo apt-get -qq update
- sudo apt-get install softhsm2 trousers libtspi-dev lcov python-coverage libboost-all-dev golang-1.10 gdb
+ sudo apt-get install g++-8 softhsm2 libtspi-dev lcov python-coverage libboost-all-dev gdb
pip install --user codecov
git clone --depth 1 --branch runner-changes-golang1.10 https://github.com/randombit/boringssl.git
sudo chgrp -R "$(id -g)" /var/lib/softhsm/ /etc/softhsm
- sudo mkdir /var/lib/softhsm/tokens
sudo chmod g+w /var/lib/softhsm/tokens
softhsm2-util --init-token --free --label test --pin 123456 --so-pin 12345678
diff --git a/src/scripts/ci/travis.yml b/src/scripts/ci/travis.yml
index 97559c475..0c87256ca 100644
--- a/src/scripts/ci/travis.yml
+++ b/src/scripts/ci/travis.yml
@@ -14,8 +14,7 @@ jobs:
env:
- TARGET="shared"
- - dist: xenial
- name: Coverage
+ - name: Coverage
env:
- TARGET="coverage"
- CCACHE_MAXSIZE=2G
diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py
index 0eb995cf7..01e21fc7e 100755
--- a/src/scripts/ci_build.py
+++ b/src/scripts/ci_build.py
@@ -15,14 +15,12 @@ import tempfile
import optparse # pylint: disable=deprecated-module
def get_concurrency():
- """
- Get default concurrency level of build
- """
def_concurrency = 2
+ max_concurrency = 8
try:
import multiprocessing
- return multiprocessing.cpu_count()
+ return min(max_concurrency, multiprocessing.cpu_count())
except ImportError:
return def_concurrency
@@ -122,6 +120,7 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin,
if target == 'coverage':
flags += ['--with-coverage-info', '--with-debug-info', '--test-mode']
+ test_cmd += ['--skip-tests=tls_stream_integration']
if target == 'valgrind':
# valgrind in 16.04 has a bug with rdrand handling
@@ -129,6 +128,7 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin,
test_prefix = ['valgrind', '--error-exitcode=9', '-v', '--leak-check=full', '--show-reachable=yes']
# valgrind is single threaded anyway
test_cmd += ['--test-threads=1']
+ # valgrind is slow
test_cmd += essential_tests
if target == 'fuzzers':
@@ -318,7 +318,7 @@ def run_cmd(cmd, root_dir):
cwd = None
redirect_stdout = None
- if len(cmd) > 3 and cmd[-2] == '>':
+ if len(cmd) >= 3 and cmd[-2] == '>':
redirect_stdout = open(cmd[-1], 'w')
cmd = cmd[:-2]
if len(cmd) > 1 and cmd[0].startswith('indir:'):
@@ -647,7 +647,7 @@ def main(args=None):
if have_prog('codecov'):
# If codecov exists assume we are on Travis and report to codecov.io
- cmds.append(['codecov'])
+ cmds.append(['codecov', '>', 'codecov_stdout.log'])
else:
# Otherwise generate a local HTML report
cmds.append(['genhtml', cov_file, '--output-directory', 'lcov-out'])