blob: e6ee12e52f3d2d3f74e385effdd6906d2b411413 [file] [log] [blame]
Benny Prijonofb947dd2008-10-07 20:23:01 +00001/* $Id$ */
Benny Prijono5dcb38d2005-11-21 01:55:47 +00002/*
Benny Prijono844653c2008-12-23 17:27:53 +00003 * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
Benny Prijono32177c02008-06-20 22:44:47 +00004 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
Benny Prijono5dcb38d2005-11-21 01:55:47 +00005 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
Sauw Ming01095d82011-07-14 08:46:19 +000020#include <pj/os.h>
21
Benny Prijono4ea0bf12006-02-02 19:16:07 +000022#include "test.h"
Benny Prijono5dcb38d2005-11-21 01:55:47 +000023
Benny Prijono42c5b9e2006-05-10 19:24:40 +000024
25/* Any tests that want to build a linked executable for RTEMS must include
26 this header to get a default config for the network stack. */
27#if defined(PJ_RTEMS)
28# include <bsp.h>
29# include <rtems.h>
30# include <rtems/rtems_bsdnet.h>
31# include "../../../pjlib/include/rtems-network-config.h"
32#endif
33
Sauw Ming01095d82011-07-14 08:46:19 +000034static int main_func(int argc, char *argv[])
Benny Prijono5dcb38d2005-11-21 01:55:47 +000035{
Benny Prijono4ea0bf12006-02-02 19:16:07 +000036 int rc;
37 char s[10];
Benny Prijono5dcb38d2005-11-21 01:55:47 +000038
Benny Prijono4ea0bf12006-02-02 19:16:07 +000039 rc = test_main();
Benny Prijono5dcb38d2005-11-21 01:55:47 +000040
Benny Prijonofb947dd2008-10-07 20:23:01 +000041 if (argc == 2 && argv[1][0]=='-' && argv[1][1]=='i') {
42 puts("\nPress <ENTER> to quit");
Benny Prijono32d267b2009-01-01 22:08:21 +000043 if (fgets(s, sizeof(s), stdin) == NULL)
44 return rc;
Benny Prijonofb947dd2008-10-07 20:23:01 +000045 }
Benny Prijono5dcb38d2005-11-21 01:55:47 +000046
Benny Prijono4ea0bf12006-02-02 19:16:07 +000047 return rc;
Benny Prijono5dcb38d2005-11-21 01:55:47 +000048}
Benny Prijono20da7992008-12-18 16:48:43 +000049
Sauw Ming01095d82011-07-14 08:46:19 +000050int main(int argc, char *argv[])
51{
52 return pj_run_app(&main_func, argc, argv, 0);
53}