4.115
Last change
on this file since 3cbedb1 was
3cbedb1,
checked in by Chris Johns <chrisj@…>, on 05/22/14 at 09:56:50
|
testsuite: Add a user keypress to start pppd.
Allow the test to run and pass when automatic testing.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[5f0cd34] | 1 | /* |
---|
| 2 | * COPYRIGHT (c) 1989-2012. |
---|
| 3 | * On-Line Applications Research Corporation (OAR). |
---|
| 4 | * |
---|
| 5 | * The license and distribution terms for this file may be |
---|
| 6 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 7 | * http://www.rtems.org/license/LICENSE. |
---|
[5f0cd34] | 8 | */ |
---|
| 9 | |
---|
[e313551] | 10 | #ifdef HAVE_CONFIG_H |
---|
| 11 | #include "config.h" |
---|
| 12 | #endif |
---|
| 13 | |
---|
[478bb1e6] | 14 | #include <stdio.h> |
---|
| 15 | #include <stdlib.h> |
---|
| 16 | #include <string.h> |
---|
| 17 | |
---|
| 18 | #define CONFIGURE_INIT |
---|
| 19 | #include "system.h" |
---|
| 20 | |
---|
[c0ec0d82] | 21 | #include <rtems/rtems_bsdnet.h> |
---|
| 22 | #include <rtems/rtemspppd.h> |
---|
[3cbedb1] | 23 | #include <rtems/shell.h> |
---|
[c0ec0d82] | 24 | #include "netconfig.h" |
---|
[478bb1e6] | 25 | |
---|
[9391f6d] | 26 | const char rtems_test_name[] = "PPPD"; |
---|
| 27 | |
---|
[3cbedb1] | 28 | static 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 | |
---|
[478bb1e6] | 36 | rtems_task Init(rtems_task_argument argument) |
---|
| 37 | { |
---|
[3cbedb1] | 38 | rtems_status_code status; |
---|
| 39 | |
---|
[9391f6d] | 40 | rtems_test_begin(); |
---|
| 41 | |
---|
[3cbedb1] | 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 | } |
---|
| 52 | |
---|
[478bb1e6] | 53 | /* initialize network */ |
---|
| 54 | rtems_bsdnet_initialize_network(); |
---|
| 55 | rtems_pppd_initialize(); |
---|
| 56 | pppdapp_initialize(); |
---|
| 57 | rtems_task_delete(RTEMS_SELF); |
---|
| 58 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.