Test tasks.build option
199007
function verifyTasks() {
      if ( options.tasks.build ) {
        if ( isTypeString(options.tasks.build) ) {
          options.tasks.build = [options.tasks.build];
        }
        if ( util.isArray(options.tasks.build) ) {
          options.tasks.build.forEach(function( item ) {
            if ( !isTypeString(item) ) {
              errorOption('tasks.build', JSON.stringify(item));
            }
          });
        }
        else {
          errorOption('tasks.build', options.tasks.build);
        }
      }
      else {
        options.tasks.build = [];
      }
    }
619769
def real_main(release_url=None,
              tests_json_path=None,
              upload_build_id=None,
              upload_release_name=None):
    """"""
    coordinator = workers.get_coordinator()
    fetch_worker.register(coordinator)
    coordinator.start()

    data = open(FLAGS.tests_json_path).read()
    tests = load_tests(data)

    item = DiffMyImages(
        release_url,
        tests,
        upload_build_id,
        upload_release_name,
        heartbeat=workers.PrintWorkflow)
    item.root = True

    coordinator.input_queue.put(item)
    coordinator.wait_one()
    coordinator.stop()
    coordinator.join()
989645
def build_task(argv)
      arguments = argv.dup
      task_name = arguments.shift
      klazz     = Task.from_name(task_name)
      klazz.new(*klazz.parse_options!(arguments))
    rescue NameError
      task_not_found(task_name)
      exit false
    rescue ArgumentError
      bad_arguments(task_name)
      exit false
    end
1303188
def build(self):
        """"""

        if not self.embed:
            mkdir_recursive(self.output_directory)

        # get list of script files in build order
        self.build_order = remove_dups(
            reduce(lambda a, b: a + glob.glob(b),
                   self.build_targets,
                   []))
        self.build_order_output = [self.out_path_of(t)
                                   for (t) in self.build_order]
        self.path_mapping = dict(zip(
            self.build_order,
            self.build_order_output))

        self.compiled_scripts = {}
        exceptions, values = partition(
            lambda x: isinstance(x, Exception),
            [self.compile_and_process(target)
             for target in self.build_order])

        self.compiled_scripts.update(dict(values))

        saneExceptions, insaneExceptions = partition(
            lambda x: isinstance(x, TaskExecutionException),
            exceptions)

        if len(insaneExceptions) != 0:
            raise insaneExceptions[0]

        if len(exceptions) != 0:
            raise TaskExecutionException(
                "Precompiler Errors (%s):" % type(self).__name__,
                "\n".join([
                    x.header + "\n    " +
                    x.message.replace("\n", "\n    ")
                    for x in exceptions]))

        return self.collect_output()
1157626
public function main()
    {
        if ($this->testIfCondition() && $this->testUnlessCondition()) {
            foreach ($this->children as $o) {
                if ($o instanceof Task) {
                    // child is a task
                    $o->perform();
                } elseif ($o instanceof RuntimeConfigurable) {
                    // child is a RuntimeConfigurable
                    $o->maybeConfigure($this->project);
                }
            }
        } elseif (!$this->testIfCondition()) {
            $this->project->log(
                "Skipped target '" . $this->name . "' because property '" . $this->ifCondition . "' not set.",
                $this->getLogSkipped() ? Project::MSG_INFO : Project::MSG_VERBOSE
            );
        } else {
            $this->project->log(
                "Skipped target '" . $this->name . "' because property '" . $this->unlessCondition . "' set.",
                $this->getLogSkipped() ? Project::MSG_INFO : Project::MSG_VERBOSE
            );
        }
    }
278776
def worker(namespace, name, branch='master'):
    ''''''
    with repository(namespace, name, branch) as (path, latest, cache):
        if cache.get(latest, None) and json.loads(cache[latest])['status'] != 'starting':
            return 'Build already started'

        data = {'status': 'in_progress', 'result': ''}
        cache[latest] = json.dumps(data)
        test_output = tox(_iter=True)
        try:
            for line in test_output:
                data['result'] += line
                cache[latest] = json.dumps(data)
            data['build_success'] = True
        except Exception:
            data['build_success'] = False
        data['status'] = 'complete'
        cache[latest] = json.dumps(data)
        return 'Build successfully completed'
686475
async function build(inputOptions, outputOptions) {
  const input = Object.assign(
    {
      plugins: [
        commonjs(), // We can remove this plugin if there are no more CommonJS modules
        resolve(), // We need this plugin only to build the test script
        babel({
          exclude: 'node_modules/**'
        })
      ]
    },
    inputOptions
  );

  const output = Object.assign(
    {
      format: 'umd'
    },
    outputOptions
  );

  const bundle = await rollup(input);
  await bundle.write(output);
}
111569
function(args, done) {
  function run(cmd) {
    return function(cb) {
      debug('testing `%s`', cmd);
      var parts = cmd.split(' ');
      var bin = parts.shift();
      var args = parts;
      var completed = false;

      var child = spawn(bin, args, {
        cwd: args['<directory>']
      })
        .on('error', function(err) {
          completed = true;
          done(new Error(cmd + ' failed: ' + err.message));
        });

      child.stderr.pipe(process.stderr);

      if (cmd === 'npm start') {
        setTimeout(function() {
          if (completed) {
            return;
          }

          completed = true;
          child.kill('SIGKILL');
          done();
        }, 5000);
      }

      child.on('close', function(code) {
        if (completed) {
          return;
        }

        completed = true;

        if (code === 0) {
          done();
          return;
        }

        cb(new Error(cmd + ' failed'));
      });
    };
  }
  debug('checking first run');


  var dir = path.resolve(args['<directory>']);

  var pkg = require(path.join(dir, 'package.json'));

  debug('clearing local node_modules to make sure install works');

  rimraf(dir + '/node_modules/**/*', function(err) {
    if (err) {
      return done(err);
    }
    var tasks = [
      run('npm install'),
      run('npm test')
    ];

    if (pkg.scripts.start) {
      tasks.push(run('npm start'));
    }

    async.series(tasks, function(err, results) {
      if (err) {
        return done(err);
      }
      done(null, results);
    });
  });
}
825204
def main(args):
	''''''
	if SETUP:
		args = _invoke(SETUP, args)

	if not args and DEFAULT:
		DEFAULT()
	else:
		while args:
			task = _get_task(args[0])
			if task is None:
				abort(LOCALE['error_no_task'], args[0])

			args = _invoke(task, args[1:])

	if TEARDOWN:
		TEARDOWN()
459046
def run
      until @confirmed
        @namespace = capture_selection(
          title: 'Avalable Task Groups:',
          options: build_namespace_options
        )

        @task = capture_selection(
          title: "Available '#{@namespace}' commands:",
          options: build_task_options
        )

        unless @task.arg_names.empty?
          @task_arguments = @task.arg_names.each_with_object({}) { |arg, obj| obj[arg] = nil }
          capture_task_arguments while @task_arguments.values.any?(&:nil?)
        end

        @confirmed = capture_confirmation
      end

      # Invoke ensures that prerequirement tasks like rails :environment are run first.
      @task.invoke(*@task_arguments.values)
    end
368092
def build(self, *args, **kwargs):
        """"""
        # Create the directories of the work.
        self.indir.makedirs()
        self.outdir.makedirs()
        self.tmpdir.makedirs()

        # Build dirs and files of each task.
        for task in self:
            task.build(*args, **kwargs)

        # Connect signals within the work.
        self.connect_signals()
391736
def build_task(self, name):
        

        try:
            self._gettask(name).value = (
                self._gettask(name).task.resolve_and_build())
        except TaskExecutionException as e:
            perror(e.header, indent="+0")
            perror(e.message, indent="+4")
            self._gettask(name).value = e.payload
        except Exception as e:
            perror("error evaluating target '%s' %s" %
                   (name, type(self._gettask(name).task)))
            perror(traceback.format_exc(e), indent='+4')
            self._gettask(name).value = None

        self._gettask(name).last_build_time = time.time()
401015
function(tasks){
        var taskName = 'excludeTest';
        tasks[taskName] = {
            baseDir: 'test/fixtures/Bower Project Css In App/app',
            moduleFilter: function(m){
                m = m ||'';
                return m.lastIndexOf('css') + 3 != m.length;
            }
        };
    }
933468
function spawnBuild(argv, skyPagesConfig, webpack) {

  if (argv.build === false) {
    logger.info('Skipping build step');

    const file = 'dist/metadata.json';
    if (!fs.existsSync(file)) {
      logger.info(`Unable to skip build step.  "${file}" not found.`);
    } else {
      return Promise.resolve({
        metadata: fs.readJsonSync(file)
      });
    }
  }

  return build(argv, skyPagesConfig, webpack)
    .then(stats => stats.toJson().chunks);
}
461852
def run(self):
        """"""
        tokens = []
        section = nodes.section()
        section['ids'].append("available-tasks")

        title = nodes.title()
        title += nodes.Text("Default tasks")
        section += title

        task_finder = TaskFinder(Collector())
        for name, task in sorted(task_finder.default_tasks().items(), key=lambda x: len(x[0])):

            lines = [name] + ["  {0}".format(line.strip()) for line in task.description.split('\n')]
            viewlist = ViewList()
            for line in lines:
                viewlist.append(line, name)
            self.state.nested_parse(viewlist, self.content_offset, section)

        return [section]
1105192
def build_tasks
      load_rakefile
      Rake.application.tasks.reject { |t| t.comment.nil? }
    end
983829
function build(options) {
  var args = [require.resolve(path.join('node-gyp', 'bin', 'node-gyp.js')), 'rebuild', '--verbose'].concat(
    ['libsass_ext', 'libsass_cflags', 'libsass_ldflags', 'libsass_library'].map(function(subject) {
      return ['--', subject, '=', process.env[subject.toUpperCase()] || ''].join('');
    })).concat(options.args);

  console.log('Building:', [process.execPath].concat(args).join(' '));

  var proc = spawn(process.execPath, args, {
    stdio: [0, 1, 2]
  });

  proc.on('exit', function(errorCode) {
    if (!errorCode) {
      afterBuild(options);
      return;
    }

    if (errorCode === 127 ) {
      console.error('node-gyp not found!');
    } else {
      console.error('Build failed with error code:', errorCode);
    }

    process.exit(1);
  });
}