Exemplo n.º 1
0
 def setUp(self):
     # Urg: global??
     self.logger = gub_log.set_default_log('downloads/test/test.log', 5)
     self.loggedos = Module('loggedos')
Exemplo n.º 2
0
def main ():
    (options, args) = parse_options ()
# FIXME: local/system; wow that's from two layout changes ago!
#    os.environ['PATH']= os.getcwd () + '/target/local/system/usr/bin:' + os.environ['PATH']
#    printf (os.environ['PATH'])
    
    os.system ('mkdir -p log')
    if options.dry_run:
        options.verbosity = gub_log.get_numeric_loglevel ('command')
        
    gub_log.set_default_log ('log/cron-builder.log', options.verbosity)
    logger = gub_log.default_logger
    
    gub_log.info (' *** Starting cron-builder:\n  %s ' % '\n  '.join (args)) 

    if options.clean:
        # FIXME: what if user changes ~/.gubrc?  should use gubb.Settings!
        loggedos.system (logger, 'rm -rf log/ target/ uploads/ buildnumber-* downloads/lilypond-*')

    make_cmd = 'make -f lilypond.make %s ' % options.make_options
    python_cmd = sys.executable  + ' '

    branch = options.branch
    local_branch = options.local_branch
    branch_sep = ':'

    # FIXME: what happened to branch juggling?
    if 1:
        local_branch = ''
        branch_sep = ''

    if 0: #FIXME: use if 1: when --stage download is fixed
        # cannot do this now, --stage=dowload of fontconfig depends on
        # tools freetype-config
        # must build bootstrap first
        
        # FIXME: use gub-tester's download facility
        # can't have these in gub-tester, since these
        # will always usually result in "release already tested"
        for platform in args:
            loggedos.system (logger, python_cmd + 'bin/gub --branch=lilypond=%(local_branch)s%(branch_sep)s:%(branch)s --platform=%(platform)s --stage=download lilypond'
                             % locals ())
            loggedos.system (logger, 'rm -f target/%(platform)s/status/lilypond-%(branch)s*' % locals ())
    else:
        loggedos.system (logger, make_cmd + 'bootstrap')

    test_cmds = []
    if 1:
        test_cmds.append (make_cmd + 'bootstrap')
    if options.build_package:
        test_cmds += [python_cmd + 'bin/gub --branch=lilypond=%(branch)s%(branch_sep)s%(local_branch)s --skip-if-locked --platform=%(platform)s lilypond'
                      % locals () for platform in args]
        
    if options.build_installer:
        version_options = '' 
            
        # installer-builder does not need remote-branch
        test_cmds += [python_cmd + 'bin/gib --skip-if-locked %(version_options)s --branch=lilypond=%(branch)s%(branch_sep)s%(local_branch)s --platform=%(platform)s build-all lilypond'
                      % locals () for platform in args]

    if options.build_docs:
        test_cmds += [make_cmd + 'doc-build',
                      make_cmd + 'doc-export']
        options.test_options += ' --dependent'


    if options.build_tarball:
        test_cmds += [make_cmd + 'dist-check']

    loggedos.system (logger, python_cmd + 'bin/gub-tester %s %s'
            % (options.test_options, ' '.join (["'%s'" % c for c in test_cmds])))
Exemplo n.º 3
0
 def setUp (self):
     # Urg: global??
     self.logger = gub_log.set_default_log ('downloads/test/test.log', 5)
     self.loggedos = Module('loggedos')