summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Beisert <j.beisert@pengutronix.de>2009-04-09 09:20:49 +0000
committerJuergen Beisert <j.beisert@pengutronix.de>2009-04-09 09:20:49 +0000
commitb2e8f084ba566b1d863f5c2b9a6bfe509e70dfa1 (patch)
tree66b34d4c104f4be8a12d3ffa25a4b7d635a30183
parent290d3e62d7fa402be65bf5a2b26a4daf2d3a6304 (diff)
downloadptxdist-b2e8f084ba566b1d863f5c2b9a6bfe509e70dfa1.tar.gz
ptxdist-b2e8f084ba566b1d863f5c2b9a6bfe509e70dfa1.tar.xz
* tiobench: Threaded IO bench
- package added git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@10278 33e552b5-05e3-0310-8538-816dae2090ed
-rw-r--r--patches/tiobench-0.3.3/generic/print_help_if_no_parameters_are_given.diff26
-rw-r--r--patches/tiobench-0.3.3/generic/series1
-rw-r--r--rules/tiobench.in9
-rw-r--r--rules/tiobench.make97
4 files changed, 133 insertions, 0 deletions
diff --git a/patches/tiobench-0.3.3/generic/print_help_if_no_parameters_are_given.diff b/patches/tiobench-0.3.3/generic/print_help_if_no_parameters_are_given.diff
new file mode 100644
index 000000000..8ce9883ac
--- /dev/null
+++ b/patches/tiobench-0.3.3/generic/print_help_if_no_parameters_are_given.diff
@@ -0,0 +1,26 @@
+Subject: Output help if no parameters are given
+From: Juergen Beisert <j.beisert@pengutronix.de>
+
+Output a help, if a user omit any parameter instead of silently start the
+job and do something.
+
+Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
+
+---
+ tiotest.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+Index: tiotest.c
+===================================================================
+--- tiotest.c.orig
++++ tiotest.c
+@@ -112,6 +112,9 @@ void parse_args( ArgumentOptions* args,
+ int c;
+ int once = 0;
+
++ if (argc == 1)
++ print_help_and_exit();
++
+ while (1)
+ {
+ c = getopt( argc, argv, "f:b:d:t:r:D:k:o:hLRTWSOc");
diff --git a/patches/tiobench-0.3.3/generic/series b/patches/tiobench-0.3.3/generic/series
new file mode 100644
index 000000000..008a578c1
--- /dev/null
+++ b/patches/tiobench-0.3.3/generic/series
@@ -0,0 +1 @@
+print_help_if_no_parameters_are_given.diff -p0
diff --git a/rules/tiobench.in b/rules/tiobench.in
new file mode 100644
index 000000000..1d53fd719
--- /dev/null
+++ b/rules/tiobench.in
@@ -0,0 +1,9 @@
+## SECTION=test_suites
+
+config TIOBENCH
+ tristate
+ prompt "tiotest"
+ help
+ Threaded I/O bench for Linux (or any *nix system with POSIX threads
+ support library)
+
diff --git a/rules/tiobench.make b/rules/tiobench.make
new file mode 100644
index 000000000..a73b96692
--- /dev/null
+++ b/rules/tiobench.make
@@ -0,0 +1,97 @@
+# -*-makefile-*-
+# $Id: template-make 9053 2008-11-03 10:58:48Z wsa $
+#
+# Copyright (C) 2009 by Juergen Beisert
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_TIOBENCH) += tiobench
+
+#
+# Paths and names
+#
+TIOBENCH_VERSION := 0.3.3
+TIOBENCH := tiobench-$(TIOBENCH_VERSION)
+TIOBENCH_SUFFIX := tar.gz
+TIOBENCH_URL := http://downloads.sourceforge.net/tiobench/$(TIOBENCH).$(TIOBENCH_SUFFIX)
+TIOBENCH_SOURCE := $(SRCDIR)/$(TIOBENCH).$(TIOBENCH_SUFFIX)
+TIOBENCH_DIR := $(BUILDDIR)/$(TIOBENCH)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(TIOBENCH_SOURCE):
+ @$(call targetinfo)
+ @$(call get, TIOBENCH)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+TIOBENCH_PATH := PATH=$(CROSS_PATH)
+TIOBENCH_ENV := $(CROSS_ENV)
+
+$(STATEDIR)/tiobench.prepare:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tiobench.compile:
+ @$(call targetinfo)
+ cd $(TIOBENCH_DIR) && $(TIOBENCH_PATH) $(MAKE) \
+ CC=$(PTXCONF_GNU_TARGET)-gcc LINK=$(PTXCONF_GNU_TARGET)-gcc \
+ $(PARALLELMFLAGS)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tiobench.install:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tiobench.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, tiobench)
+ @$(call install_fixup, tiobench,PACKAGE,tiobench)
+ @$(call install_fixup, tiobench,PRIORITY,optional)
+ @$(call install_fixup, tiobench,VERSION,$(TIOBENCH_VERSION))
+ @$(call install_fixup, tiobench,SECTION,base)
+ @$(call install_fixup, tiobench,AUTHOR,"Juergen Beisert <jbeisert@pengutronix.de>")
+ @$(call install_fixup, tiobench,DEPENDS,)
+ @$(call install_fixup, tiobench,DESCRIPTION,missing)
+
+ @$(call install_copy, tiobench, 0, 0, 0755, $(TIOBENCH_DIR)/tiotest, \
+ /usr/bin/tiotest)
+
+ @$(call install_finish, tiobench)
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+tiobench_clean:
+ rm -rf $(STATEDIR)/tiobench.*
+ rm -rf $(PKGDIR)/tiobench_*
+ rm -rf $(TIOBENCH_DIR)
+
+# vim: syntax=make