cvs: pear-core /PEAR RunTest.php

From: Date: Mon, 21 Feb 2005 05:30:13 +0000
Subject: cvs: pear-core /PEAR RunTest.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-29598@lists.php.net to get a copy of this message
cellog Mon Feb 21 00:30:13 2005 EDT Modified files: /pear-core/PEAR RunTest.php Log: add quiet option to pear run-tests http://cvs.php.net/diff.php/pear-core/PEAR/RunTest.php?r1=1.9&r2=1.10&ty=u Index: pear-core/PEAR/RunTest.php diff -u pear-core/PEAR/RunTest.php:1.9 pear-core/PEAR/RunTest.php:1.10 --- pear-core/PEAR/RunTest.php:1.9 Fri Feb 18 07:27:27 2005 +++ pear-core/PEAR/RunTest.php Mon Feb 21 00:30:13 2005 @@ -18,7 +18,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: RunTest.php,v 1.9 2005/02/18 12:27:27 pajoye Exp $ +// $Id: RunTest.php,v 1.10 2005/02/21 05:30:13 cellog Exp $ // /** @@ -45,14 +45,16 @@ class PEAR_RunTest { var $_logger; + var $_options; /** * An object that supports the PEAR_Common->log() signature, or null * @param PEAR_Common|null */ - function PEAR_RunTest($logger = null) + function PEAR_RunTest($logger = null, $options = array()) { $this->_logger = $logger; + $this->_options = $options; } // @@ -138,7 +140,9 @@ if ($reason) { $skipreason .= " (reason: $reason)"; } - $this->_logger->log(0, $skipreason); + if (!$this->_options['quiet']) { + $this->_logger->log(0, $skipreason); + } if (isset($old_php)) { $php = $old_php; } @@ -213,7 +217,9 @@ */ if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) { @unlink($tmp_file); - $this->_logger->log(0, "PASS $tested$info"); + if (!$this->_options['quiet']) { + $this->_logger->log(0, "PASS $tested$info"); + } if (isset($old_php)) { $php = $old_php; } @@ -227,7 +233,9 @@ $ok = (0 == strcmp($output,$wanted)); if (!$returnfail && $ok) { @unlink($tmp_file); - $this->_logger->log(0, "PASS $tested$info"); + if (!$this->_options['quiet']) { + $this->_logger->log(0, "PASS $tested$info"); + } if (isset($old_php)) { $php = $old_php; }

« previous php.pear.cvs (#29598) next »