forked from multipath-tcp/mptcp-upstream-virtme-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.sh
executable file
·44 lines (40 loc) · 1.4 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
VIRTME_INTERACTIVE=""
test -t 1 && VIRTME_INTERACTIVE="-t"
[ "${VIRTME_NO_INTERACTIVE}" != 1 ] && VIRTME_INTERACTIVE="-it"
# host is different if worktree are used
VIRTME_GIT_DIR="$(realpath "$(git rev-parse --git-common-dir)")"
HOME_DIR="$(realpath "$(dirname "${0}")/.home")"
docker run \
-v "${PWD}:${PWD}:rw" \
-v "${VIRTME_GIT_DIR}:${VIRTME_GIT_DIR}:ro" \
${VIRTME_PACKETDRILL_PATH:+-v "${VIRTME_PACKETDRILL_PATH}:/opt/packetdrill:rw"} \
-v "${HOME_DIR}:/root" \
-w "${PWD}" \
-e "INPUT_CLANG" \
-e "INPUT_TRACE" \
-e "INPUT_NO_BLOCK" \
-e "INPUT_RUN_LOOP_CONTINUE" \
-e "INPUT_BUILD_SKIP" \
-e "INPUT_BUILD_SKIP_PERF" \
-e "INPUT_BUILD_SKIP_SELFTESTS" \
-e "INPUT_BUILD_SKIP_PACKETDRILL" \
-e "INPUT_MAKE_ARGS" \
-e "INPUT_RUN_TESTS_ONLY" \
-e "INPUT_RUN_TESTS_EXCEPT" \
-e "INPUT_SELFTESTS_DIR" \
-e "INPUT_SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES" \
-e "INPUT_SELFTESTS_MPTCP_LIB_OVERRIDE_FLAKY" \
-e "INPUT_PACKETDRILL_NO_SYNC=${VIRTME_PACKETDRILL_PATH:+1}" \
-e "INPUT_PACKETDRILL_NO_MORE_TOLERANCE=${INPUT_PACKETDRILL_NO_MORE_TOLERANCE:-${VIRTME_PACKETDRILL_PATH:+1}}" \
-e "INPUT_PACKETDRILL_STABLE=${VIRTME_PACKETDRILL_STABLE:-0}" \
-e "INPUT_EXPECT_TIMEOUT" \
-e "INPUT_EXTRA_ENV" \
-e "VIRTME_ARCH" \
-e "COMPILER" \
--privileged \
--rm \
${VIRTME_INTERACTIVE} \
"${DOCKER_VIRTME_NAME:-"mptcp/mptcp-upstream-virtme-docker:latest"}" \
"${@}"