From: Michael Hanke <mih@debian.org>
Subject: Allow tests to run as root

Packages get built by root, and chirp refused to start as root without
additional argueing.

--- a/chirp/test/TR_001_chirp_benchmark.sh
+++ b/chirp/test/TR_001_chirp_benchmark.sh
@@ -9,7 +9,11 @@
 prepare()
 {
     port=`find_free_port`
-    ../src/chirp_server -p $port &
+    if [ `id -u` -eq 0 ]; then
+        ../src/chirp_server -i $USER -p $port &
+    else
+        ../src/chirp_server -p $port &
+    fi
     pid=$!
 
     if ps ux | awk '{print $2}' | grep "^$pid$"; then
--- a/chirp/test/TR_002_chirp_ops.sh
+++ b/chirp/test/TR_002_chirp_ops.sh
@@ -11,7 +11,11 @@
     mkdir foo
     ln -s ..//.//./..///foo/ foo/foo
     port=`find_free_port`
-    ../src/chirp_server -r $PWD/foo -p $port &
+    if [ `id -u` -eq 0 ]; then
+        ../src/chirp_server -i $USER -r $PWD/foo -p $port &
+    else
+        ../src/chirp_server -r $PWD/foo -p $port &
+    fi
     pid=$!
 
     if ps ux | awk '{print $2}' | grep "^$pid$"; then
