You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2016/09/25 12:17:13 UTC

svn commit: r1762196 - in /directory/studio/trunk/tools: run-ui-tests.sh start-xvfb-docker-container stop-and-rm-xvfb-docker-container

Author: seelmann
Date: Sun Sep 25 12:17:13 2016
New Revision: 1762196

URL: http://svn.apache.org/viewvc?rev=1762196&view=rev
Log:
Add scripts to run UI tests

Added:
    directory/studio/trunk/tools/run-ui-tests.sh   (with props)
    directory/studio/trunk/tools/start-xvfb-docker-container
    directory/studio/trunk/tools/stop-and-rm-xvfb-docker-container

Added: directory/studio/trunk/tools/run-ui-tests.sh
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tools/run-ui-tests.sh?rev=1762196&view=auto
==============================================================================
--- directory/studio/trunk/tools/run-ui-tests.sh (added)
+++ directory/studio/trunk/tools/run-ui-tests.sh Sun Sep 25 12:17:13 2016
@@ -0,0 +1,26 @@
+#!/bin/sh
+# 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.
+
+# This script does a full build of Studio (including the MANIFEST generation, the P2 local repository construction, and UI tests)
+
+source $(dirname $0)/start-xvfb-docker-container
+
+mvn -f pom-first.xml clean install && mvn clean install -Denable-ui-tests
+
+source $(dirname $0)/stop-and-rm-xvfb-docker-container
+

Propchange: directory/studio/trunk/tools/run-ui-tests.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/tools/run-ui-tests.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: directory/studio/trunk/tools/start-xvfb-docker-container
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tools/start-xvfb-docker-container?rev=1762196&view=auto
==============================================================================
--- directory/studio/trunk/tools/start-xvfb-docker-container (added)
+++ directory/studio/trunk/tools/start-xvfb-docker-container Sun Sep 25 12:17:13 2016
@@ -0,0 +1,33 @@
+# 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.
+
+CONTAINER_NAME="dir-studio-ui-tests-xvfb"
+
+# stop and rm in case something went wrong in previous run
+docker stop $CONTAINER_NAME
+docker rm $CONTAINER_NAME
+
+# find free port and display
+for PORT in $(seq 6006 6099); do netstat -tln | grep $PORT || break; done
+echo "Using TCP port $PORT for Xvfb"
+export DISPLAY=:$((PORT-6000))
+echo "Using DISPLAY $DISPLAY"
+
+# start container
+docker pull apachedirectory/xvfb
+docker run -d --name $CONTAINER_NAME -e DISPLAY=$DISPLAY -p $PORT:$PORT apachedirectory/xvfb
+

Added: directory/studio/trunk/tools/stop-and-rm-xvfb-docker-container
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tools/stop-and-rm-xvfb-docker-container?rev=1762196&view=auto
==============================================================================
--- directory/studio/trunk/tools/stop-and-rm-xvfb-docker-container (added)
+++ directory/studio/trunk/tools/stop-and-rm-xvfb-docker-container Sun Sep 25 12:17:13 2016
@@ -0,0 +1,20 @@
+# 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.
+
+docker stop $CONTAINER_NAME
+docker rm $CONTAINER_NAME
+