blob: 5bc6e657679249d579e48b6d8653bf972c3c1593 [file] [log] [blame]
# Copyright 2020 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 up a Debian container for test.
# This is run from inside the container as root.
set -eux -o pipefail
# To update this, run apt-cache policy code on your DUT with this
# container installed, and look at the latest version.
# Note that updating this package is likely to break screendiffs.
main() {
local arch=$1
export DEBIAN_FRONTEND=noninteractive
# for testing Gedit.
apt-get -q -y install gedit
# for testing Emacs.
apt-get -q -y install emacs
if [ "${arch}" = "amd64" ]; then
# for testing Android Studio.
wget -q
tar -xf android-studio-linux.tar.gz
rm -f android-studio-linux.tar.gz
# for testing Eclipse.
apt-get -q -y install default-jre
wget -q
tar -xf eclipse.tar.gz -C /usr/
ln -s /usr/eclipse/eclipse /usr/bin/eclipse
rm -f eclipse.tar.gz
# for testing Visual Studio Code.
curl -sSL \
| gpg --dearmor > /etc/apt/trusted.gpg.d/
cat > /etc/apt/sources.list.d/vscode.list << EOF
deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/] stable main
apt-get -q update
apt-get -q -y install "code=${VSCODE_VERSION}"
apt-mark hold code
main "$@"