2008-02-04 Joel Sherrill <joel.sherrill@oarcorp.com>

* configure.ac, sptests/Makefile.am: Exercise passing as object Id of
	SELF.
	* sptests/spname01/.cvsignore, sptests/spname01/Makefile.am,
	sptests/spname01/ada_spname01.scn, sptests/spname01/spname01.adb,
	sptests/spname01/sptest.adb, sptests/spname01/sptest.ads: New files.
This commit is contained in:
Joel Sherrill
2008-02-04 17:18:01 +00:00
parent 60735a304c
commit 3ca942abf8
9 changed files with 168 additions and 0 deletions

View File

@@ -1,3 +1,11 @@
2008-02-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac, sptests/Makefile.am: Exercise passing as object Id of
SELF.
* sptests/spname01/.cvsignore, sptests/spname01/Makefile.am,
sptests/spname01/ada_spname01.scn, sptests/spname01/spname01.adb,
sptests/spname01/sptest.adb, sptests/spname01/sptest.ads: New files.
2008-02-01 Joel Sherrill <joel.sherrill@oarcorp.com>
* mptests/mp01/node1/Makefile.am, mptests/mp01/node2/Makefile.am,

View File

@@ -78,6 +78,7 @@ sptests/sp22/Makefile
sptests/sp23/Makefile
sptests/sp24/Makefile
sptests/sp25/Makefile
sptests/spname01/Makefile
])
AC_CONFIG_FILES([

View File

@@ -23,6 +23,7 @@ SUBDIRS += sp22
SUBDIRS += sp23
SUBDIRS += sp24
SUBDIRS += sp25
SUBDIRS += spname01
include $(top_srcdir)/../../../testsuites/automake/subdirs.am
include $(top_srcdir)/../../../testsuites/automake/local.am

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@@ -0,0 +1,21 @@
## $Id$
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../testsuites/automake/compile.am
include $(top_srcdir)/ada.am
ada_spname01.exe: spname01.adb init.$(OBJEXT)
$(GNATCOMPILE) -margs -a $< -o $@
init.$(OBJEXT): ../../support/init.c
$(COMPILE.c) -I$(srcdir) -c $<
noinst_PROGRAMS = ada_spname01.exe
ada_spname01_exe_SOURCES = spname01.adb config.h sptest.adb sptest.ads
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = ada_spname01.scn
include $(top_srcdir)/../../../testsuites/automake/local.am

View File

@@ -0,0 +1,3 @@
*** Ada Task Name TEST ***
TBD
*** END OF Ada Task Name TEST ***

View File

@@ -0,0 +1,36 @@
--
-- MAIN / BODY
--
-- DESCRIPTION:
--
-- This is the entry point for Test Hello of the Sample Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-2008.
-- 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.com/license/LICENSE.
--
-- $Id$
--
with RTEMS;
with SPTEST;
with TEST_SUPPORT;
procedure SPNAME01 is
INIT_ID : RTEMS.ID;
STATUS : RTEMS.STATUS_CODES;
begin
loop
delay 120.0;
end loop;
end SPNAME01;

View File

@@ -0,0 +1,66 @@
--
-- SPTEST / BODY
--
-- DESCRIPTION:
--
-- This package is the implementation of the Ada Task Name test of the RTEMS
-- Ada Single Processor Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-2008.
-- 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.com/license/LICENSE.
--
-- $Id$
--
with INTERFACES; use INTERFACES;
with RTEMS;
with TEST_SUPPORT;
with TEXT_IO;
with Ada.Strings.Unbounded;
with System; use System; -- for Null Pointer comparison
package body SPTEST is
task body AdaTask is
Status : RTEMS.Status_Codes;
Pointer : RTEMS.Address;
StringName : String(1 .. 120) := (1 .. 120 => '*' );
NewName : constant String := "Josiah";
begin
TEXT_IO.NEW_LINE( 2 );
TEXT_IO.PUT_LINE( "*** Ada Task Name TEST ***" );
RTEMS.Object_Get_Name( RTEMS.Self, StringName, Pointer );
if Pointer = RTEMS.Null_Address then
TEXT_IO.PUT_LINE( "Object_Get_Name_Failed" );
else
TEXT_IO.PUT_LINE( "My name is (" & StringName & ")" );
end if;
TEXT_IO.PUT_LINE( "Setting name to (Josiah)" );
RTEMS.Object_Set_Name( RTEMS.Self, NewName, Status );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "Object_Set_Name" );
RTEMS.Object_Get_Name( RTEMS.Self, StringName, Pointer );
if Pointer = RTEMS.Null_Address then
TEXT_IO.PUT_LINE( "Object_Get_Name_Failed" );
else
TEXT_IO.PUT_LINE( "My name is (" & StringName & ")" );
end if;
TEXT_IO.PUT_LINE( "*** END OF Ada Task Name TEST ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end AdaTask;
end SPTEST;

View File

@@ -0,0 +1,30 @@
--
-- SPTEST / SPECIFICATION
--
-- DESCRIPTION:
--
-- This package is the specification for the Hello World Test of the RTEMS
-- Sample Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-2008.
-- 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.com/license/LICENSE.
--
-- $Id$
--
with RTEMS;
package SPTEST is
task AdaTask;
end SPTEST;