executable = $this->builder->buildPath . '/' . $options['executable']; } else { $this->executable = $this->findBinary('atoum'); } if (isset($options['args'])) { $this->args = $options['args']; } if (isset($options['config'])) { $this->config = $options['config']; } if (isset($options['directory'])) { $this->directory = $options['directory']; } } /** * Run the Atoum plugin. * * @return bool */ public function execute() { $cmd = $this->executable; if ($this->args !== null) { $cmd .= " {$this->args}"; } if ($this->config !== null) { $cmd .= " -c '{$this->config}'"; } if ($this->directory !== null) { $dirPath = $this->builder->buildPath . '/' . $this->directory; $cmd .= " -d '{$dirPath}'"; } chdir($this->builder->buildPath); $output = ''; $status = true; exec($cmd, $output); if (count(preg_grep("/Success \(/", $output)) == 0) { $status = false; $this->builder->log($output); } if (count($output) == 0) { $status = false; $this->builder->log('No tests have been performed.'); } return $status; } }