add database type to xml report

This commit is contained in:
Thomas Mueller 2012-07-16 00:07:40 +02:00
parent 6bb3a281b1
commit 3ffc96c3e9
2 changed files with 9 additions and 3 deletions

View file

@ -69,7 +69,7 @@ function execute_tests {
#test execution #test execution
echo "Testing with $1 ..." echo "Testing with $1 ..."
cd tests cd tests
php -f index.php -- xml > autotest-results-$1.xml php -f index.php -- xml $1 > autotest-results-$1.xml
} }
# #

View file

@ -26,8 +26,7 @@ require_once 'simpletest/mock_objects.php';
require_once 'simpletest/collector.php'; require_once 'simpletest/collector.php';
require_once 'simpletest/default_reporter.php'; require_once 'simpletest/default_reporter.php';
// test suite instance $testSuiteName="ownCloud Unit Test Suite";
$testSuite=new TestSuite("ownCloud Unit Test Suite");
// prepare the reporter // prepare the reporter
if(OC::$CLI){ if(OC::$CLI){
@ -37,12 +36,19 @@ if(OC::$CLI){
{ {
$reporter= new XmlReporter; $reporter= new XmlReporter;
$test=false; $test=false;
if(isset($_SERVER['argv'][2])){
$testSuiteName=$testSuiteName." (".$_SERVER['argv'][2].")";
}
} }
}else{ }else{
$reporter='HtmlReporter'; $reporter='HtmlReporter';
$test=isset($_GET['test'])?$_GET['test']:false; $test=isset($_GET['test'])?$_GET['test']:false;
} }
// test suite instance
$testSuite=new TestSuite($testSuiteName);
//load core test cases //load core test cases
loadTests(dirname(__FILE__), $testSuite, $test); loadTests(dirname(__FILE__), $testSuite, $test);