Example #1
0
        path = "easybuild/easyconfigs/"
        files = findEasyconfigs(path, log)

    # process all the found easyconfig files
    packages = []
    for file in files:
        try:
            packages.extend(processEasyconfig(file, log, None))
        except EasyBuildError, err:
            test_results.append((file, 'eb-file error', err))

    if opts.parallel:
        resolved = resolveDependencies(packages, opts.robot, log)
        # use %%s so i can later replace it
        command = "cd %s && python %s %%s --no-parallel" % (cur_dir, sys.argv[0])
        parbuild.build_packages_in_parallel(command, resolved, output_dir, log)
    else:
        build_packages(packages, output_dir)


def perform_step(fase, obj, method):
    """
    Perform method on object if it can be build
    """
    if obj not in build_stopped:
        try:
            method(obj)
        except EasyBuildError, err:
            # we cannot continue building it
            test_results.append((obj, fase, err))
            # keep a dict of so we can check in O(1) if objects can still be build
Example #2
0
        relevant_opts = [o for o in parser.option_list if o not in ignore]
        for opt in relevant_opts:
            value = getattr(options, opt.dest)
            # explicit check for None (some option are store_false)
            if value != None:
                # get_opt_string is not documented (but is a public method)
                name = opt.get_opt_string()
                if opt.action == "store":
                    result_opts.append("%s %s" % (name, value))
                else:
                    result_opts.append(name)

        opts = " ".join(result_opts)

        command = "cd %s && %s %%s %s" % (curdir, eb_path, opts)
        jobs = parbuild.build_packages_in_parallel(command, orderedSpecs, "easybuild-build", log)
        for job in jobs:
            print "%s: %s" % (job.name, job.jobid)

        log.info("Submitted parallel build jobs, exiting now")
        sys.exit(0)

    ## Build software, will exit when errors occurs (except when regtesting)
    correct_built_cnt = 0
    all_built_cnt = 0
    for spec in orderedSpecs:
        (success, _) = build(spec, options, log, origEnviron, exitOnFailure=(not options.regtest))
        if success:
            correct_built_cnt += 1
        all_built_cnt += 1