diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-12 10:00:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-12 10:53:16 +0200 |
commit | ee537ea3dd964d4de3565a36b4857af31fb5a3f4 (patch) | |
tree | ad8b328a58469ca0632e3e61cd94f37c9d97cc25 /testsuites/ada/mptests/mp14/node2 | |
parent | ada-tests: Use _SUBDIRS instead of SUBDIRS (diff) | |
download | rtems-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/mptests/mp14/node2')
-rw-r--r-- | testsuites/ada/mptests/mp14/node2/Makefile.am | 19 | ||||
-rw-r--r-- | testsuites/ada/mptests/mp14/node2/ada_mp14-node2.scn | 28 | ||||
-rw-r--r-- | testsuites/ada/mptests/mp14/node2/config.h | 21 | ||||
-rw-r--r-- | testsuites/ada/mptests/mp14/node2/mp14_node2.adb | 56 |
4 files changed, 124 insertions, 0 deletions
diff --git a/testsuites/ada/mptests/mp14/node2/Makefile.am b/testsuites/ada/mptests/mp14/node2/Makefile.am new file mode 100644 index 0000000000..b694774c46 --- /dev/null +++ b/testsuites/ada/mptests/mp14/node2/Makefile.am @@ -0,0 +1,19 @@ +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am + +include $(top_srcdir)/ada.am + +AM_ADAFLAGS += -I$(srcdir)/.. + +noinst_PROGRAMS = mp14_ada_mp14_node2 +mp14_ada_mp14_node2_SOURCES = mp14_node2.adb ../mptest.adb config.h +mp14_ada_mp14_node2_SOURCES += ../mptest.ads +mp14_ada_mp14_node2_SOURCES += ../../../support/init.c + +mp14_ada_mp14_node2$(EXEEXT): mp14_node2.adb ../mptest.adb init.$(OBJEXT) + $(GNATCOMPILE) -margs -a $< -o $@ + +scndir = $(rtems_ada_testsdir) +dist_scn_DATA = ada_mp14-node2.scn + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/ada/mptests/mp14/node2/ada_mp14-node2.scn b/testsuites/ada/mptests/mp14/node2/ada_mp14-node2.scn new file mode 100644 index 0000000000..a245b11faa --- /dev/null +++ b/testsuites/ada/mptests/mp14/node2/ada_mp14-node2.scn @@ -0,0 +1,28 @@ +*** TEST 14 -- NODE 2 *** +Creating Event task (Global) +Starting Event task (Global) +Creating Semaphore task (Global) +About to go to sleep! +Starting Semaphore task (Global) +Creating Message Queue task (Global) +Getting SMID of semaphore +Starting Message Queue task (Global) +Creating Partition task (Global) +Getting ID of msg queue +Starting Partition task (Global) +Getting ID of partition +Waking up! +Remote task's name is : 111 +Getting TID of remote task +Receiving events from remote task +<stream of following characters> +. - indicates 100 iterations of +tm_evafter of 1 tick and event_receive. +e - indicates that 100 +events have been sent to the remote task. +m - indicates 100 iterations of +message_queue_send and message_queue_receive. +p - indicates 100 iterations of +partition_get_buffer and partition_return_buffer. +s - indicates 100 iterations of +semaphore_obtain and semaphore_release. diff --git a/testsuites/ada/mptests/mp14/node2/config.h b/testsuites/ada/mptests/mp14/node2/config.h new file mode 100644 index 0000000000..47edf66149 --- /dev/null +++ b/testsuites/ada/mptests/mp14/node2/config.h @@ -0,0 +1,21 @@ +/* config.h + * + * This include file defines the Configuration Table for this test. + * + * COPYRIGHT (c) 1989-2007. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may in + * the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + + +/* configuration information */ + +#define CONFIGURE_MP_APPLICATION +#define CONFIGURE_MP_NODE_NUMBER 2 + +#include "../config_base.h" + +/* end of include file */ diff --git a/testsuites/ada/mptests/mp14/node2/mp14_node2.adb b/testsuites/ada/mptests/mp14/node2/mp14_node2.adb new file mode 100644 index 0000000000..fb92b69554 --- /dev/null +++ b/testsuites/ada/mptests/mp14/node2/mp14_node2.adb @@ -0,0 +1,56 @@ +-- +-- MAIN / BODY +-- +-- DESCRIPTION: +-- +-- This is the entry point for Test MP14_NODE2 of the Multiprocessor +-- Test Suite. +-- +-- DEPENDENCIES: +-- +-- +-- +-- COPYRIGHT (c) 1989-2011. +-- On-Line Applications Research Corporation (OAR). +-- +-- 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 RTEMS; +with RTEMS.TASKS; +with MPTEST; +with TEST_SUPPORT; + +procedure MP14_NODE2 is + INIT_ID : RTEMS.ID; + STATUS : RTEMS.STATUS_CODES; +begin + + RTEMS.TASKS.CREATE( + RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ), + 1, + RTEMS.MINIMUM_STACK_SIZE, + RTEMS.NO_PREEMPT, + RTEMS.DEFAULT_ATTRIBUTES, + INIT_ID, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" ); + + + RTEMS.TASKS.START( + INIT_ID, + MPTEST.INIT'ACCESS, + 0, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" ); + + loop + delay 120.0; + end loop; + +end MP14_NODE2; + |