zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #19017
[Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
Sorin Marian Nasoi has proposed merging lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba.
Commit message:
- feedback:pass, feedback:not-run, feedback:not-applicable return *only* non-verbosed output
- the tests added in Ctest for the FOTS/test-sets are always run with verbosed output. This way if a test case failed or passed but is marked as expected failure one can always see what happened
Requested reviews:
Sorin Marian Nasoi (sorin.marian.nasoi)
Chris Hillery (ceejatec)
Related bugs:
Bug #1134403 in Zorba: "FOTS driver: feedback for test cases that fail"
https://bugs.launchpad.net/zorba/+bug/1134403
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/fix_bug_1134403/+merge/153784
- feedback:pass, feedback:not-run, feedback:not-applicable return *only* non-verbosed output
- the tests added in Ctest for the FOTS/test-sets are always run with verbosed output. This way if a test case failed or passed but is marked as expected failure one can always see what happened
--
https://code.launchpad.net/~zorba-coders/zorba/fix_bug_1134403/+merge/153784
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'test/fots/ImportFOTS.cmake'
--- test/fots/ImportFOTS.cmake 2013-03-17 15:20:38 +0000
+++ test/fots/ImportFOTS.cmake 2013-03-18 12:58:52 +0000
@@ -23,7 +23,7 @@
# Change this to modify which elements in FOTS driver results are output
# as CDATA
-SET (FOTS_CDATA_ELEMENTS "fots:query test assert-xml")
+SET (FOTS_CDATA_ELEMENTS "fots:query fots:result test assert-xml")
# Download and unpack pre-created archive
SET (_outdir "${BUILDDIR}/test/fots")
@@ -76,7 +76,7 @@
"-e fotsPath:=${_outdir}/2011/QT3-test-suite/catalog.xml "
"-e mode:=run-test-set -e testSetName:=${_testset} "
"-e expectedFailuresPath:=${BUILDDIR}/FOTSExpectedFailures.xml "
- "-e verbose:=false "
+ "-e verbose:=true "
"--disable-http-resolution --indent "
"-z \"cdata-section-elements=${FOTS_CDATA_ELEMENTS}\")\n"
"ZORBA_SET_TEST_PROPERTY (FOTS/${_testset} "
=== modified file 'test/fots_driver/feedback.xq'
--- test/fots_driver/feedback.xq 2013-02-26 06:21:18 +0000
+++ test/fots_driver/feedback.xq 2013-03-18 12:58:52 +0000
@@ -79,11 +79,7 @@
$env,
$verbose)
else feedback:pass( $case,
- $result,
- $zorbaQuery,
- $env,
- $duration,
- $verbose)
+ $result)
};
@@ -136,51 +132,19 @@
: Gives feedback on a test case run with success.
:
: @param $case test case.
- : @return the test case after certain information was added.
+ : @param $result test result of running the test case.
+ : @return info about test case that passed.
:)
-declare %private %ann:sequential function feedback:pass(
+declare %private function feedback:pass(
$case as element(fots:test-case),
- $result as item()*,
- $zorbaQuery as xs:string,
- $env as element(fots:environment)?,
- $duration as xs:dayTimeDuration,
- $verbose as xs:boolean
+ $result as item()*
) as element(fots:test-case)?
{
let $status := if(exists($result/fots:errors))
then 'wrongError'
else 'pass'
- return
- if ($verbose)
- then
- {
- {
- (insert node attribute result{$status} as last into $case,
- if (exists($result/fots:errors))
- then
- insert node
- attribute comment{$result/fots:errors}
- as last into $case
- else (),
- insert node attribute executionTime{$duration} as last into $case,
- insert node
- <fots:info>
- {$env}
- <fots:query>{$zorbaQuery}</fots:query>
- {$result/fots:expected-result,
- $result/fots:result,
- $result/fots:errors}
- </fots:info>
- as last into $case,
- delete node $case/fots:description,
- delete node $case/fots:created,
- delete node $case/fots:result);
-
- $case
- }
- }
- else <fots:test-case name="{data($case/@name)}"
- result="{$status}"/>
+ return
+ <fots:test-case name="{data($case/@name)}" result="{$status}"/>
};
@@ -249,32 +213,14 @@
: @param $case test case.
: @return the test case.
:)
-declare %ann:sequential function feedback:not-run(
- $case as element(fots:test-case),
- $verbose as xs:boolean
+declare function feedback:not-run(
+ $case as element(fots:test-case)
) as element(fots:test-case)?
{
trace(data($case/@name), "processing test case :");
trace("Above test case was not run.","");
- let $status := 'notRun'
- return
- if ($verbose)
- then
- {
- {
- (insert node attribute result {$status} as last into $case,
- delete node $case/fots:description,
- delete node $case/fots:created);
-
- $case
- }
- }
- else
- {
- <fots:test-case name="{$case/@name}"
- result="{$status}" />
- }
+ <fots:test-case name="{$case/@name}" result="notRun" />
};
@@ -285,35 +231,15 @@
: @param $dependencyError test error returned by the dependency checking.
: @return the test case.
:)
-declare %ann:sequential function feedback:not-applicable(
+declare function feedback:not-applicable(
$case as element(fots:test-case),
- $env as element(fots:environment)?,
- $dependencyError as xs:string,
- $verbose as xs:boolean
+ $dependencyError as xs:string
) as element(fots:test-case)?
{
trace(data($case/@name), "processing test case :");
trace($dependencyError, "Dependency error :");
- let $status := 'n/a'
- return
- if ($verbose)
- then
- {
- {
- (insert node attribute result{$status} as last into $case,
- insert node attribute comment{$dependencyError} as last into $case,
- insert node
- <fots:info>{$env}</fots:info>
- as last into $case,
- delete node $case/fots:description,
- delete node $case/fots:created);
-
- $case
- }
- }
- else
- <fots:test-case name="{data($case/@name)}"
- result="{$status}"
- comment="{$dependencyError}" />
+ <fots:test-case name="{data($case/@name)}"
+ result="n/a"
+ comment="{$dependencyError}" />
};
=== modified file 'test/fots_driver/fots-driver.xq'
--- test/fots_driver/fots-driver.xq 2013-03-13 01:13:07 +0000
+++ test/fots_driver/fots-driver.xq 2013-03-18 12:58:52 +0000
@@ -667,12 +667,10 @@
return
if ($isExcepted)
then
- feedback:not-run($testCase, $verbose)
+ feedback:not-run($testCase)
else
feedback:not-applicable($testCase,
- $envTestSet,
- string-join($depMet,''),
- $verbose)
+ string-join($depMet,''))
}
</fots:test-set>
}
@@ -711,14 +709,12 @@
$verbose,
fn:false())
else
- feedback:not-run($testCase, $verbose)
+ feedback:not-run($testCase)
}
else if (exists($depMet)) then
{
feedback:not-applicable($testCase,
- $envTestSet,
- string-join($depMet, ''),
- $verbose)
+ string-join($depMet, ''))
}
else if (empty($envTestSet)) then
{
Follow ups
-
[Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: noreply, 2013-03-20
-
[Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Zorba Build Bot, 2013-03-20
-
[Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Zorba Build Bot, 2013-03-20
-
[Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Chris Hillery, 2013-03-20
-
Re: [Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Chris Hillery, 2013-03-20
-
Re: [Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Chris Hillery, 2013-03-18
-
[Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Zorba Build Bot, 2013-03-18
-
Re: [Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Zorba Build Bot, 2013-03-18
-
[Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Zorba Build Bot, 2013-03-18
-
[Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Zorba Build Bot, 2013-03-18
-
[Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Sorin Marian Nasoi, 2013-03-18
-
Re: [Merge] lp:~zorba-coders/zorba/fix_bug_1134403 into lp:zorba
From: Sorin Marian Nasoi, 2013-03-18