summaryrefslogtreecommitdiffstats
path: root/testsuites/ada/sptests/spatcb01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-12 10:00:10 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-12 10:53:16 +0200
commitee537ea3dd964d4de3565a36b4857af31fb5a3f4 (patch)
treead8b328a58469ca0632e3e61cd94f37c9d97cc25 /testsuites/ada/sptests/spatcb01
parentada-tests: Use _SUBDIRS instead of SUBDIRS (diff)
downloadrtems-ee537ea3dd964d4de3565a36b4857af31fb5a3f4.tar.bz2
ada-tests: Move to testsuites/ada
This solves a build dependency issue, e.g. building tests before librtemsbsp.a exists. Close #3079.
Diffstat (limited to 'testsuites/ada/sptests/spatcb01')
-rw-r--r--testsuites/ada/sptests/spatcb01/Makefile.am16
-rw-r--r--testsuites/ada/sptests/spatcb01/ada_spatcb01.scn3
-rw-r--r--testsuites/ada/sptests/spatcb01/config.h16
-rw-r--r--testsuites/ada/sptests/spatcb01/spatcb01.adb26
4 files changed, 61 insertions, 0 deletions
diff --git a/testsuites/ada/sptests/spatcb01/Makefile.am b/testsuites/ada/sptests/spatcb01/Makefile.am
new file mode 100644
index 0000000000..0e5dbaf652
--- /dev/null
+++ b/testsuites/ada/sptests/spatcb01/Makefile.am
@@ -0,0 +1,16 @@
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../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)/../automake/local.am
diff --git a/testsuites/ada/sptests/spatcb01/ada_spatcb01.scn b/testsuites/ada/sptests/spatcb01/ada_spatcb01.scn
new file mode 100644
index 0000000000..7738ff8a0e
--- /dev/null
+++ b/testsuites/ada/sptests/spatcb01/ada_spatcb01.scn
@@ -0,0 +1,3 @@
+*** BEGIN OF TEST SPATCB 1 ***
+foreign thread
+*** END OF TEST SPATCB 1 ***
diff --git a/testsuites/ada/sptests/spatcb01/config.h b/testsuites/ada/sptests/spatcb01/config.h
new file mode 100644
index 0000000000..405b536c82
--- /dev/null
+++ b/testsuites/ada/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/testsuites/ada/sptests/spatcb01/spatcb01.adb b/testsuites/ada/sptests/spatcb01/spatcb01.adb
new file mode 100644
index 0000000000..19aaa8031f
--- /dev/null
+++ b/testsuites/ada/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;