[PATCH] ada-tests/spatcb01: New test
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon May 29 10:14:35 UTC 2017
Update #2289.
---
c/src/ada-tests/configure.ac | 1 +
c/src/ada-tests/sptests/Makefile.am | 1 +
c/src/ada-tests/sptests/spatcb01/Makefile.am | 16 ++++++++++++++
c/src/ada-tests/sptests/spatcb01/ada_spatcb01.scn | 3 +++
c/src/ada-tests/sptests/spatcb01/config.h | 16 ++++++++++++++
c/src/ada-tests/sptests/spatcb01/spatcb01.adb | 26 +++++++++++++++++++++++
6 files changed, 63 insertions(+)
create mode 100644 c/src/ada-tests/sptests/spatcb01/Makefile.am
create mode 100644 c/src/ada-tests/sptests/spatcb01/ada_spatcb01.scn
create mode 100644 c/src/ada-tests/sptests/spatcb01/config.h
create mode 100644 c/src/ada-tests/sptests/spatcb01/spatcb01.adb
diff --git a/c/src/ada-tests/configure.ac b/c/src/ada-tests/configure.ac
index a94dbd747a..2f402ebd38 100644
--- a/c/src/ada-tests/configure.ac
+++ b/c/src/ada-tests/configure.ac
@@ -77,6 +77,7 @@ sptests/sp23/Makefile
sptests/sp24/Makefile
sptests/sp25/Makefile
sptests/spname01/Makefile
+sptests/spatcb01/Makefile
])
AC_CONFIG_FILES([
diff --git a/c/src/ada-tests/sptests/Makefile.am b/c/src/ada-tests/sptests/Makefile.am
index 5de1f4ea06..b6377f211c 100644
--- a/c/src/ada-tests/sptests/Makefile.am
+++ b/c/src/ada-tests/sptests/Makefile.am
@@ -22,6 +22,7 @@ SUBDIRS += sp23
SUBDIRS += sp24
SUBDIRS += sp25
SUBDIRS += spname01
+SUBDIRS += spatcb01
include $(top_srcdir)/../../../testsuites/automake/subdirs.am
include $(top_srcdir)/../../../testsuites/automake/local.am
diff --git a/c/src/ada-tests/sptests/spatcb01/Makefile.am b/c/src/ada-tests/sptests/spatcb01/Makefile.am
new file mode 100644
index 0000000000..59e99eab98
--- /dev/null
+++ b/c/src/ada-tests/sptests/spatcb01/Makefile.am
@@ -0,0 +1,16 @@
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../../../testsuites/automake/compile.am
+
+include $(top_srcdir)/ada.am
+
+noinst_PROGRAMS = ada_spatcb01
+ada_spatcb01_SOURCES = spatcb01.adb config.h
+ada_spatcb01_SOURCES += ../../support/init.c
+
+ada_spatcb01$(EXEEXT): spatcb01.adb init.$(OBJEXT)
+ $(GNATCOMPILE) -margs -a $< -o $@
+
+scndir = $(rtems_ada_testsdir)
+dist_scn_DATA = ada_spatcb01.scn
+
+include $(top_srcdir)/../../../testsuites/automake/local.am
diff --git a/c/src/ada-tests/sptests/spatcb01/ada_spatcb01.scn b/c/src/ada-tests/sptests/spatcb01/ada_spatcb01.scn
new file mode 100644
index 0000000000..7738ff8a0e
--- /dev/null
+++ b/c/src/ada-tests/sptests/spatcb01/ada_spatcb01.scn
@@ -0,0 +1,3 @@
+*** BEGIN OF TEST SPATCB 1 ***
+foreign thread
+*** END OF TEST SPATCB 1 ***
diff --git a/c/src/ada-tests/sptests/spatcb01/config.h b/c/src/ada-tests/sptests/spatcb01/config.h
new file mode 100644
index 0000000000..405b536c82
--- /dev/null
+++ b/c/src/ada-tests/sptests/spatcb01/config.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2017 embedded brains GmbH
+ *
+ * The license and distribution terms for this file may in
+ * the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
+
+#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/spatcb01/spatcb01.adb b/c/src/ada-tests/sptests/spatcb01/spatcb01.adb
new file mode 100644
index 0000000000..19aaa8031f
--- /dev/null
+++ b/c/src/ada-tests/sptests/spatcb01/spatcb01.adb
@@ -0,0 +1,26 @@
+--
+-- MAIN / BODY
+--
+-- DESCRIPTION:
+--
+-- Ensure that the SYSTEM.TASK_PRIMITIVES.OPERATIONS.SPECIFIC implementation
+-- works.
+--
+-- Copyright (c) 2017 embedded brains GmbH
+--
+-- The license and distribution terms for this file may in
+-- the file LICENSE in this distribution or at
+-- http://www.rtems.org/license/LICENSE.
+--
+
+with TEXT_IO;
+with System.Task_Primitives.Operations;
+with System.Tasking;
+
+procedure SPATCB01 is
+ Self_Id : constant System.Tasking.Task_Id := System.Task_Primitives.Operations.Self;
+begin
+ TEXT_IO.PUT_LINE( "*** BEGIN OF TEST SPATCB 1 ***" );
+ TEXT_IO.PUT_LINE( Self_Id.Common.Task_Image( 1 .. Self_Id.Common.Task_Image_Len ) );
+ TEXT_IO.PUT_LINE( "*** END OF TEST SPATCB 1 ***" );
+end SPATCB01;
--
2.12.0
More information about the devel
mailing list