Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11 108 lines 3.8 kB view raw
1diff --git a/UnixBench/Run b/UnixBench/Run 2index 34d2c72..130b56e 100755 3--- a/UnixBench/Run 4+++ b/UnixBench/Run 5@@ -81,23 +81,23 @@ my $longIterCount = 10; 6 my $shortIterCount = 3; 7 8 # C compiler to use in compilation tests. 9-my $cCompiler = 'gcc'; 10+my $cCompiler = 'cc -w'; 11 12 # Establish full paths to directories. These need to be full pathnames 13 # (or do they, any more?). They can be set in env. 14 # variable names are the first parameter to getDir() below. 15 16 # Directory where the test programs live. 17-my $BINDIR = getDir('UB_BINDIR', $FindBin::Bin . "/pgms"); 18+my $BINDIR = getDir('UB_BINDIR', '@out@/libexec/pgms'); 19 20 # Temp directory, for temp files. 21-my $TMPDIR = getDir('UB_TMPDIR', $FindBin::Bin . "/tmp"); 22+my $TMPDIR = getDir('UB_TMPDIR', "$ENV{'PWD'}/unixbench/temp"); 23 24 # Directory to put results in. 25-my $RESULTDIR = getDir('UB_RESULTDIR', $FindBin::Bin . "/results"); 26+my $RESULTDIR = getDir('UB_RESULTDIR', "$ENV{'PWD'}/unixbench/results"); 27 28 # Directory where the tests are executed. 29-my $TESTDIR = getDir('UB_TESTDIR', $FindBin::Bin . "/testdir"); 30+my $TESTDIR = getDir('UB_TESTDIR', '@out@/share/testdir'); 31 32 33 ############################################################################ 34@@ -330,19 +330,19 @@ my $testParams = { 35 "logmsg" => "Shell Scripts (1 concurrent)", 36 "cat" => 'system', 37 "prog" => "${BINDIR}/looper", 38- "options" => "60 \"${BINDIR}/multi.sh\" 1", 39+ "options" => "60 \"${BINDIR}/multi.sh\" 1 ${TMPDIR} ${TESTDIR}", 40 }, 41 "shell8" => { 42 "logmsg" => "Shell Scripts (8 concurrent)", 43 "cat" => 'system', 44 "prog" => "${BINDIR}/looper", 45- "options" => "60 \"${BINDIR}/multi.sh\" 8", 46+ "options" => "60 \"${BINDIR}/multi.sh\" 8 ${TMPDIR} ${TESTDIR}", 47 }, 48 "shell16" => { 49 "logmsg" => "Shell Scripts (16 concurrent)", 50 "cat" => 'system', 51 "prog" => "${BINDIR}/looper", 52- "options" => "60 \"${BINDIR}/multi.sh\" 16", 53+ "options" => "60 \"${BINDIR}/multi.sh\" 16 ${TMPDIR} ${TESTDIR}", 54 }, 55 56 ########################## 57@@ -434,7 +434,7 @@ my $testParams = { 58 "logmsg" => "C Compiler Throughput ($cCompiler)", 59 "cat" => 'misc', 60 "prog" => "${BINDIR}/looper", 61- "options" => "60 $cCompiler cctest.c", 62+ "options" => "60 $cCompiler $TESTDIR/cctest.c -o $TMPDIR/cctest", 63 }, 64 "arithoh" => { 65 "logmsg" => "Arithoh", 66@@ -873,16 +873,6 @@ sub preChecks { 67 # Set the language. 68 $ENV{'LANG'} = $language; 69 70- # Check that the required files are in the proper places. 71- my $make = $ENV{MAKE} || "make"; 72- system("$make check"); 73- if ($? != 0) { 74- system("$make all"); 75- if ($? != 0) { 76- abortRun("\"$make all\" failed"); 77- } 78- } 79- 80 # Create a script to kill this run. 81 system("echo \"kill -9 $$\" > \"${TMPDIR}/kill_run\""); 82 chmod(0755, $TMPDIR . "/kill_run"); 83@@ -923,7 +913,10 @@ sub parseArgs { 84 $params->{'copies'} = [ ]; 85 } 86 push(@{$params->{'copies'}}, shift(@words)); 87- } else { 88+ } elsif ($word eq "--help" || $word eq "-h") { 89+ print "Run: please see ubench(1) for available options\n"; 90+ exit 0; 91+ }else { 92 die("Run: unknown option $word\n"); 93 } 94 } 95diff --git a/UnixBench/pgms/multi.sh b/UnixBench/pgms/multi.sh 96index 72e8716..d2f5f48 100755 97--- a/UnixBench/pgms/multi.sh 98+++ b/UnixBench/pgms/multi.sh 99@@ -15,7 +15,8 @@ 100 ############################################################################### 101 ID="@(#)multi.sh:3.4 -- 5/15/91 19:30:24"; 102 instance=1 103-sort_src=sort.src 104+sort_src=$3/sort.src 105+cd $2 106 work_factor=${MULTI_SH_WORK_FACTOR:-1} 107 if [ $work_factor -gt 1 ]; then 108 inputs=