Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/test/sanity/scripts/run-ubuntu.sh
5241 views
1
#!/bin/sh
2
set -e
3
4
echo "System: $(uname -s) $(uname -r) $(uname -m)"
5
echo "Memory: $(free -h | awk '/^Mem:/ {print $2 " total, " $3 " used, " $7 " available"}')"
6
echo "Disk: $(df -h / | awk 'NR==2 {print $2 " total, " $3 " used, " $4 " available"}')"
7
8
echo "Configuring Azure mirror"
9
sudo sed -i 's|http://archive.ubuntu.com|http://azure.archive.ubuntu.com|g' /etc/apt/sources.list
10
11
echo "Installing dependencies"
12
sudo apt-get update
13
sudo apt-get install -y dbus-x11 x11-utils xvfb
14
15
echo "Installing Chromium"
16
sudo snap install chromium
17
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
18
export PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium-browser
19
20
echo "Starting X11 Server"
21
export DISPLAY=:99
22
Xvfb $DISPLAY -screen 0 1024x768x24 -ac -noreset &
23
24
echo "Starting Snap daemon"
25
sudo systemctl start snapd.socket
26
sudo systemctl start snapd.service
27
28
echo "Running sanity tests"
29
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
30
node "$SCRIPT_DIR/../out/index.js" "$@"
31
32