Commit 03ac12bb authored by Oliver Chang's avatar Oliver Chang Committed by Commit Bot

Add sudo to msan docker command if necessary.

R=eugenis@chromium.org
Bug: 899943

Change-Id: Ia8b67dd16a924d24c40aebfd713096bbbaeab5d7
Reviewed-on: https://chromium-review.googlesource.com/c/1306933
Commit-Queue: Oliver Chang <ochang@chromium.org>
Reviewed-by: default avatarEvgeniy Stepanov <eugenis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604092}
parent 6823c241
...@@ -3,5 +3,12 @@ ...@@ -3,5 +3,12 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
SUDO=
CHROMIUM_SRC_DIR=$(realpath $(dirname $(dirname $(dirname $(dirname "${BASH_SOURCE[0]}"))))) CHROMIUM_SRC_DIR=$(realpath $(dirname $(dirname $(dirname $(dirname "${BASH_SOURCE[0]}")))))
docker run --rm --shm-size=2g --privileged --cap-add=all -ti --workdir "$CHROMIUM_SRC_DIR" -e HOST_UID=$UID -v "$CHROMIUM_SRC_DIR:$CHROMIUM_SRC_DIR" trusty-chromium "$@"
if [ ! $(getent group docker | grep $USER) ]; then
echo "You're not in the 'docker' group, so we need to run docker with sudo."
SUDO=sudo
fi
$SUDO docker run --rm --shm-size=2g --privileged --cap-add=all -ti --workdir "$CHROMIUM_SRC_DIR" -e HOST_UID=$UID -v "$CHROMIUM_SRC_DIR:$CHROMIUM_SRC_DIR" trusty-chromium "$@"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment