2019-05-02 19:26:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright 2019 The Chromium OS Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
set -ex
|
2019-08-16 22:37:46 +00:00
|
|
|
|
|
|
|
# grab the pwd before changing it to this script's directory
|
|
|
|
pwd="${PWD}"
|
|
|
|
|
2019-05-02 19:26:24 +00:00
|
|
|
cd "${0%/*}"
|
|
|
|
|
|
|
|
exec docker run -it --rm \
|
|
|
|
--privileged \
|
2019-08-16 22:37:46 +00:00
|
|
|
--ipc=host \
|
2019-05-02 19:26:24 +00:00
|
|
|
-e DISPLAY=$DISPLAY -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
|
|
|
|
-v /dev/log:/dev/log \
|
2019-08-16 22:37:46 +00:00
|
|
|
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
|
|
|
|
--volume "$pwd":/wd \
|
2019-05-02 19:26:24 +00:00
|
|
|
--workdir /wd \
|
|
|
|
crosvm \
|
|
|
|
"$@"
|