From 3ffc96c3e96de8bb26729f510e6a35be5477c6c1 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Mon, 16 Jul 2012 00:07:40 +0200 Subject: [PATCH] add database type to xml report --- autotest.sh | 2 +- tests/index.php | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/autotest.sh b/autotest.sh index fe55c1066d..bf98932a4a 100755 --- a/autotest.sh +++ b/autotest.sh @@ -69,7 +69,7 @@ function execute_tests { #test execution echo "Testing with $1 ..." cd tests - php -f index.php -- xml > autotest-results-$1.xml + php -f index.php -- xml $1 > autotest-results-$1.xml } # diff --git a/tests/index.php b/tests/index.php index e91b3f0da5..935ce39531 100644 --- a/tests/index.php +++ b/tests/index.php @@ -26,8 +26,7 @@ require_once 'simpletest/mock_objects.php'; require_once 'simpletest/collector.php'; require_once 'simpletest/default_reporter.php'; -// test suite instance -$testSuite=new TestSuite("ownCloud Unit Test Suite"); +$testSuiteName="ownCloud Unit Test Suite"; // prepare the reporter if(OC::$CLI){ @@ -37,12 +36,19 @@ if(OC::$CLI){ { $reporter= new XmlReporter; $test=false; + + if(isset($_SERVER['argv'][2])){ + $testSuiteName=$testSuiteName." (".$_SERVER['argv'][2].")"; + } } }else{ $reporter='HtmlReporter'; $test=isset($_GET['test'])?$_GET['test']:false; } +// test suite instance +$testSuite=new TestSuite($testSuiteName); + //load core test cases loadTests(dirname(__FILE__), $testSuite, $test);