From 05b6736a9a0d834194be217cafeeeab0dd73af67 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 2 Jan 2009 18:15:07 +0000 Subject: Test refinements for mingw etc. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2410 74dad513-b988-da41-8d7b-12977e46ad98 --- tests/cdash/README.TXT | 9 ++++++++ tests/cdash/builder.py | 28 ++++++++++++++----------- tests/cdash/cfg_gnu.py | 7 +++++-- tests/cdash/cfg_msvc.py | 5 ++++- tests/cdash/cfg_site_sample.py | 6 ++++++ tests/cdash/cfg_symbian.py | 2 ++ tests/cdash/starttest_sample.bat | 44 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 86 insertions(+), 15 deletions(-) create mode 100644 tests/cdash/starttest_sample.bat (limited to 'tests/cdash') diff --git a/tests/cdash/README.TXT b/tests/cdash/README.TXT index 0d09965a..69728b73 100644 --- a/tests/cdash/README.TXT +++ b/tests/cdash/README.TXT @@ -43,8 +43,17 @@ site and save them as different files. $ python main.py cfg_msvc + To execute tests for Symbian target: + + $ python main.py cfg_symbian + If you have a different site configuration file, you may specify it in the arguments, e.g.: $ python main.py cfg_gnu my_site_config + + For more information you can also pass "-h" or "--help", e.g.: + + $ python main.py cfg_gnu --help + diff --git a/tests/cdash/builder.py b/tests/cdash/builder.py index 3f5ea9b2..98e81e6c 100644 --- a/tests/cdash/builder.py +++ b/tests/cdash/builder.py @@ -81,16 +81,6 @@ std_test_ops= [ wdir="pjsip/bin") ] -# -# These are operations to build the software on GNU/Posix systems -# -gnu_build_ops = [ - Operation(Operation.CONFIGURE, "sh ./configure"), - Operation(Operation.BUILD, "sh -c 'make distclean && make dep && make && cd pjsip-apps/src/python && python setup.py clean build'"), - #Operation(Operation.BUILD, "python setup.py clean build", - # wdir="pjsip-apps/src/python") -] - # # These are pjsua Python based unit test operations # @@ -236,6 +226,7 @@ class TestBuilder: if len(self.ccdash_args)==0: self.build_tests() self.pre_action() + mandatory_op = ["update", "configure", "build"] counter = 0 for a in self.ccdash_args: # Check if this test is in exclusion list @@ -261,7 +252,10 @@ class TestBuilder: b.extend(a) a = b #print a - ccdash.main(a) + rc = ccdash.main(a) + if rc!=0 and a[1] in mandatory_op: + print "Stopping because of error.." + break counter = counter + 1 self.post_action() @@ -315,7 +309,17 @@ class GNUTestBuilder(TestBuilder): build_name = build_name + "-" + self.build_config_name cmds = [] cmds.extend(update_ops) - cmds.extend(gnu_build_ops) + cmds.append(Operation(Operation.CONFIGURE, "sh ./configure")) + if sys.platform == "win32": + # Don't build python module on Mingw + cmds.append(Operation(Operation.BUILD, + "sh -c 'make distclean && make dep && make'")) + else: + cmds.append(Operation(Operation.BUILD, + "sh -c 'make distclean && make dep && make" + \ + " && cd pjsip-apps/src/python && " + \ + "python setup.py clean build'")) + cmds.extend(std_test_ops) cmds.extend(build_pjsua_test_ops()) self.ccdash_args = [] diff --git a/tests/cdash/cfg_gnu.py b/tests/cdash/cfg_gnu.py index 4a1362b6..8411b654 100644 --- a/tests/cdash/cfg_gnu.py +++ b/tests/cdash/cfg_gnu.py @@ -59,10 +59,13 @@ Arguments: cfg_site.GROUP, \ cfg_site.OPTIONS) + config_site = "#define PJ_TODO(x)\n" + cfg_site.CONFIG_SITE + user_mak = "export CFLAGS+=-Wall\n" + cfg_site.USER_MAK + builders = [ builder.GNUTestBuilder(test_cfg, build_config_name="default", - user_mak="export CFLAGS+=-Wall\n", - config_site="#define PJ_TODO(x)\n", + user_mak=user_mak, + config_site=config_site, exclude=cfg_site.EXCLUDE, not_exclude=cfg_site.NOT_EXCLUDE) ] diff --git a/tests/cdash/cfg_msvc.py b/tests/cdash/cfg_msvc.py index af0b6ecb..26b07855 100644 --- a/tests/cdash/cfg_msvc.py +++ b/tests/cdash/cfg_msvc.py @@ -66,11 +66,14 @@ Arguments: cfg_site.GROUP, \ cfg_site.OPTIONS) + config_site = "#define PJ_TODO(x)\n" + cfg_site.CONFIG_SITE + user_mak = cfg_site.USER_MAK + builders = [ builder.MSVCTestBuilder(test_cfg, target=target, build_config_name="default", - config_site="#define PJ_TODO(x)\n", + config_site=config_site, exclude=cfg_site.EXCLUDE, not_exclude=cfg_site.NOT_EXCLUDE) ] diff --git a/tests/cdash/cfg_site_sample.py b/tests/cdash/cfg_site_sample.py index a73cf859..b0596427 100644 --- a/tests/cdash/cfg_site_sample.py +++ b/tests/cdash/cfg_site_sample.py @@ -35,6 +35,12 @@ BASE_DIR = "/root/project/pjproject" #OPTIONS = ["-o", "out.xml", "-y"] OPTIONS = [] +# What's the content of config_site.h +CONFIG_SITE = "" + +# What's the content of user.mak +USER_MAK = "" + # List of regular expression of test patterns to be excluded EXCLUDE = [] diff --git a/tests/cdash/cfg_symbian.py b/tests/cdash/cfg_symbian.py index e4d135dd..94f5f3f6 100644 --- a/tests/cdash/cfg_symbian.py +++ b/tests/cdash/cfg_symbian.py @@ -71,6 +71,8 @@ Arguments: """ + config_Site = config_site1 + cfg_site.CONFIG_SITE + builders = [ builder.SymbianTestBuilder(test_cfg, target=target, diff --git a/tests/cdash/starttest_sample.bat b/tests/cdash/starttest_sample.bat new file mode 100644 index 00000000..752e38db --- /dev/null +++ b/tests/cdash/starttest_sample.bat @@ -0,0 +1,44 @@ +@echo off + +rem *** +rem ************** VS 2005 ************** +rem *** +set OLD_PATH=%PATH% +set OLD_INCLUDE=%INCLUDE% +set OLD_LIB=%LIB% +set OLD_LIBPATH=%LIBPATH% + +call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" x86 +python main.py cfg_msvc -t "Debug|Win32" +python main.py cfg_msvc -t "Release|Win32" + +set PATH=%OLD_PATH% +set INCLUDE=%OLD_INCLUDE% +set LIB=%OLD_LIB% +set LIBPATH=%OLD_LIBPATH% + + +rem *** +rem ************** S60 3rd FP1 ************** +rem *** +set EPOCROOT=\symbian\9.2\S60_3rd_FP1\ +devices -setdefault @S60_3rd_FP1:com.nokia.s60 +python main.py cfg_symbian -t "winscw udeb" +python main.py cfg_symbian -t "gcce udeb" +python main.py cfg_symbian -t "gcce urel" + + +rem *** +rem ************** Mingw ************** +rem *** +set MSYSTEM=MINGW32 +set DISPLAY= +C:\msys\1.0\bin\sh -c "python main.py cfg_gnu" + + +rem *** +rem ************** Linux ************** +rem *** +set PATH=%PATH%;c:\msys\1.0\bin +set HOME=C:\msys\1.0\home\Administrator +C:\mingw\bin\ssh test@192.168.0.12 "cd project/pjproject/tests/cdash && python main.py cfg_gnu" -- cgit v1.2.3