ada-tests: Move to testsuites/ada

This solves a build dependency issue, e.g. building tests before
librtemsbsp.a exists.

Close #3079.
This commit is contained in:
Sebastian Huber
2017-10-12 10:00:10 +02:00
parent b3874e1531
commit ee537ea3dd
522 changed files with 259 additions and 259 deletions

View File

@@ -0,0 +1,21 @@
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../automake/compile.am
_SUBDIRS = node1 node2
#include $(top_srcdir)/ada.am
#mptest$(EXEEXT): mptest.adb
# $(GNATCOMPILE) -margs -a $< -o $@
#if EXPADA
#noinst_PROGRAMS = mptest
#endif
#mptest_exe_SOURCES = mptest.adb mptest.ads
#EXTRA_DIST += node1/mptest-per_node_configuration.adb
#EXTRA_DIST += node2/mptest-per_node_configuration.adb
include $(top_srcdir)/../automake/subdirs.am
include $(top_srcdir)/../automake/local.am

View File

@@ -0,0 +1,34 @@
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* 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.
*/
/* configuration information */
#define CONFIGURE_MP_APPLICATION
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
/*
* Put the overrides of default configuration parameters here.
*/
#include <rtems/confdefs.h>
/* end of include file */

View File

@@ -0,0 +1,100 @@
--
-- MPTEST / BODY
--
-- DESCRIPTION:
--
-- This package is the implementation for Test 1 of the RTEMS
-- 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 INTERFACES; use INTERFACES;
with RTEMS;
with RTEMS.INTERRUPT;
with RTEMS.TASKS;
with TEST_SUPPORT;
with TEXT_IO;
with UNSIGNED32_IO;
package body MPTEST is
--
-- INIT
--
procedure INIT (
ARGUMENT : in RTEMS.TASKS.ARGUMENT
) is
STATUS : RTEMS.STATUS_CODES;
begin
TEXT_IO.NEW_LINE( 2 );
TEXT_IO.PUT( "*** SAMPLE MULTIPROCESSOR APPLICATION ***" );
TEXT_IO.PUT( "Creating and starting an application task" );
MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
RTEMS.TASKS.CREATE(
MPTEST.TASK_NAME( 1 ),
1,
2048,
RTEMS.INTERRUPT_LEVEL( 0 ),
RTEMS.DEFAULT_ATTRIBUTES,
MPTEST.TASK_ID( 1 ),
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
RTEMS.TASKS.START(
MPTEST.TASK_ID( 1 ),
MPTEST.APPLICATION_TASK'ACCESS,
0,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
RTEMS.TASKS.DELETE( RTEMS.SELF, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
end INIT;
--
-- APPLICATION_TASK
--
procedure APPLICATION_TASK (
ARGUMENT : in RTEMS.TASKS.ARGUMENT
) is
TID : RTEMS.ID;
STATUS : RTEMS.STATUS_CODES;
begin
RTEMS.TASKS.IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
TEXT_IO.PUT( "This task was invoked with node argument (" );
UNSIGNED32_IO.PUT( ARGUMENT );
TEXT_IO.PUT_LINE( ")" );
TEXT_IO.PUT( "This task has the id of 0x" );
UNSIGNED32_IO.PUT( TID, BASE => 16 );
TEXT_IO.NEW_LINE;
TEXT_IO.PUT_LINE( "*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end APPLICATION_TASK;
end MPTEST;

View File

@@ -0,0 +1,62 @@
--
-- MPTEST / SPECIFICATION
--
-- DESCRIPTION:
--
-- This package is the specification for Test 1 of the RTEMS
-- 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;
package MPTEST is
--
-- These arrays contain the IDs and NAMEs of all RTEMS tasks created
-- by this test.
--
TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
--
-- INIT
--
-- DESCRIPTION:
--
-- This RTEMS task initializes the application.
--
procedure INIT (
ARGUMENT : in RTEMS.TASKS.ARGUMENT
);
pragma Convention (C, INIT);
--
-- APPLICATION_TASK
--
-- DESCRIPTION:
--
-- This routine is as an example of an application task which
-- prints a message including its RTEMS task id. This task
-- then invokes exit to return to the monitor.
--
procedure APPLICATION_TASK (
ARGUMENT : in RTEMS.TASKS.ARGUMENT
);
pragma Convention (C, APPLICATION_TASK);
end MPTEST;

View File

@@ -0,0 +1,22 @@
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/ada.am
AM_ADAFLAGS += -I$(srcdir)/..
if EXPADA
noinst_PROGRAMS = ada_base_mp_node1
ada_base_mp_node1_SOURCES = mptest-per_node_configuration.adb
endif
ada_base_mp_node1$(EXEEXT): ../mptest.adb init.o
$(GNATCOMPILE) -margs -a $< -o $@
init.o: ../../../support/init.c
$(COMPILE.c) -DNODE_NUMBER=1 -I$(srcdir)/.. -c $<
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = ada_base_mp-node1.scn
include $(top_srcdir)/../automake/local.am

View File

@@ -0,0 +1,5 @@
*** SAMPLE MULTIPROCESSOR APPLICATION ***
Creating and starting an application task
This task was invoked with the node argument (1)
This task has the id of 0x10002
*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***

View File

@@ -0,0 +1,22 @@
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/ada.am
AM_ADAFLAGS += -I$(srcdir)/..
if EXPADA
noinst_PROGRAMS = ada_base_mp_node2
ada_base_mp_node2_SOURCES = mptest-per_node_configuration.adb
endif
ada_base_mp_node2$(EXEEXT): ../mptest.adb init.o
$(GNATCOMPILE) -margs -a $< -o $@
init.o: ../../../support/init.c
$(COMPILE.c) -DNODE_NUMBER=2 -I$(srcdir)/.. -c $<
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = ada_base_mp-node2.scn
include $(top_srcdir)/../automake/local.am

View File

@@ -0,0 +1,5 @@
*** SAMPLE MULTIPROCESSOR APPLICATION ***
Creating and starting an application task
This task was invoked with the node argument (2)
This task has the id of 0x20002
*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***