Changeset 3eade710 in rtems


Ignore:
Timestamp:
11/20/14 07:52:50 (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
f0c564c
Parents:
96a9f4c
git-author:
Sebastian Huber <sebastian.huber@…> (11/20/14 07:52:50)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/20/14 07:54:10)
Message:

libtests/top: End test after some time if no input

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/top/init.c

    r96a9f4c r3eade710  
    2525#include "system.h"
    2626
     27#include <rtems/shell.h>
     28
    2729const char rtems_test_name[] = "TOP";
    2830
     
    4749}
    4850
     51static void notification(int fd, int seconds_remaining, void *arg)
     52{
     53  printf(
     54    "Press any key to enter top test (%is remaining)\n",
     55    seconds_remaining
     56  );
     57}
     58
    4959rtems_task Init(
    5060  rtems_task_argument argument
     
    5565
    5666  TEST_BEGIN();
     67
     68  status = rtems_shell_wait_for_input(
     69    STDIN_FILENO,
     70    20,
     71    notification,
     72    NULL
     73  );
     74  if ( status != RTEMS_SUCCESSFUL ) {
     75    TEST_END();
     76
     77    rtems_test_exit( 0 );
     78  }
     79
    5780  build_time( &time, 12, 31, 1988, 9, 15, 0, 0 );
    5881
Note: See TracChangeset for help on using the changeset viewer.