summaryrefslogtreecommitdiffstats
path: root/testsuites/samples/pppd
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-05-22 19:56:50 +1000
committerChris Johns <chrisj@rtems.org>2014-05-22 19:56:50 +1000
commit3cbedb1ba8ea1e69c4061030a4b809da753103b2 (patch)
tree2df45c92531d6a04497912a1c315aaa016b8402c /testsuites/samples/pppd
parentbsp/zynq: Add BSP_ZYNQ_RAM_LENGTH to allow a user to override the RAM length. (diff)
downloadrtems-3cbedb1ba8ea1e69c4061030a4b809da753103b2.tar.bz2
testsuite: Add a user keypress to start pppd.
Allow the test to run and pass when automatic testing.
Diffstat (limited to 'testsuites/samples/pppd')
-rw-r--r--testsuites/samples/pppd/init.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuites/samples/pppd/init.c b/testsuites/samples/pppd/init.c
index 938eec5d12..7217684ec7 100644
--- a/testsuites/samples/pppd/init.c
+++ b/testsuites/samples/pppd/init.c
@@ -20,14 +20,36 @@
#include <rtems/rtems_bsdnet.h>
#include <rtems/rtemspppd.h>
+#include <rtems/shell.h>
#include "netconfig.h"
const char rtems_test_name[] = "PPPD";
+static void notification(int fd, int seconds_remaining, void *arg)
+{
+ printf(
+ "Press any key to start pppd (%is remaining)\n",
+ seconds_remaining
+ );
+}
+
rtems_task Init(rtems_task_argument argument)
{
+ rtems_status_code status;
+
rtems_test_begin();
+ status = rtems_shell_wait_for_input(
+ STDIN_FILENO,
+ 10,
+ notification,
+ NULL
+ );
+ if (status != RTEMS_SUCCESSFUL) {
+ rtems_test_end();
+ exit( 0 );
+ }
+
/* initialize network */
rtems_bsdnet_initialize_network();
rtems_pppd_initialize();