Changeset 2527


Ignore:
Timestamp:
12/04/10 14:12:07 (3 years ago)
Author:
wehart
Message:

Adding scripts that support coverage.

Location:
hudson/python
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • hudson/python/driver.py

    r2509 r2527  
    3737 
    3838 
    39 def perform_build(package, config=None, user='hudson'): 
     39def perform_build(package, config=None, user='hudson', coverage=False): 
    4040    if os.path.exists('python'): 
    4141        rmtree('python') 
     
    6060    elif python[0] == '"': 
    6161        python=eval(python) 
    62     # 
     62    # Install 
    6363    cmd = [python,os.sep.join( [os.environ['WORKSPACE'],'vpy','scripts','vpy_install'] ),'-v','--config', configfile] + sys.argv[1:] + [os.environ['WORKSPACE']+os.sep+'python'] 
    6464    print "Running Command: "+" ".join(cmd) 
     
    6767    else: 
    6868        print subprocess.call(cmd) 
    69     # 
     69    # Run tests 
    7070    if platform == 'win': 
    7171        os.environ['PATH'] = os.sep.join( [os.environ['WORKSPACE'],'python','Scripts'] ) + os.pathsep + os.environ['PATH'] 
     
    8181    else: 
    8282        print subprocess.call(cmd) 
     83    # 
     84    if not coverage: 
     85        return 
     86    if platform == 'win': 
     87        cmd = [os.sep.join( [os.environ['WORKSPACE'],'python','bin','svn_coverage.exe'] )] 
     88    else: 
     89        cmd = [os.sep.join( [os.environ['WORKSPACE'],'python','bin','svn_coverage'] )] 
     90    print "Running Command: "+" ".join(cmd) 
     91    if platform == 'win': 
     92        print subprocess.call(['cmd','/c']+cmd) 
     93    else: 
     94        print subprocess.call(cmd) 
    8395 
Note: See TracChangeset for help on using the changeset viewer.