summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-03-28 13:11:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-03-29 07:29:01 +0200
commit002768254683ffe4a6614fe35254cf9dab88c6d0 (patch)
tree22eb9805e2dd702a0770c98320129488dd9e26e8
parentarm: Optimize context switch (diff)
downloadrtems-002768254683ffe4a6614fe35254cf9dab88c6d0.tar.bz2
benchmarks: Add benchmark templates
Update #2958.
-rw-r--r--testsuites/benchmarks/Makefile.am9
-rw-r--r--testsuites/benchmarks/configure.ac29
-rw-r--r--testsuites/benchmarks/dhrystone/Makefile.am19
-rw-r--r--testsuites/benchmarks/dhrystone/dhrystone.doc11
-rw-r--r--testsuites/benchmarks/dhrystone/dhrystone.scn0
-rw-r--r--testsuites/benchmarks/dhrystone/init.c48
-rw-r--r--testsuites/benchmarks/linpack/Makefile.am19
-rw-r--r--testsuites/benchmarks/linpack/init.c48
-rw-r--r--testsuites/benchmarks/linpack/linpack.doc11
-rw-r--r--testsuites/benchmarks/linpack/linpack.scn0
-rw-r--r--testsuites/benchmarks/whetstone/Makefile.am19
-rw-r--r--testsuites/benchmarks/whetstone/init.c48
-rw-r--r--testsuites/benchmarks/whetstone/whetstone.doc11
-rw-r--r--testsuites/benchmarks/whetstone/whetstone.scn0
-rw-r--r--testsuites/configure.ac2
15 files changed, 273 insertions, 1 deletions
diff --git a/testsuites/benchmarks/Makefile.am b/testsuites/benchmarks/Makefile.am
new file mode 100644
index 0000000000..3d95ecdb9f
--- /dev/null
+++ b/testsuites/benchmarks/Makefile.am
@@ -0,0 +1,9 @@
+ACLOCAL_AMFLAGS = -I ../aclocal
+
+SUBDIRS =
+SUBDIRS += linpack
+SUBDIRS += whetstone
+SUBDIRS += dhrystone
+
+include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/benchmarks/configure.ac b/testsuites/benchmarks/configure.ac
new file mode 100644
index 0000000000..18af749fb9
--- /dev/null
+++ b/testsuites/benchmarks/configure.ac
@@ -0,0 +1,29 @@
+## Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([rtems-c-src-tests-benchmarks],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
+AC_CONFIG_HEADER([config.h])
+RTEMS_TOP([../..],[..])
+
+RTEMS_CANONICAL_TARGET_CPU
+
+AM_INIT_AUTOMAKE([no-define foreign 1.12.2])
+AM_MAINTAINER_MODE
+
+RTEMS_ENV_RTEMSBSP
+
+RTEMS_PROJECT_ROOT
+
+RTEMS_PROG_CC_FOR_TARGET
+
+RTEMS_CANONICALIZE_TOOLS
+
+RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
+
+# Explicitly list all Makefiles here
+AC_CONFIG_FILES([Makefile
+linpack/Makefile
+whetstone/Makefile
+dhrystone/Makefile
+])
+AC_OUTPUT
diff --git a/testsuites/benchmarks/dhrystone/Makefile.am b/testsuites/benchmarks/dhrystone/Makefile.am
new file mode 100644
index 0000000000..0354012a4a
--- /dev/null
+++ b/testsuites/benchmarks/dhrystone/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = dhrystone
+dhrystone_SOURCES = init.c
+
+dist_rtems_tests_DATA = dhrystone.scn dhrystone.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(dhrystone_OBJECTS)
+LINK_LIBS = $(dhrystone_LDLIBS)
+
+dhrystone$(EXEEXT): $(dhrystone_OBJECTS) $(dhrystone_DEPENDENCIES)
+ @rm -f dhrystone$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/benchmarks/dhrystone/dhrystone.doc b/testsuites/benchmarks/dhrystone/dhrystone.doc
new file mode 100644
index 0000000000..aac6f23bde
--- /dev/null
+++ b/testsuites/benchmarks/dhrystone/dhrystone.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: dhrystone
+
+directives:
+
+ TBD
+
+concepts:
+
+ TBD
diff --git a/testsuites/benchmarks/dhrystone/dhrystone.scn b/testsuites/benchmarks/dhrystone/dhrystone.scn
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuites/benchmarks/dhrystone/dhrystone.scn
diff --git a/testsuites/benchmarks/dhrystone/init.c b/testsuites/benchmarks/dhrystone/init.c
new file mode 100644
index 0000000000..6e339d4580
--- /dev/null
+++ b/testsuites/benchmarks/dhrystone/init.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tmacros.h"
+
+const char rtems_test_name[] = "DHRYSTONE";
+
+static void test(void)
+{
+}
+
+static void Init(rtems_task_argument arg)
+{
+ TEST_BEGIN();
+
+ test();
+
+ TEST_END();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/benchmarks/linpack/Makefile.am b/testsuites/benchmarks/linpack/Makefile.am
new file mode 100644
index 0000000000..d947cd626b
--- /dev/null
+++ b/testsuites/benchmarks/linpack/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = linpack
+linpack_SOURCES = init.c
+
+dist_rtems_tests_DATA = linpack.scn linpack.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(linpack_OBJECTS)
+LINK_LIBS = $(linpack_LDLIBS)
+
+linpack$(EXEEXT): $(linpack_OBJECTS) $(linpack_DEPENDENCIES)
+ @rm -f linpack$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/benchmarks/linpack/init.c b/testsuites/benchmarks/linpack/init.c
new file mode 100644
index 0000000000..8b67e52360
--- /dev/null
+++ b/testsuites/benchmarks/linpack/init.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tmacros.h"
+
+const char rtems_test_name[] = "LINPACK";
+
+static void test(void)
+{
+}
+
+static void Init(rtems_task_argument arg)
+{
+ TEST_BEGIN();
+
+ test();
+
+ TEST_END();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/benchmarks/linpack/linpack.doc b/testsuites/benchmarks/linpack/linpack.doc
new file mode 100644
index 0000000000..af3805855e
--- /dev/null
+++ b/testsuites/benchmarks/linpack/linpack.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: linpack
+
+directives:
+
+ TBD
+
+concepts:
+
+ TBD
diff --git a/testsuites/benchmarks/linpack/linpack.scn b/testsuites/benchmarks/linpack/linpack.scn
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuites/benchmarks/linpack/linpack.scn
diff --git a/testsuites/benchmarks/whetstone/Makefile.am b/testsuites/benchmarks/whetstone/Makefile.am
new file mode 100644
index 0000000000..614695218a
--- /dev/null
+++ b/testsuites/benchmarks/whetstone/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = whetstone
+whetstone_SOURCES = init.c
+
+dist_rtems_tests_DATA = whetstone.scn whetstone.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(whetstone_OBJECTS)
+LINK_LIBS = $(whetstone_LDLIBS)
+
+whetstone$(EXEEXT): $(whetstone_OBJECTS) $(whetstone_DEPENDENCIES)
+ @rm -f whetstone$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/benchmarks/whetstone/init.c b/testsuites/benchmarks/whetstone/init.c
new file mode 100644
index 0000000000..075faccb19
--- /dev/null
+++ b/testsuites/benchmarks/whetstone/init.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tmacros.h"
+
+const char rtems_test_name[] = "WHETSTONE";
+
+static void test(void)
+{
+}
+
+static void Init(rtems_task_argument arg)
+{
+ TEST_BEGIN();
+
+ test();
+
+ TEST_END();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/benchmarks/whetstone/whetstone.doc b/testsuites/benchmarks/whetstone/whetstone.doc
new file mode 100644
index 0000000000..b6c3383e58
--- /dev/null
+++ b/testsuites/benchmarks/whetstone/whetstone.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: whetstone
+
+directives:
+
+ TBD
+
+concepts:
+
+ TBD
diff --git a/testsuites/benchmarks/whetstone/whetstone.scn b/testsuites/benchmarks/whetstone/whetstone.scn
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuites/benchmarks/whetstone/whetstone.scn
diff --git a/testsuites/configure.ac b/testsuites/configure.ac
index 086f6367d5..ab8aab8ea7 100644
--- a/testsuites/configure.ac
+++ b/testsuites/configure.ac
@@ -45,7 +45,7 @@ if test "$enable_tests" = "yes"; then
AC_CONFIG_SUBDIRS(smptests)
fi
# Now do performance tests
- AC_CONFIG_SUBDIRS(tmtests psxtmtests rhealstone)
+ AC_CONFIG_SUBDIRS(tmtests psxtmtests benchmarks rhealstone)
fi
# Explicitly list all Makefiles here