Benny Prijono | fb947dd | 2008-10-07 20:23:01 +0000 | [diff] [blame] | 1 | /* $Id$ */ |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 2 | /* |
Benny Prijono | 844653c | 2008-12-23 17:27:53 +0000 | [diff] [blame] | 3 | * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com) |
Benny Prijono | 32177c0 | 2008-06-20 22:44:47 +0000 | [diff] [blame] | 4 | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 5 | * |
| 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 | */ |
Benny Prijono | 4ea0bf1 | 2006-02-02 19:16:07 +0000 | [diff] [blame] | 20 | #include "test.h" |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 21 | |
Benny Prijono | 42c5b9e | 2006-05-10 19:24:40 +0000 | [diff] [blame] | 22 | |
| 23 | /* Any tests that want to build a linked executable for RTEMS must include |
| 24 | this header to get a default config for the network stack. */ |
| 25 | #if defined(PJ_RTEMS) |
| 26 | # include <bsp.h> |
| 27 | # include <rtems.h> |
| 28 | # include <rtems/rtems_bsdnet.h> |
| 29 | # include "../../../pjlib/include/rtems-network-config.h" |
| 30 | #endif |
| 31 | |
| 32 | |
Benny Prijono | fb947dd | 2008-10-07 20:23:01 +0000 | [diff] [blame] | 33 | int main(int argc, char *argv[]) |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 34 | { |
Benny Prijono | 4ea0bf1 | 2006-02-02 19:16:07 +0000 | [diff] [blame] | 35 | int rc; |
| 36 | char s[10]; |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 37 | |
Benny Prijono | 4ea0bf1 | 2006-02-02 19:16:07 +0000 | [diff] [blame] | 38 | rc = test_main(); |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 39 | |
Benny Prijono | fb947dd | 2008-10-07 20:23:01 +0000 | [diff] [blame] | 40 | if (argc == 2 && argv[1][0]=='-' && argv[1][1]=='i') { |
| 41 | puts("\nPress <ENTER> to quit"); |
Benny Prijono | 32d267b | 2009-01-01 22:08:21 +0000 | [diff] [blame] | 42 | if (fgets(s, sizeof(s), stdin) == NULL) |
| 43 | return rc; |
Benny Prijono | fb947dd | 2008-10-07 20:23:01 +0000 | [diff] [blame] | 44 | } |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 45 | |
Benny Prijono | 4ea0bf1 | 2006-02-02 19:16:07 +0000 | [diff] [blame] | 46 | return rc; |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 47 | } |
Benny Prijono | 20da799 | 2008-12-18 16:48:43 +0000 | [diff] [blame] | 48 | |
| 49 | |