summaryrefslogtreecommitdiffstats
path: root/c/src/ada-tests/tmtests/tmck
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 /c/src/ada-tests/tmtests/tmck
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 'c/src/ada-tests/tmtests/tmck')
-rw-r--r--c/src/ada-tests/tmtests/tmck/Makefile.am13
-rw-r--r--c/src/ada-tests/tmtests/tmck/config.h32
-rw-r--r--c/src/ada-tests/tmtests/tmck/tmck.adb55
-rw-r--r--c/src/ada-tests/tmtests/tmck/tmtest.adb214
-rw-r--r--c/src/ada-tests/tmtests/tmck/tmtest.ads96
5 files changed, 0 insertions, 410 deletions
diff --git a/c/src/ada-tests/tmtests/tmck/Makefile.am b/c/src/ada-tests/tmtests/tmck/Makefile.am
deleted file mode 100644
index 7bbe2d7765..0000000000
--- a/c/src/ada-tests/tmtests/tmck/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../testsuites/automake/compile.am
-
-include $(top_srcdir)/ada.am
-
-noinst_PROGRAMS = ada_tmck
-ada_tmck_SOURCES = tmck.adb config.h tmtest.adb tmtest.ads
-ada_tmck_SOURCES += ../../support/init.c
-
-ada_tmck$(EXEEXT): tmck.adb init.$(OBJEXT)
- $(GNATCOMPILE) -margs -a $< -o $@
-
-include $(top_srcdir)/../../../testsuites/automake/local.am
diff --git a/c/src/ada-tests/tmtests/tmck/config.h b/c/src/ada-tests/tmtests/tmck/config.h
deleted file mode 100644
index 7730385b3c..0000000000
--- a/c/src/ada-tests/tmtests/tmck/config.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * 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_TMTEST
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-
-#include <rtems/confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tmck/tmck.adb b/c/src/ada-tests/tmtests/tmck/tmck.adb
deleted file mode 100644
index c35d786517..0000000000
--- a/c/src/ada-tests/tmtests/tmck/tmck.adb
+++ /dev/null
@@ -1,55 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TMCK of the Timing 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 TMTEST;
-with TEST_SUPPORT;
-
-procedure TMCK 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,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TMCK;
-
diff --git a/c/src/ada-tests/tmtests/tmck/tmtest.adb b/c/src/ada-tests/tmtests/tmck/tmtest.adb
deleted file mode 100644
index 8da1ff220a..0000000000
--- a/c/src/ada-tests/tmtests/tmck/tmtest.adb
+++ /dev/null
@@ -1,214 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Timer Check Test of the RTEMS
--- Timing 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 TIMER_DRIVER;
-with INTERFACES; use INTERFACES;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASKS.ARGUMENT
- ) is
- pragma Unreferenced(ARGUMENT);
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST CHECK ***" );
-
- TIMER_DRIVER.SET_FIND_AVERAGE_OVERHEAD( TRUE );
-
- TMTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- RTEMS.TASKS.CREATE(
- TMTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASKS.START(
- TMTEST.TASK_ID( 1 ),
- TMTEST.TASK_1'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;
-
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASKS.ARGUMENT
- ) is
- pragma Unreferenced(ARGUMENT);
- begin
-
- TMTEST.CHECK_READ_TIMER;
-
-TEST_SUPPORT.PAUSE;
-
- TIMER_DRIVER.INITIALIZE;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "NULL timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 0 .. 1000
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "LOOP (1000) timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 0 .. 10000
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "LOOP (10000) timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 0 .. 50000
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "LOOP (50000) timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 0 .. 100000
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "LOOP (100000) timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TEXT_IO.PUT_LINE( "*** END OF TIME TEST CHECK ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---
--- CHECK_READ_TIMER
---
-
- procedure CHECK_READ_TIMER
- is
- TIME : RTEMS.UNSIGNED32;
- begin
-
- for INDEX in TMTEST.DISTRIBUTION'FIRST .. TMTEST.DISTRIBUTION'LAST
- loop
- TMTEST.DISTRIBUTION( INDEX ) := 0;
- end loop;
-
- for INDEX in 1 .. TMTEST.OPERATION_COUNT
- loop
-
- loop
- TIMER_DRIVER.INITIALIZE;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- exit when
- TMTEST.END_TIME <= RTEMS.UNSIGNED32( TMTEST.DISTRIBUTION'LAST );
-
- TEXT_IO.PUT( "TOO LONG (" );
- UNSIGNED32_IO.PUT( TMTEST.END_TIME );
- TEXT_IO.PUT_LINE( ")!!!" );
- end loop;
-
- TMTEST.DISTRIBUTION( TMTEST.END_TIME ) :=
- TMTEST.DISTRIBUTION( TMTEST.END_TIME ) + 1;
-
- end loop;
-
- TEXT_IO.PUT_LINE(
- "Units may not be in microseconds for this test!!!"
- );
-
- TIME := 0;
-
- for INDEX in TMTEST.DISTRIBUTION'FIRST .. TMTEST.DISTRIBUTION'LAST
- loop
- if TMTEST.DISTRIBUTION( INDEX ) /= 0 then
- TIME := TIME + (TMTEST.DISTRIBUTION( INDEX ) * INDEX);
- UNSIGNED32_IO.PUT( INDEX );
- TEXT_IO.PUT( " " );
- UNSIGNED32_IO.PUT( TMTEST.DISTRIBUTION( INDEX ) );
- TEXT_IO.NEW_LINE;
- end if;
- end loop;
-
- TEXT_IO.PUT( "Total time = " );
- UNSIGNED32_IO.PUT( TIME );
- TEXT_IO.NEW_LINE;
-
- end CHECK_READ_TIMER;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tmck/tmtest.ads b/c/src/ada-tests/tmtests/tmck/tmtest.ads
deleted file mode 100644
index 6eef577910..0000000000
--- a/c/src/ada-tests/tmtests/tmck/tmtest.ads
+++ /dev/null
@@ -1,96 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Timer Check Test of the RTEMS
--- Timing 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 TMTEST 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;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- The following defines the number of iterations of each timed
--- operation to perform.
---
-
- OPERATION_COUNT : constant RTEMS.UNSIGNED32 := 100000;
-
---
--- The following array is used to determine how many times
--- each time between 0 and 1000 microseconds was returned
--- when simply starting and stopping the timer.
-
- DISTRIBUTION : array ( RTEMS.UNSIGNED32 range 0 .. 10000 ) of RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASKS.ARGUMENT
- );
- pragma Convention (C, INIT);
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task invokes CHECK_READ_TIMER before demonstrating
--- that increasing the order of magnitude of the number of loop
--- iterations performed has a corresponding impact on the time
--- reported by the timer driver.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASKS.ARGUMENT
- );
- pragma Convention (C, TASK_1);
-
---
--- CHECK_READ_TIMER
---
--- DESCRIPTION:
---
--- This subprogram is used to determine the overhead associated
--- with starting and stopping the timer. It is also useful
--- for determining if unexpected times will be reported.
---
-
- procedure CHECK_READ_TIMER;
-
-end TMTEST;