Created
September 30, 2018 21:35
-
-
Save azat/41ee673d2b5dec9f1ac14a5970265be2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
mkdir -p bld | |
root="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" | |
le_root=/src/le/libevent | |
cmds=( | |
"set -x" | |
"apt-get update" | |
"apt-get install -y libssl1.0.0 libarchive-dev ninja-build cmake strace" | |
# libevent | |
"cd /le/bld" | |
"cmake -DCMAKE_INSTALL_RPATH=/opt/le/lib -DCMAKE_INSTALL_PREFIX=/opt/le -DCMAKE_BUILD_TYPE=debug -G Ninja /le/src" | |
"ninja" | |
"ninja install" | |
# mesos | |
"mkdir -p /mesos/.cmake" | |
"cd /mesos/.cmake" | |
"cmake -DCMAKE_C_FLAGS=-Wno-error -DCMAKE_CXX_FLAGS=-Wno-error -DCMAKE_BUILD_TYPE=Debug -G Ninja -DENABLE_LIBEVENT=ON -DENABLE_SSL=ON -DUNBUNDLED_LIBEVENT=ON -DUNBUNDLED_LIBARCHIVE=ON -DLIBEVENT_ROOT_DIR=/opt/le .." | |
"ninja libprocess-tests" | |
"libprocess-tests --gtest_filter=SSLTest.SSLSocket --verbose" | |
) | |
cmd="$(printf -- "%s && " "${cmds[@]}")" | |
cmd+=" true" | |
opts=( | |
--cap-add=SYS_PTRACE | |
-e PATH=/mesos/.cmake/3rdparty/libprocess/src/tests:/usr/bin:/bin:/usr/sbin:/sbin | |
-v $root/bld:/le/bld | |
-v $root/mesos:/mesos | |
-v $le_root:/le/src:ro | |
--rm | |
-it | |
docker.io/tillt/mesos-debug-libevent-ubuntu18:version1 | |
bash -c "$cmd || bash" | |
) | |
docker run "${opts[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment