Hi,

I wrote a bash script that tries to install all pts tests and for any test that fails to install it saves the error message to a file. Here is the script:

Code:
#!/bin/bash

if [ ! -f tests.txt ]; then
  # create a list of all pts tests
  phoronix-test-suite list-tests | cut -d' ' -f1 | grep pts > tests.txt
fi

# for each pts/test -> phoronix-test-suite install pts/test
while read i
do
  is_done=$(cat tests_done.txt 2> /dev/null | grep $i)
  # skip test if previously processed
  if [ -n "$is_done" ]; then
    continue
  fi
  echo $i >> tests_done.txt
  echo '' > current.log
  printf "installing %-27s" $i
  # install test
  phoronix-test-suite install $i > current.log
  # check if install error
  is_failed=$(cat current.log | grep 'failed to install')
  if [ -z "$is_failed" ]; then
    echo "success"
  else
    echo "failed"
    error_log=~/.phoronix-test-suite/installed-tests/$i*/install-failed.log
    if [ ! -f $error_log ]; then
      error_log=current.log
    fi
    # write error to failed.log
    echo === $i error ===          >> failed.log
    tail $error_log | sed '/^$/d'  >> failed.log
    printf "\n\n\n"                >> failed.log
  fi
done < tests.txt
How to use it?

Save the script as debug_install.sh and put it in its own directory, then open a terminal and run:
$ sh debug_install.sh

If the script exits due to an error just restart it and it will continue with the installation of the next test. All errors are saved to the failed.log file in the current directory. Here is the terminal output of the script on my PC (Scientific linux 6.2 x86_64):

Code:
[? debug_install]$ sh debug_install.sh 
installing pts/aio-stress             success
installing pts/apache                 failed
installing pts/apitrace               failed
[? debug_install]$ sh debug_install.sh 
installing pts/battery-power-usage    success
installing pts/blogbench              success
installing pts/bork                   success
installing pts/build-imagemagick      success
installing pts/build-linux-kernel     success
installing pts/build-mplayer          success
installing pts/build-php              success
installing pts/bullet                 success
installing pts/byte                   success
installing pts/c-ray                  success
installing pts/cachebench             success
installing pts/cairo-demos            failed
installing pts/cairo-perf-trace       success
installing pts/clomp                  failed
installing pts/compilebench           failed
installing pts/compress-7zip          success
installing pts/compress-gzip          success
installing pts/compress-lzma          success
installing pts/compress-pbzip2        success
installing pts/corebreach             Please enter your root password below:
standard in must be a tty
^C
[? debug_install]$ sh debug_install.sh 
installing pts/crafty                 success
installing pts/dbench                 success
installing pts/dcraw                  success
installing pts/dolfyn                 failed
installing pts/doom3                  failed
[? debug_install]$ sh debug_install.sh 
installing pts/encode-ape             success          
installing pts/encode-flac            success
installing pts/encode-mp3             failed
installing pts/encode-ogg             failed
...
And here is the corresponding failed.log:

Code:
=== pts/apache error ===
--------------------------
|--- httpd_/conf/httpd.conf.orig	2009-05-05 11:45:32.000000000 -0400
|+++ httpd_/conf/httpd.conf	2009-05-05 11:46:09.000000000 -0400
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
mv: cannot move `test.html' to `httpd_/htdocs/': Not a directory
mv: cannot move `pts.png' to `httpd_/htdocs/': Not a directory



=== pts/apitrace error ===
Size:       634223068
Compressed: 156191890
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 2.8 or higher is required.  You are running version 2.6.4
-- Configuring incomplete, errors occurred!
make: Entering directory `~/.phoronix-test-suite/installed-tests/pts/apitrace-1.0.1/apitrace_/build'
make: *** No targets specified and no makefile found.  Stop.
make: Leaving directory `~/.phoronix-test-suite/installed-tests/pts/apitrace-1.0.1/apitrace_/build'



=== pts/cairo-demos error ===
make: *** [flowers-demo] Error 1
/usr/local/bin/ld: /tmp/ccfl9oS9.o: undefined reference to symbol 'ceil@@GLIBC_2.2.5'
/usr/local/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
/lib64/libm.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [spiral-demo] Error 1
/tmp/ccj6qxq9.o: In function `create_strip':
~/.phoronix-test-suite/installed-tests/pts/cairo-demos-1.0.1/cairo-demos/fish-demo.c:83: undefined reference to `cairo_surface_create_for_rectangle'
collect2: ld returned 1 exit status
make: *** [fish-demo] Error 1



=== pts/clomp error ===
            Download Failed: http://asc.llnl.gov/sequoia/benchmarks/clomp_v1.0.tar.gz
            Downloading of needed test files failed.
The following tests failed to install:
	- pts/clomp-1.0.0
[NOTICE] unlink(/tmp/phoronix-test-suite.active): Operation not permitted in pts_file_io.php:38



=== pts/compilebench error ===
            Download Failed: http://oss.oracle.com/~mason/compilebench/compilebench-0.6.tar.bz2
            Downloading of needed test files failed.
The following tests failed to install:
	- pts/compilebench-1.0.0
[NOTICE] unlink(/tmp/phoronix-test-suite.active): Operation not permitted in pts_file_io.php:38



=== pts/dolfyn error ===
            Download Failed: http://launchpad.net/dolfyn-cfd/0.527/dolfyn-cfd-0.527/+download/dolfyn-cfd_0.527.tgz
            Downloading of needed test files failed.
The following tests failed to install:
	- pts/dolfyn-1.0.0
[NOTICE] unlink(/tmp/phoronix-test-suite.active): Operation not permitted in pts_file_io.php:38



=== pts/doom3 error ===
            Download Failed: ftp://ftp.idsoftware.com/idstuff/doom3/linux/doom3-linux-1.3.1.1304.x86.run
            Downloading of needed test files failed.
The following tests failed to install:
	- pts/doom3-1.1.0
[NOTICE] unlink(/tmp/phoronix-test-suite.active): Operation not permitted in pts_file_io.php:38



=== pts/encode-mp3 error ===
make[1]: Entering directory `~/.phoronix-test-suite/installed-tests/pts/encode-mp3-1.4.0/lame-3.99.3/frontend'
/bin/sh ../libtool --tag=CC   --mode=link gcc  -O3 -fomit-frame-pointer -ffast-math -Wall -pipe       -static  -o lame lame_main.o main.o brhist.o console.o get_audio.o lametime.o parse.o timestatus.o ../libmp3lame/libmp3lame.la -lncurses   -lm 
libtool: link: gcc -O3 -fomit-frame-pointer -ffast-math -Wall -pipe -o lame lame_main.o main.o brhist.o console.o get_audio.o lametime.o parse.o timestatus.o  ../libmp3lame/.libs/libmp3lame.a -lncurses -lm
/usr/local/bin/ld: console.o: undefined reference to symbol 'tgetnum'
/usr/local/bin/ld: note: 'tgetnum' is defined in DSO /lib64/libtinfo.so.5 so try adding it to the linker command line
/lib64/libtinfo.so.5: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [lame] Error 1
make[1]: Leaving directory `~/.phoronix-test-suite/installed-tests/pts/encode-mp3-1.4.0/lame-3.99.3/frontend'
make: *** [install-recursive] Error 1



=== pts/encode-ogg error ===
checking for Ogg... yes
checking for oggpack_writealign... yes
checking for VORBIS... no
checking for ov_read_filter... yes
checking for library containing cos... -lm
checking for Vorbis... yes
checking whether OV_ECTL_COUPLING_SET is declared... no
configure: error: Vorbis >= 1.3.0 required !
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.



=== pts/encode-opus error ===
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means Ogg was incorrectly installed
*** or that you have moved Ogg since it was installed.
configure: error: 
    libogg is required to build this package!
    please see http://www.xiph.org/ for how to
    obtain a copy.
  
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.


...
How is this useful for fixing bugs?

Apache is the first error in failed.log, the error message is:

Code:
`httpd_/htdocs/': Not a directory
A quick look at apache's install.sh file reveals:

Code:
$ less ~/.phoronix-test-suite/test-profiles/pts/apache*/install.sh
...
mkdir $HOME/httpd_
...
mv -f test.html httpd_/htdocs/
Wasn't `mkdir $HOME/httpd_` meant to be `mkdir httpd_` ?

Any feedback welcome,
Linoliumz