Changeset 3cbedb1 in rtems


Ignore:
Timestamp:
May 22, 2014, 9:56:50 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, master
Children:
40741c44
Parents:
e9d98071
Message:

testsuite: Add a user keypress to start pppd.

Allow the test to run and pass when automatic testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/samples/pppd/init.c

    re9d98071 r3cbedb1  
    2121#include <rtems/rtems_bsdnet.h>
    2222#include <rtems/rtemspppd.h>
     23#include <rtems/shell.h>
    2324#include "netconfig.h"
    2425
    2526const char rtems_test_name[] = "PPPD";
    2627
     28static void notification(int fd, int seconds_remaining, void *arg)
     29{
     30  printf(
     31    "Press any key to start pppd (%is remaining)\n",
     32    seconds_remaining
     33  );
     34}
     35
    2736rtems_task Init(rtems_task_argument argument)
    2837{
     38  rtems_status_code status;
     39
    2940  rtems_test_begin();
     41
     42  status = rtems_shell_wait_for_input(
     43    STDIN_FILENO,
     44    10,
     45    notification,
     46    NULL
     47  );
     48  if (status != RTEMS_SUCCESSFUL) {
     49    rtems_test_end();
     50    exit( 0 );
     51  }
    3052
    3153  /* initialize network */
Note: See TracChangeset for help on using the changeset viewer.