diff -Naur unixbench-5.1.2-orig/Run unixbench-5.1.2/Run --- unixbench-5.1.2-orig/Run 2007-12-22 23:48:10 +0200 +++ unixbench-5.1.2/Run 2009-10-15 18:30:50 +0300 @@ -89,12 +89,19 @@ # Directory where the test programs live. my $BINDIR = getDir('UB_BINDIR', $BASEDIR . "/pgms"); +my $SBINDIR = getDir('UB_SBINDIR',"/sbin");#FIXME: path to `runlevel' routine + #should be discovered in runtime + # Temp directory, for temp files. my $TMPDIR = getDir('UB_TMPDIR', $BASEDIR . "/tmp"); # Directory to put results in. my $RESULTDIR = getDir('UB_RESULTDIR', $BASEDIR . "/results"); +# Directory with test files. Should fall back to $BASEDIR/testdir if /usr/share/bla-blah-blah is missing +my $SHARE_TESTDIR = getDir('UB_SHARE_TESTDIR', + "/usr/share/inquisitor/unixbench-testdir"); + # Directory where the tests are executed. my $TESTDIR = getDir('UB_TESTDIR', $BASEDIR . "/testdir"); @@ -574,6 +581,7 @@ # Canonicalise the value. my $wd; chomp($wd = `pwd`); + system("mkdir -p ${val}"); chdir($val); chomp($val = `pwd`); chdir($wd); @@ -749,10 +757,10 @@ } # Get graphics hardware info. - $info->{'graphics'} = getCmdOutput("3dinfo | cut -f1 -d\'(\'"); + $info->{'graphics'} = getCmdOutput(" ( 3dinfo | cut -f1 -d\'(\' ) 2>/dev/null"); # Get system run state, load and usage info. - $info->{'runlevel'} = getCmdOutput("runlevel | cut -f2 -d\" \""); + $info->{'runlevel'} = getCmdOutput($SBINDIR . "/runlevel | cut -f2 -d\" \""); $info->{'load'} = getCmdOutput("uptime"); $info->{'numUsers'} = getCmdOutput("who | wc -l"); @@ -780,6 +788,8 @@ # Do checks that everything's ready for testing. sub preChecks { + # We don't need no make check + return; # Set the language. $ENV{'LANG'} = $language; @@ -1784,6 +1794,11 @@ printf "Tests to run: %s\n", join(", ", @$tests); } + printf "\nCopying files from ${SHARE_TESTDIR} to ${TESTDIR} ... "; + system("cp -f ${SHARE_TESTDIR}/* ${TESTDIR}/ >&/dev/null || " . + "echo \"Can't copy test files to ${TESTDIR}\" >&2 "); + printf (" done.\n"); + # Generate unique file names for the report and log file. my $reportFile = logFile($systemInfo); my $reportHtml = $reportFile . ".html";