]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - test/run-stp-tests.sh
Load cups into easysw/current.
[thirdparty/cups.git] / test / run-stp-tests.sh
index 87f648b99e8864cc7ae8e643cef7e932735365ce..06b7564a091919c66667e8bfc48b367a84795f1b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: run-stp-tests.sh 5091 2006-02-08 18:39:56Z mike $"
+# "$Id: run-stp-tests.sh 5262 2006-03-09 21:26:27Z mike $"
 #
 #   Perform the complete set of IPP compliance tests specified in the
 #   CUPS Software Test Plan.
@@ -149,7 +149,19 @@ esac
 # Information for the server/tests...
 #
 
-user=`whoami`
+user="$USER"
+if test -z "$user"; then
+       if test -x /usr/ucb/whoami; then
+               user=`/usr/ucb/whoami`
+       else
+               user=`whoami`
+       fi
+
+       if test -z "$user"; then
+               user="unknown"
+       fi
+fi
+
 port=8631
 cwd=`pwd`
 root=`dirname $cwd`
@@ -421,7 +433,7 @@ done
 # Create the test report source file...
 #
 
-strfile=cups-str-1.2-`date +%Y-%m-%d`-`whoami`.html
+strfile=cups-str-1.2-`date +%Y-%m-%d`-$user.html
 
 rm -f $strfile
 cat str-header.html >$strfile
@@ -435,7 +447,7 @@ echo "Running IPP compliance tests..."
 echo "<H1>1 - IPP Compliance Tests</H1>" >>$strfile
 echo "<P>This section provides the results to the IPP compliance tests" >>$strfile
 echo "outlined in the CUPS Software Test Plan. These tests were run on" >>$strfile
-echo `date "+%Y-%m-%d"` by `whoami` on `hostname`. >>$strfile
+echo `date "+%Y-%m-%d"` by $user on `hostname`. >>$strfile
 echo "<PRE>" >>$strfile
 
 fail=0
@@ -463,7 +475,7 @@ echo "Running command tests..."
 echo "<H1>2 - Command Tests</H1>" >>$strfile
 echo "<P>This section provides the results to the command tests" >>$strfile
 echo "outlined in the CUPS Software Test Plan. These tests were run on" >>$strfile
-echo `date "+%Y-%m-%d"` by `whoami` on `hostname`. >>$strfile
+echo `date "+%Y-%m-%d"` by $user on `hostname`. >>$strfile
 echo "<PRE>" >>$strfile
 
 for file in 5*.sh; do
@@ -557,5 +569,5 @@ echo "    $strfile"
 echo ""
 
 #
-# End of "$Id: run-stp-tests.sh 5091 2006-02-08 18:39:56Z mike $"
+# End of "$Id: run-stp-tests.sh 5262 2006-03-09 21:26:27Z mike $"
 #