예제 #1
0
    #~ Bootstrap.
    #~ * Clear out any old versions of the scripts
    print '# Creating regression scripts at %s...' % script_dir
    if os.path.exists(script_dir):
        shutil.rmtree(script_dir)
    os.mkdir(script_dir)
    #~ * Get new scripts, either from local working copy, or from svn
    if os.path.exists(script_local):
        print '# Copying regression scripts from %s...' % script_local
        for src in script_sources:
            shutil.copyfile(os.path.join(script_local, src),
                            os.path.join(script_dir, src))
    else:
        print '# Dowloading regression scripts from %s...' % script_remote
        proxy = None
        for a in sys.argv[1:]:
            if a.startswith('--proxy='):
                proxy = {'http': a.split('=')[1]}
                print '--- %s' % (proxy['http'])
                break
        for src in script_sources:
            urllib.FancyURLopener(proxy).retrieve(
                '%s/%s' % (script_remote, src), os.path.join(script_dir, src))

#~ * Make the scripts are available to Python
sys.path.insert(0, os.path.join(root, 'tools_regression_src'))

#~ Launch runner.
from regression import runner
runner(root)
예제 #2
0
파일: run.py 프로젝트: 0xDEC0DE8/mcsema
if not no_update:
    #~ Bootstrap.
    #~ * Clear out any old versions of the scripts
    print '# Creating regression scripts at %s...' % script_dir
    if os.path.exists(script_dir):
        shutil.rmtree(script_dir)
    os.mkdir(script_dir)
    #~ * Get new scripts, either from local working copy, or from svn
    if os.path.exists(script_local):
        print '# Copying regression scripts from %s...' % script_local
        for src in script_sources:
            shutil.copyfile( os.path.join(script_local,src), os.path.join(script_dir,src) )
    else:
        print '# Dowloading regression scripts from %s...' % script_remote
        proxy = None
        for a in sys.argv[1:]:
            if a.startswith('--proxy='):
                proxy = {'http' : a.split('=')[1] }
                print '--- %s' %(proxy['http'])
                break
        for src in script_sources:
            urllib.FancyURLopener(proxy).retrieve(
                '%s/%s' % (script_remote,src), os.path.join(script_dir,src) )

#~ * Make the scripts available to Python
sys.path.insert(0,os.path.join(root,'tools_regression_src'))

#~ Launch runner.
from regression import runner
runner(root)