aboutsummaryrefslogtreecommitdiffstats
path: root/src/ci/docker/webtest/chrome_launcher.sh
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2017-04-16 20:32:34 +0200
committerMartin Stockhammer <martin_s@apache.org>2017-04-16 20:32:34 +0200
commitf7b57a974d1c68878c562ef365dd947b7407c496 (patch)
treeb43899ef1f8a21a8af4e96343cb3df4c68a59278 /src/ci/docker/webtest/chrome_launcher.sh
parent48e76b64bd7ccc77fd3396a970db2393b51ac456 (diff)
downloadarchiva-f7b57a974d1c68878c562ef365dd947b7407c496.tar.gz
archiva-f7b57a974d1c68878c562ef365dd947b7407c496.zip
Adding docker scripts for ci browser testing
Diffstat (limited to 'src/ci/docker/webtest/chrome_launcher.sh')
-rw-r--r--src/ci/docker/webtest/chrome_launcher.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/ci/docker/webtest/chrome_launcher.sh b/src/ci/docker/webtest/chrome_launcher.sh
new file mode 100644
index 000000000..02e3fe753
--- /dev/null
+++ b/src/ci/docker/webtest/chrome_launcher.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Author: Martin Stockhammer <martin_s@apache.org>
+# Date: 2017-04-16
+#
+# Starts the chrome browser from the chrome installation path.
+#
+
+export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
+export DBUS_SESSION_BUS_ADDRESS=/dev/null
+
+# Make sure that the profile directory specified in the environment, if any,
+# overrides the default.
+if [[ -n "$CHROME_USER_DATA_DIR" ]]; then
+ PROFILE_DIRECTORY_FLAG="--user-data-dir=$CHROME_USER_DATA_DIR"
+fi
+
+# Sanitize std{in,out,err} because they'll be shared with untrusted child
+# processes (http://crbug.com/376567).
+exec < /dev/null
+exec > >(exec cat)
+exec 2> >(exec cat >&2)
+
+exec /opt/google/chrome/chrome --no-sandbox "$@"