From ea6869289bbe5e7a8489bf23764a973a8956933f Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Tue, 6 Jan 2009 14:39:55 +0000
Subject: [PATCH] Make it possible to get test results for a specific test
 zuite only.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25023 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_ui_test_core/TestTool_getResults.xml      | 14 +++++++++++---
 bt5/erp5_ui_test_core/bt/revision                  |  2 +-
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/TestTool_getResults.xml b/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/TestTool_getResults.xml
index 5053f0b66f..667e8c407a 100644
--- a/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/TestTool_getResults.xml
+++ b/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/TestTool_getResults.xml
@@ -54,6 +54,10 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>portal_tests = container.portal_tests\n
+if test_zuite_relative_url is not None:\n
+  # we care for a specific test zuite\n
+  portal_tests = portal_tests.restrictedTraverse(test_zuite_relative_url,\\\n
+                                                 portal_tests)\n
 results = [portal_tests.absolute_url() + \'/\' + e for e in portal_tests.objectIds(\'Zuite Results\')]\n
 results.reverse()\n
 return \'\\n\'.join(results) + \'\\n\'\n
@@ -67,7 +71,7 @@ return \'\\n\'.join(results) + \'\\n\'\n
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string></string> </value>
+            <value> <string>test_zuite_relative_url=None</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -87,15 +91,17 @@ return \'\\n\'.join(results) + \'\\n\'\n
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>0</int> </value>
+                        <value> <int>1</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
+                            <string>test_zuite_relative_url</string>
                             <string>_getattr_</string>
                             <string>container</string>
                             <string>portal_tests</string>
+                            <string>None</string>
                             <string>append</string>
                             <string>$append0</string>
                             <string>_getiter_</string>
@@ -112,7 +118,9 @@ return \'\\n\'.join(results) + \'\\n\'\n
         <item>
             <key> <string>func_defaults</string> </key>
             <value>
-              <none/>
+              <tuple>
+                <none/>
+              </tuple>
             </value>
         </item>
         <item>
diff --git a/bt5/erp5_ui_test_core/bt/revision b/bt5/erp5_ui_test_core/bt/revision
index d8263ee986..e440e5c842 100644
--- a/bt5/erp5_ui_test_core/bt/revision
+++ b/bt5/erp5_ui_test_core/bt/revision
@@ -1 +1 @@
-2
\ No newline at end of file
+3
\ No newline at end of file
-- 
2.30.9