[Git][java-team/eclipse-tracecompass][master] 2 commits: Add better autopkgtest

Sudip Mukherjee gitlab at salsa.debian.org
Sat Dec 5 23:20:09 GMT 2020



Sudip Mukherjee pushed to branch master at Debian Java Maintainers / eclipse-tracecompass


Commits:
00021d11 by Sudip Mukherjee at 2020-12-05T21:55:23+00:00
Add better autopkgtest

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee at gmail.com>

- - - - -
2aaff9d5 by Sudip Mukherjee at 2020-12-05T21:55:23+00:00
Add changelog for 5.3.0+repack-5 release

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee at gmail.com>

- - - - -


3 changed files:

- debian/changelog
- debian/tests/control
- + debian/tests/test-gui


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+eclipse-tracecompass (5.3.0+repack-5) unstable; urgency=medium
+
+  * Add a better autopkgtest to check the application launches.
+    - Still superficial as we can not check a trace.
+
+ -- Sudip Mukherjee <sudipm.mukherjee at gmail.com>  Sat, 05 Dec 2020 21:54:40 +0000
+
 eclipse-tracecompass (5.3.0+repack-4) unstable; urgency=medium
 
   * Use branding information.


=====================================
debian/tests/control
=====================================
@@ -1,5 +1,3 @@
-# Add a very basic test to check it is installed.
-
-Test-Command: ls /usr/bin/tracecompass
-Depends: @
-Restrictions: superficial
+Tests: test-gui
+Depends: @, xvfb, xauth, xdotool, procps
+Restrictions: superficial, allow-stderr


=====================================
debian/tests/test-gui
=====================================
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -efu
+
+if [ -z "$AUTOPKGTEST_TMP" ]; then
+    AUTOPKGTEST_TMP=tmp
+    mkdir -p ${AUTOPKGTEST_TMP}
+fi
+
+export XDG_CONFIG_HOME=$AUTOPKGTEST_TMP/.config
+export XDG_DATA_HOME=$AUTOPKGTEST_TMP/.local/share
+export XDG_CACHE_HOME=$AUTOPKGTEST_TMP/.cache
+export XDG_RUNTIME_DIR=$AUTOPKGTEST_TMP/runtime
+mkdir -p $XDG_RUNTIME_DIR
+
+(Xvfb :5 -screen 0 1600x1200x24 -ac -noreset -v -fbdir $AUTOPKGTEST_TMP/ >/dev/null 2>&1 &)
+
+export DISPLAY=:5
+export XAUTHORITY=/dev/null
+
+cd $AUTOPKGTEST_TMP
+mkdir -p home
+cp /usr/bin/tracecompass .
+sed -i "s/1.8/1.8 \-Dorg.eclipse.swt.internal.SessionManagerDBus.disable \-Duser.home=.\/home/g" tracecompass
+./tracecompass &
+pid=`pgrep java`
+echo $pid
+win=`xdotool search --sync --onlyvisible --all --pid $pid --name 'Trace Compass'`
+echo "win=$win"
+name=`xdotool getwindowname $win | xargs`
+kill -9 $pid
+echo "name=$name"
+if [ "$name" = "Trace Compass" ]; then
+echo "Test OK"
+return 0
+else
+echo "name=$name"
+echo "Test Failed"
+return 1
+fi



View it on GitLab: https://salsa.debian.org/java-team/eclipse-tracecompass/-/compare/0d193e967f74bd310b8f865e199c54a3905d6bc9...2aaff9d58e85eb341e53936cedf1df8c69aaf4ee

-- 
View it on GitLab: https://salsa.debian.org/java-team/eclipse-tracecompass/-/compare/0d193e967f74bd310b8f865e199c54a3905d6bc9...2aaff9d58e85eb341e53936cedf1df8c69aaf4ee
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20201205/8a16aa00/attachment.html>


More information about the pkg-java-commits mailing list