cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# -*- coding: utf-8 -*-
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# $Id$
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncTest Manager WUI - Test Cases.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync__copyright__ = \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncCopyright (C) 2012-2014 Oracle Corporation
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncThis file is part of VirtualBox Open Source Edition (OSE), as
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncavailable from http://www.virtualbox.org. This file is free software;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncyou can redistribute it and/or modify it under the terms of the GNU
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncGeneral Public License (GPL) as published by the Free Software
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncFoundation, in version 2 as it comes in the "COPYING" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncVirtualBox OSE distribution. VirtualBox OSE is distributed in the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsynchope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncThe contents of this file may alternatively be used under the terms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncof the Common Development and Distribution License Version 1.0
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync(CDDL) only, as it comes in the "COPYING.CDDL" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncVirtualBox OSE distribution, in which case the provisions of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncCDDL are applicable instead of those of the GPL.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncYou may elect to license modified versions of this file under the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncterms and conditions of either the GPL or the CDDL or both.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync__version__ = "$Revision$"
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Validation Kit imports.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom common import utils, webutils;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testmanager.webui.wuicontentbase import WuiFormContentBase, WuiListContentBase, WuiTmLink, WuiRawHtml;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testmanager.core.db import isDbTimestampInfinity;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testmanager.core.testcase import TestCaseDataEx, TestCaseData, TestCaseDependencyLogic;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testmanager.core.globalresource import GlobalResourceData, GlobalResourceLogic;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncclass WuiTestCaseList(WuiListContentBase):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync WUI test case list content generator.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def __init__(self, aoEntries, iPage, cItemsPerPage, tsEffective, fnDPrint, oDisp):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync WuiListContentBase.__init__(self, aoEntries, iPage, cItemsPerPage, tsEffective,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sTitle = 'Test Cases', fnDPrint = fnDPrint, oDisp = oDisp);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._asColumnHeaders = \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync [
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'Name', 'Active', 'Default Timeout', 'Base Command / Variations', 'Validation Kit Files',
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'Test Case Prereqs', 'Global Resources', 'Actions'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._asColumnAttribs = \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync [
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync '', '', '', '', '',
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'valign="top"', 'valign="top"', 'align="center"'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def _formatListEntry(self, iEntry):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oEntry = self._aoEntries[iEntry];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync from testmanager.webui.wuiadmin import WuiAdmin;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoRet = \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync [
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oEntry.sName.replace('-', u'\u2011'),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'Enabled' if oEntry.fEnabled else 'Disabled',
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync utils.formatIntervalSeconds(oEntry.cSecTimeout),
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Base command and variations.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fNoGang = True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oVar in oEntry.aoTestCaseArgs:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oVar.cGangMembers > 1:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fNoGang = False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync break;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml = ' <table class="tminnertbl" width=100%>\n' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' <tr>\n' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' <th>';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if not fNoGang:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += '<th>Gang Size</th>';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += 'Timeout</th><th>Additional Arguments</b></th>\n' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' </tr>\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oTmp in oEntry.aoTestCaseArgs:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += '<tr>';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if not fNoGang:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += '<td>%d</td>' % (oTmp.cGangMembers,)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += '<td>%s</td><td>%s</td></tr>\n' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync % ( utils.formatIntervalSeconds(oTmp.cSecTimeout) if oTmp.cSecTimeout is not None else 'Default',
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync webutils.escapeElem(oTmp.sArgs.replace('-', u'\u2011')),)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += ' </table>'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoRet.append([oEntry.sBaseCmd.replace('-', u'\u2011'), WuiRawHtml(sHtml)]);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Next.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoRet += [ oEntry.sValidationKitZips if oEntry.sValidationKitZips is not None else '', ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Show dependency on other testcases
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oEntry.aoDepTestCases not in (None, []):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml = ' <ul class="tmshowall">\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for sTmp in oEntry.aoDepTestCases:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += ' <li class="tmshowall"><a href="%s?%s=%s&%s=%s">%s</a></li>\n' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync % (WuiAdmin.ksScriptName,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync WuiAdmin.ksParamAction, WuiAdmin.ksActionTestCaseEdit,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync TestCaseData.ksParam_idTestCase, sTmp.idTestCase,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sTmp.sName)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += ' </ul>\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync else:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml = '<ul class="tmshowall"><li class="tmshowall">None</li></ul>\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoRet.append(WuiRawHtml(sHtml));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Show dependency on global resources
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oEntry.aoDepGlobalResources not in (None, []):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml = ' <ul class="tmshowall">\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for sTmp in oEntry.aoDepGlobalResources:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += ' <li class="tmshowall"><a href="%s?%s=%s&%s=%s">%s</a></li>\n' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync % (WuiAdmin.ksScriptName,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync WuiAdmin.ksParamAction, WuiAdmin.ksActionGlobalRsrcShowEdit,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync GlobalResourceData.ksParam_idGlobalRsrc, sTmp.idGlobalRsrc,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sTmp.sName)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml += ' </ul>\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync else:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sHtml = '<ul class="tmshowall"><li class="tmshowall">None</li></ul>\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoRet.append(WuiRawHtml(sHtml));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Show actions that can be taken.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoActions = [ WuiTmLink('Details', WuiAdmin.ksScriptName,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync { WuiAdmin.ksParamAction: WuiAdmin.ksActionTestCaseDetails,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync TestCaseData.ksParam_idGenTestCase: oEntry.idGenTestCase }), ];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if isDbTimestampInfinity(oEntry.tsExpire):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoActions.append(WuiTmLink('Modify', WuiAdmin.ksScriptName,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync { WuiAdmin.ksParamAction: WuiAdmin.ksActionTestCaseEdit,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync TestCaseData.ksParam_idTestCase: oEntry.idTestCase }));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoActions.append(WuiTmLink('Clone', WuiAdmin.ksScriptName,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync { WuiAdmin.ksParamAction: WuiAdmin.ksActionTestCaseClone,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync TestCaseData.ksParam_idGenTestCase: oEntry.idGenTestCase }));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if isDbTimestampInfinity(oEntry.tsExpire):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoActions.append(WuiTmLink('Remove', WuiAdmin.ksScriptName,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync { WuiAdmin.ksParamAction: WuiAdmin.ksActionTestCaseDoRemove,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync TestCaseData.ksParam_idTestCase: oEntry.idTestCase },
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sConfirm = 'Are you sure you want to remove test case #%d?' % (oEntry.idTestCase,)));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoRet.append(aoActions);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return aoRet;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncclass WuiTestCase(WuiFormContentBase):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync WUI user account content generator.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def __init__(self, oData, sMode, oDisp):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync assert isinstance(oData, TestCaseDataEx);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if sMode == WuiFormContentBase.ksMode_Add:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sTitle = 'New Test Case';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync elif sMode == WuiFormContentBase.ksMode_Edit:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sTitle = 'Edit Test Case - %s (#%s)' % (oData.sName, oData.idTestCase);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync else:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync assert sMode == WuiFormContentBase.ksMode_Show;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync sTitle = 'Test Case - %s (#%s)' % (oData.sName, oData.idTestCase);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync WuiFormContentBase.__init__(self, oData, sMode, 'TestCase', oDisp, sTitle);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Read additional bits form the DB.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oDepLogic = TestCaseDependencyLogic(oDisp.getDb());
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._aoAllTestCases = oDepLogic.getApplicableDepTestCaseData(-1 if oData.idTestCase is None else oData.idTestCase);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._aoAllGlobalRsrcs = GlobalResourceLogic(oDisp.getDb()).getAll();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def _populateForm(self, oForm, oData):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addIntRO (TestCaseData.ksParam_idTestCase, oData.idTestCase, 'Test Case ID')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addTimestampRO(TestCaseData.ksParam_tsEffective, oData.tsEffective, 'Last changed')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addTimestampRO(TestCaseData.ksParam_tsExpire, oData.tsExpire, 'Expires (excl)')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addIntRO (TestCaseData.ksParam_uidAuthor, oData.uidAuthor, 'Changed by UID')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addIntRO (TestCaseData.ksParam_idGenTestCase, oData.idGenTestCase, 'Test Case generation ID')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addText (TestCaseData.ksParam_sName, oData.sName, 'Name')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addText (TestCaseData.ksParam_sDescription, oData.sDescription, 'Description')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addCheckBox (TestCaseData.ksParam_fEnabled, oData.fEnabled, 'Enabled')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addLong (TestCaseData.ksParam_cSecTimeout,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync utils.formatIntervalSeconds2(oData.cSecTimeout), 'Default timeout')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addWideText (TestCaseData.ksParam_sTestBoxReqExpr, oData.sTestBoxReqExpr, 'TestBox requirements (python)');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addWideText (TestCaseData.ksParam_sBuildReqExpr, oData.sBuildReqExpr, 'Build requirement (python)');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addWideText (TestCaseData.ksParam_sBaseCmd, oData.sBaseCmd, 'Base command')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addText (TestCaseData.ksParam_sValidationKitZips, oData.sValidationKitZips, 'Test suite files')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addListOfTestCaseArgs(TestCaseDataEx.ksParam_aoTestCaseArgs, oData.aoTestCaseArgs, 'Argument variations')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoTestCaseDeps = [];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oTestCase in self._aoAllTestCases:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oTestCase.idTestCase == oData.idTestCase:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync continue;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fSelected = False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oDep in oData.aoDepTestCases:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oDep.idTestCase == oTestCase.idTestCase:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fSelected = True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync break;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoTestCaseDeps.append([oTestCase.idTestCase, fSelected, oTestCase.sName]);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addListOfTestCases(TestCaseDataEx.ksParam_aoDepTestCases, aoTestCaseDeps, 'Depends on test cases')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoGlobalResrcDeps = [];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oGlobalRsrc in self._aoAllGlobalRsrcs:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fSelected = False;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for oDep in oData.aoDepGlobalResources:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oDep.idGlobalRsrc == oGlobalRsrc.idGlobalRsrc:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync fSelected = True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync break;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoGlobalResrcDeps.append([oGlobalRsrc.idGlobalRsrc, fSelected, oGlobalRsrc.sName]);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addListOfResources(TestCaseDataEx.ksParam_aoDepGlobalResources, aoGlobalResrcDeps, 'Depends on resources')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oForm.addSubmit();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return True;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync