Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

Commit

Permalink
docker.sh: disable using tc
Browse files Browse the repository at this point in the history
It's causing issues also here. Specifically with timeouts:

https://travis-ci.org/measurement-kit/mkcurl/jobs/561065705#L333

Xref: measurement-kit/mkbuild#5
  • Loading branch information
bassosimone committed Jul 24, 2019
1 parent 20c1a8b commit ccc2826
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions MKBuild.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: mkcurl

docker: bassosimone/mk-debian
docker_tc_disabled: true

dependencies:
- github.com/adishavit/argh
Expand Down
15 changes: 11 additions & 4 deletions docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ set -x

if [ $INTERNAL -eq 0 ]; then
exec docker run --cap-add=NET_ADMIN \
--cap-add=SYS_PTRACE \
-e CODECOV_TOKEN=$CODECOV_TOKEN \
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-v "$(pwd):/mk" \
Expand All @@ -35,9 +36,6 @@ fi

env | grep -v TOKEN | sort

# Make sure we don't consume too much resources by bumping latency
tc qdisc add dev eth0 root netem delay 200ms 10ms

# Select the proper build flags depending on the build type
if [ "$BUILD_TYPE" = "asan" ]; then
export CFLAGS="-fsanitize=address -O1 -fno-omit-frame-pointer"
Expand Down Expand Up @@ -71,13 +69,22 @@ else
exit 1
fi

# Configure, make, and make check equivalent
# Configure and make equivalent
mkdir -p build/$BUILD_TYPE
cd build/$BUILD_TYPE
cmake -GNinja -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE ../../
cmake --build . -- -v

# Make sure we don't consume too much resources by bumping latency. Not all
# repositories need this feature. For them the code is commented out.
#tc qdisc add dev eth0 root netem delay 200ms 10ms

# Make check equivalent
ctest --output-on-failure -a -j8

# Stop adding latency. Commented out if we don't need it.
#tc qdisc del dev eth0 root

# Measure and possibly report the test coverage
if [ "$BUILD_TYPE" = "coverage" ]; then
lcov --directory . --capture -o lcov.info
Expand Down

0 comments on commit ccc2826

Please sign in to comment.