summaryrefslogtreecommitdiff
path: root/benchmarks/lmbench
diff options
context:
space:
mode:
authorgarbled <garbled>1998-12-26 15:59:54 +0000
committergarbled <garbled>1998-12-26 15:59:54 +0000
commit069601cc6968f844d963e20f6639ba6fd74b640c (patch)
tree6958f25a4817a66619dea1a60f9498023655b3f2 /benchmarks/lmbench
parent12f648cc39d932c1a94b5579dcb006fea47ac42f (diff)
downloadpkgsrc-069601cc6968f844d963e20f6639ba6fd74b640c.tar.gz
Fix all the benchmark targets so they work properly, and work with the
package uninstalled, with the exceptionof lmbench. Make non-batch targets for all the benchmarks, and create a results target which places all the results in /tmp for easier collection.
Diffstat (limited to 'benchmarks/lmbench')
-rw-r--r--benchmarks/lmbench/Makefile18
-rw-r--r--benchmarks/lmbench/files/setup.answers9
2 files changed, 24 insertions, 3 deletions
diff --git a/benchmarks/lmbench/Makefile b/benchmarks/lmbench/Makefile
index 63f4c314856..f443872a125 100644
--- a/benchmarks/lmbench/Makefile
+++ b/benchmarks/lmbench/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 1998/12/03 01:27:05 hubertf Exp $
+# $NetBSD: Makefile,v 1.4 1998/12/26 15:59:56 garbled Exp $
DISTNAME= lmbench-2alpha11
PKGNAME= lmbench-2.11a
@@ -31,12 +31,24 @@ do-install:
.include "../../mk/bsd.prefs.mk"
benchmark:
+.if exists(${PREFIX}/bin/lmbench/hello)
.if defined(BATCH)
- @${ECHO} "*** This benchmark may only be run in non-batch mode" ; \
- exit 1
+ @${ECHO} "*** This benchmark should only be run in non-batch mode" ; \
+ if [ `id -u` != 0 ]; then echo "This benchmark must be run as root!" ; exit 1 ; fi ; \
+ @${SED} -e 's|@wrksrc@|${WRKSRC}|' < ${FILESDIR}/setup.answers | \
+ (cd ${WRKSRC}/src; ${GMAKE} results)
.else
@if [ `id -u` != 0 ]; then echo "This benchmark must be run as root!" ; exit 1 ; fi
@cd ${WRKSRC}/src; ${GMAKE} results
.endif
+.else
+ @${ECHO} "*** This benchmark must be installed to run" ; \
+ exit 1
+.endif
+
+results:
+ -@${MKDIR} /tmp/benches/`domainname`
+ -@cd ${PREFIX}/share/lmbench ; \
+ tar -cf /tmp/benches/`domainname`/lmbench.`uname`-`uname -m`-`uname -r`.`hostname`.tar results
.include "../../mk/bsd.pkg.mk"
diff --git a/benchmarks/lmbench/files/setup.answers b/benchmarks/lmbench/files/setup.answers
new file mode 100644
index 00000000000..2cdb830ff6b
--- /dev/null
+++ b/benchmarks/lmbench/files/setup.answers
@@ -0,0 +1,9 @@
+
+
+
+
+
+@wrksrc@
+
+
+no