Changeset 3143


Ignore:
Timestamp:
Apr 20, 2010 10:05:09 AM (14 years ago)
Author:
bennylp
Message:

More ticket #1041 (unit test framework):

  • added support for Intel IPP build configuration and testing
Location:
pjproject/trunk/tests/automated
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/tests/automated/configure.py

    r3131 r3143  
    8787                # Check that EPOCROOT is set 
    8888                if not "EPOCROOT" in os.environ: 
    89                     print "Error: EPOCROOT environment variable is not set" 
     89                    sys.stderr.write("Error: EPOCROOT environment variable is not set\n") 
    9090                    sys.exit(1) 
    9191                epocroot = os.environ["EPOCROOT"] 
     
    108108 
    109109                if sdk1 != sdk2: 
    110                     print "Error: default SDK in device doesn't match EPOCROOT" 
    111                     print "Default device SDK =", sdk2 
    112                     print "EPOCROOT SDK =", sdk1 
     110                    sys.stderr.write("Error: default SDK in device doesn't match EPOCROOT\n") 
     111                    sys.stderr.write("Default device SDK = " + sdk2 + "\n") 
     112                    sys.stderr.write("EPOCROOT SDK = " + sdk1 + "\n") 
    113113                    sys.exit(1) 
    114114 
     
    130130                        os_info = platform.release() + "-" + platform.version() + "-" + platform.win32_ver()[2] 
    131131        elif platform.system().lower() == "linux": 
    132                 os_info =  + "-" + "-".join(platform.linux_distribution()[0:2]) 
     132                os_info =  "-" + "-".join(platform.linux_distribution()[0:2]) 
    133133 
    134134        # vs_target 
     
    160160                suffix = proc.stdout.readline().rstrip(" \r\n") 
    161161        else: 
    162                 sys.stderr.write("Error: unsupported built type " + build_type + "\n") 
     162                sys.stderr.write("Error: unsupported build type '" + build_type + "'\n") 
    163163                sys.exit(1) 
    164164 
     
    185185                elif text.find("$(DISABLED)") >= 0: 
    186186                        text = text.replace("$(DISABLED)", "0") 
     187                elif text.find("$(IPPROOT)") >= 0: 
     188                        if not os.environ.has_key("IPPROOT"): 
     189                                sys.stderr.write("Error: environment variable IPPROOT is needed but not set\n") 
     190                                sys.exit(1) 
     191                        text = text.replace("$(IPPROOT)", os.environ["IPPROOT"]) 
     192                elif text.find("$(IPPSAMPLES)") >= 0: 
     193                        if not os.environ.has_key("IPPSAMPLES"): 
     194                                sys.stderr.write("Error: environment variable IPPSAMPLES is needed but not set\n") 
     195                                sys.exit(1) 
     196                        text = text.replace("$(IPPSAMPLES)", os.environ["IPPSAMPLES"]) 
     197                elif text.find("$(IPPARCH)") >= 0: 
     198                        if not os.environ.has_key("IPPARCH"): 
     199                                text = text.replace("$(IPPARCH)", "") 
     200                        else: 
     201                                text = text.replace("$(IPPARCH)", os.environ["IPPARCH"]) 
    187202                elif text.find("$(OS)") >= 0: 
    188203                        text = text.replace("$(OS)", os_info) 
     
    202217def main(args): 
    203218        global vs_target, s60_target, build_type 
     219        output = sys.stdout 
    204220        usage = """Usage: configure.py [OPTIONS] scenario_template_file 
    205221 
    206222Where OPTIONS: 
    207   -t TYPE               Specify build type for Windows since we support both 
    208                         Visual Studio and Mingw. If not specified, it will be 
     223  -o FILE               Output to file, otherwise to stdout. 
     224  -t TYPE               Specify build type. If not specified, it will be 
    209225                        asked if necessary. Values are:  
    210226                            vs:    Visual Studio 
     
    226242        args.pop(0) 
    227243        while len(args): 
    228                 if args[0]=='-vstarget': 
     244                if args[0]=='-o': 
     245                        args.pop(0) 
     246                        if len(args): 
     247                                output = open(args[0], "wt") 
     248                                args.pop(0) 
     249                        else: 
     250                                sys.stderr.write("Error: needs value for -o\n") 
     251                                sys.exit(1) 
     252                elif args[0]=='-vstarget': 
    229253                        args.pop(0) 
    230254                        if len(args): 
     
    257281 
    258282        if len(args) != 1: 
    259                 print usage 
     283                sys.stderr.write(usage + "\n") 
    260284                return 1 
    261285         
    262         if not build_type and (platform.system().lower() == "windows" or platform.system().lower() == "microsoft"): 
     286        if not build_type: 
    263287            print "Enter the build type (values: vs, gnu, s60) [vs]: ", 
    264288            build_type = sys.stdin.readline().replace("\n", "").replace("\r", "") 
     
    277301         
    278302        tpl = replace_vars(tpl) 
    279         print tpl 
     303        output.write(tpl) 
     304        if output != sys.stdout: 
     305                output.close() 
    280306        return 0 
    281307 
  • pjproject/trunk/tests/automated/gnu.xml.template

    r3131 r3143  
    22<Scenario site="$(HOSTNAME)" url="http://my.cdash.org/submit.php?project=PJSIP" wdir="$(PJDIR)"> 
    33  
    4         <Submit group="Experimental" build="$(SUFFIX)-$(GCC)-default" disabled="$(DISABLED)" > 
     4        <Submit group="Experimental" build="$(SUFFIX)-$(GCC)-IPP" disabled="$(DISABLED)" > 
    55                <Update /> 
    66                <FileWrite file="user.mak"> 
     
    1414#define PJ_HAS_IPV6             1 
    1515#define PJMEDIA_HAS_G7221_CODEC 1 
     16#define PJMEDIA_HAS_INTEL_IPP   1 
    1617]]>                      
    1718                </FileWrite> 
    1819                <Configure cmd="./aconfigure" /> 
    1920                <Build cmd="make dep &amp;&amp; make distclean &amp;&amp; make" /> 
    20                 <Test name="pjlib-test" info="" wdir="pjlib/bin" cmd="./pjlib-test-$(SUFFIX)" /> 
    21                 <Test name="pjlib-util-test" info="" wdir="pjlib-util/bin" cmd="./pjlib-util-test-$(SUFFIX)" /> 
    22                 <Test name="pjnath-test" info="" wdir="pjnath/bin" cmd="./pjnath-test-$(SUFFIX)" /> 
    23                 <Test name="pjmedia-test" info="" wdir="pjmedia/bin" cmd="./pjmedia-test-$(SUFFIX)" /> 
    24                 <Test name="pjsip-test" info="" wdir="pjsip/bin" cmd="./pjsip-test-$(SUFFIX)" /> 
     21                <Test name="pjlib-test" wdir="pjlib/bin" cmd="./pjlib-test-$(SUFFIX)" /> 
     22                <Test name="pjlib-util-test" wdir="pjlib-util/bin" cmd="./pjlib-util-test-$(SUFFIX)" /> 
     23                <Test name="pjnath-test" wdir="pjnath/bin" cmd="./pjnath-test-$(SUFFIX)" /> 
     24                <Test name="pjmedia-test" wdir="pjmedia/bin" cmd="./pjmedia-test-$(SUFFIX)" /> 
     25                <Test name="pjsip-test" wdir="pjsip/bin" cmd="./pjsip-test-$(SUFFIX)" /> 
    2526                $(PJSUA-TESTS) 
    2627        </Submit> 
  • pjproject/trunk/tests/automated/run.py

    r3125 r3143  
     1#!/usr/bin/python 
    12import sys 
    23import ccdash 
Note: See TracChangeset for help on using the changeset viewer.