summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-10-07 20:23:01 +0000
committerBenny Prijono <bennylp@teluu.com>2008-10-07 20:23:01 +0000
commitc9af9a5726ec785f886c33023794c6779b0c6aca (patch)
treef5817d2b27e6843e8ea28f23a984c5e33443b6fc /pjmedia
parentb69329b3f712c320b0e0746cafcc8d47250e1c05 (diff)
Added pjmedia-test to build system and changed it to not always wait for keyboard input to finish the test
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2344 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/build/Makefile3
-rw-r--r--pjmedia/src/test/main.c11
2 files changed, 8 insertions, 6 deletions
diff --git a/pjmedia/build/Makefile b/pjmedia/build/Makefile
index adf0bcfe..291339a7 100644
--- a/pjmedia/build/Makefile
+++ b/pjmedia/build/Makefile
@@ -106,8 +106,7 @@ export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
#
# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
#
-TARGETS := pjmedia pjmedia-codec pjsdp
-#pjmedia-test
+TARGETS := pjmedia pjmedia-codec pjsdp pjmedia-test
all: $(TARGETS)
diff --git a/pjmedia/src/test/main.c b/pjmedia/src/test/main.c
index 9ba5b450..99215768 100644
--- a/pjmedia/src/test/main.c
+++ b/pjmedia/src/test/main.c
@@ -1,4 +1,4 @@
-/* $Id:$ */
+/* $Id$ */
/*
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
*
@@ -29,15 +29,18 @@
#endif
-int main()
+int main(int argc, char *argv[])
{
int rc;
char s[10];
rc = test_main();
- puts("\nPress <ENTER> to quit");
- fgets(s, sizeof(s), stdin);
+ if (argc == 2 && argv[1][0]=='-' && argv[1][1]=='i') {
+ puts("\nPress <ENTER> to quit");
+ fgets(s, sizeof(s), stdin);
+ }
return rc;
}
+ \ No newline at end of file