File: run-unit-test

package info (click to toggle)
figtree 1.4.4-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,988 kB
  • sloc: java: 20,099; xml: 270; sh: 15; makefile: 5
file content (25 lines) | stat: -rw-r--r-- 898 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh -e

pkg=figtree

if [ "$ADTTMP" = "" ] ; then
  ADTTMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
fi

cd $ADTTMP

cp -a /usr/share/doc/${pkg}/examples/* .
gunzip -r *

# Problem: figtree creates graphical output and requires user interaction to end
# Hack around: start figtree in background and kill all figtree processes started by the current user
# xvfb-run --auto-servernum
# figtree HA_continuous_MCC.tre HA_discrete_MCC.tre 

# Still testing around a way to export and save the tree without user interaction.
figtree -graphic PDF HA_continuous_MCC.tree HA_continuous_MCC.pdf
figtree -graphic PNG -width 320 -height 320 HA_continuous_MCC.tree HA_continuous_MCC.png

#sleep 10
#kill -9 `ps aux | grep -w "^${USER}.*figtree" | grep -v "0:0[0-9] grep " | grep -v "0:0[0-9] ps " | sed "s/^${USER}[[:space:]]\+\([0-9]\+\)[[:space:]]\+.*/\1/"`