Changeset 61474 in vbox
- Timestamp:
- Jun 5, 2016 9:02:01 PM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit
- Files:
-
- 1 added
- 9 edited
-
docs/AutomaticTestingRevamp.html (modified) (4 diffs)
-
docs/AutomaticTestingRevamp.txt (modified) (4 diffs)
-
testmanager/batch/close_orphaned_testsets.py (modified) (1 diff)
-
testmanager/core/schedulerbase.py (modified) (4 diffs)
-
testmanager/core/systemlog.py (modified) (2 diffs)
-
testmanager/core/testboxcontroller.py (modified) (1 diff)
-
testmanager/core/testresults.py (modified) (2 diffs)
-
testmanager/core/testset.py (modified) (6 diffs)
-
testmanager/db/TestManagerDatabaseInit.pgsql (modified) (3 diffs)
-
testmanager/db/tmdb-r21-testsets-4.pgsql (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/docs/AutomaticTestingRevamp.html
r59549 r61474 946 946 <li><p class="first">If the testbox was marked as disabled, respond with an IDLE command to the 947 947 testbox [done]. (Note! Must do this after TestBoxStatuses maintainance from 948 point 2, or abandon d tests won't be cleaned up after a testbox is disabled.)</p>948 point 2, or abandoned tests won't be cleaned up after a testbox is disabled.)</p> 949 949 </li> 950 950 <li><p class="first">Consider testcases in the scheduling queue, pick the first one which the … … 1099 1099 <p>TODO</p> 1100 1100 </div> 1101 <div class="section" id="cleaning-up-abandon d-testcase">1102 <h2>#9 - Cleaning Up Abandon d Testcase</h2>1101 <div class="section" id="cleaning-up-abandoned-testcase"> 1102 <h2>#9 - Cleaning Up Abandoned Testcase</h2> 1103 1103 <p>This is a subfunction of scenario #1 and #2. The actions taken are the same in 1104 1104 both situations. The precondition for taking this path is that the row in the … … 1110 1110 <dd><ol class="first last loweralpha simple"> 1111 1111 <li>Add a message to the root TestResults row, creating one if necesary, 1112 that explains that the test was abandon d. This is done1112 that explains that the test was abandoned. This is done 1113 1113 by inserting/finding the string into/in TestResultStrTab and adding 1114 1114 a row to TestResultMsgs with idStrMsg set to that string id and … … 1129 1129 <h2>#10 - Cleaning Up a Disabled/Dead TestBox</h2> 1130 1130 <p>The UI needs to be able to clean up the remains of a testbox which for some 1131 reason is out of action. Normal cleaning up of abandon d testcases requires1131 reason is out of action. Normal cleaning up of abandoned testcases requires 1132 1132 that the testbox signs on or asks for work, but if the testbox is dead or 1133 1133 in some way indisposed, it won't be doing any of that. So, the testbox -
trunk/src/VBox/ValidationKit/docs/AutomaticTestingRevamp.txt
r59549 r61474 635 635 3. If the testbox was marked as disabled, respond with an IDLE command to the 636 636 testbox [done]. (Note! Must do this after TestBoxStatuses maintainance from 637 point 2, or abandon d tests won't be cleaned up after a testbox is disabled.)637 point 2, or abandoned tests won't be cleaned up after a testbox is disabled.) 638 638 639 639 4. Consider testcases in the scheduling queue, pick the first one which the … … 784 784 785 785 786 #9 - Cleaning Up Abandon d Testcase787 ---------------------------------- 786 #9 - Cleaning Up Abandoned Testcase 787 ----------------------------------- 788 788 789 789 This is a subfunction of scenario #1 and #2. The actions taken are the same in … … 796 796 1. If the testset is incomplete, we need to completed: 797 797 a) Add a message to the root TestResults row, creating one if necesary, 798 that explains that the test was abandon d. This is done798 that explains that the test was abandoned. This is done 799 799 by inserting/finding the string into/in TestResultStrTab and adding 800 800 a row to TestResultMsgs with idStrMsg set to that string id and … … 813 813 814 814 The UI needs to be able to clean up the remains of a testbox which for some 815 reason is out of action. Normal cleaning up of abandon d testcases requires815 reason is out of action. Normal cleaning up of abandoned testcases requires 816 816 that the testbox signs on or asks for work, but if the testbox is dead or 817 817 in some way indisposed, it won't be doing any of that. So, the testbox -
trunk/src/VBox/ValidationKit/testmanager/batch/close_orphaned_testsets.py
r56295 r61474 72 72 # Complete them. 73 73 if self.oConfig.fJustDoIt: 74 print 'Completing %u test sets as abandon d:' % (len(aoOrphans),);74 print 'Completing %u test sets as abandoned:' % (len(aoOrphans),); 75 75 for oTestSet in aoOrphans: 76 76 print '#%-7u: idTestBox=%-3u tsCreated=%s tsDone=%s' \ 77 77 % (oTestSet.idTestSet, oTestSet.idTestBox, oTestSet.tsCreated, oTestSet.tsDone); 78 oLogic.completeAsAbandon d(oTestSet.idTestSet);78 oLogic.completeAsAbandoned(oTestSet.idTestSet); 79 79 print 'Committing...'; 80 80 oDb.commit(); -
trunk/src/VBox/ValidationKit/testmanager/core/schedulerbase.py
r61220 r61474 884 884 ' idGenTestBox,\n' 885 885 ' idTestBox,\n' 886 ' idSchedGroup,\n' 886 887 ' idTestGroup,\n' 887 888 ' idGenTestCase,\n' … … 900 901 ' %s,\n' # idGenTestBox 901 902 ' %s,\n' # idTestBox 903 ' %s,\n' # idSchedGroup 902 904 ' %s,\n' # idTestGroup 903 905 ' %s,\n' # idGenTestCase … … 916 918 oTestBoxData.idGenTestBox, 917 919 oTestBoxData.idTestBox, 920 oTestBoxData.idSchedGroup, 918 921 oTask.idTestGroup, 919 922 oTestEx.oTestCase.idGenTestCase, … … 1044 1047 fDecision = oEntry.getPreReqDecision(sPreReqSet); 1045 1048 if fDecision is None: 1046 ## @todo DB Tuning1047 1049 # Check for missing prereqs. 1048 1050 self._oDb.execute('SELECT COUNT(*)\n' 1049 1051 'FROM (VALUES ' + sPreReqSet + ') AS PreReqs(idTestCase)\n' 1050 'LEFT OUTER JOIN (SELECT *\n'1052 'LEFT OUTER JOIN (SELECT idTestSet\n' 1051 1053 ' FROM TestSets\n' 1052 1054 ' WHERE enmStatus IN (%s, %s)\n' -
trunk/src/VBox/ValidationKit/testmanager/core/systemlog.py
r56295 r61474 46 46 ksEvent_CmdNacked = 'CmdNack '; 47 47 ksEvent_TestBoxUnknown = 'TBoxUnkn'; 48 ksEvent_TestSetAbandon d= 'TSetAbdd';48 ksEvent_TestSetAbandoned = 'TSetAbdd'; 49 49 ksEvent_UserAccountUnknown = 'TAccUnkn'; 50 50 ksEvent_XmlResultMalformed = 'XmlRMalf'; … … 57 57 ksEvent_CmdNacked, 58 58 ksEvent_TestBoxUnknown, 59 ksEvent_TestSetAbandon d,59 ksEvent_TestSetAbandoned, 60 60 ksEvent_UserAccountUnknown, 61 61 ksEvent_XmlResultMalformed, -
trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py
r61468 r61474 273 273 Cleans up any old test set that may be left behind and changes the 274 274 state to 'idle'. See scenario #9: 275 file://../../docs/AutomaticTestingRevamp.html#cleaning-up-abandon d-testcase275 file://../../docs/AutomaticTestingRevamp.html#cleaning-up-abandoned-testcase 276 276 277 277 Note. oStatusData.enmState is set to idle, but tsUpdated is not changed. 278 278 """ 279 279 280 # Cleanup any abandon d test.280 # Cleanup any abandoned test. 281 281 if oStatusData.idTestSet is not None: 282 SystemLogLogic(oDb).addEntry(SystemLogData.ksEvent_TestSetAbandon d,282 SystemLogLogic(oDb).addEntry(SystemLogData.ksEvent_TestSetAbandoned, 283 283 "idTestSet=%u idTestBox=%u enmState=%s %s" 284 284 % (oStatusData.idTestSet, oStatusData.idTestBox, 285 285 oStatusData.enmState, self._sAction), 286 286 fCommit = False); 287 TestSetLogic(oDb).completeAsAbandon d(oStatusData.idTestSet, fCommit = False);287 TestSetLogic(oDb).completeAsAbandoned(oStatusData.idTestSet, fCommit = False); 288 288 GlobalResourceLogic(oDb).freeGlobalResourcesByTestBox(self._idTestBox, fCommit = False); 289 289 -
trunk/src/VBox/ValidationKit/testmanager/core/testresults.py
r61470 r61474 799 799 { ksResultsSortByBuildRevision: ( '', None, ' Builds.iRevision DESC' ), } 800 800 ), 801 ksResultsGroupingTypeSchedGroup: ( 802 ', TestBoxesWithStrings', 803 'TestBoxesWithStrings.idSchedGroup', 804 ' AND TestSets.idGenTestBox = TestBoxesWithStrings.idGenTestBox', 805 { 806 807 ksResultsSortByTestBoxName: ( 808 # Sorting tables. 809 '', 810 # Sorting table join(s). 811 None, 812 # Start of ORDER BY statement. 813 ' TestBoxesWithStrings.sName DESC', 814 # Extra columns to fetch for the above ORDER BY to work in a SELECT DISTINCT statement. 815 '', 816 # Columns for the GROUP BY 817 '' ), 818 ksResultsSortByTestBoxOsArch: ( '', None, ' TestBoxesWithStrings.sOs, TestBoxesWithStrings.sCpuArch', '', '' ), 819 ksResultsSortByTestBoxOs: ( '', None, ' TestBoxesWithStrings.sOs', '', '' ), 820 ksResultsSortByTestBoxOsVersion: ( '', None, ' TestBoxesWithStrings.sOs, TestBoxesWithStrings.sOsVersion DESC', 821 '', '' ), 822 ksResultsSortByTestBoxArch: ( '', None, ' TestBoxesWithStrings.sCpuArch', '', '' ), 823 ksResultsSortByTestBoxCpuVendor: ( '', None, ' TestBoxesWithStrings.sCpuVendor', '', '' ), 824 ksResultsSortByTestBoxCpuName: ( '', None, ' TestBoxesWithStrings.sCpuVendor, TestBoxesWithStrings.sCpuName', 825 '', '' ), 826 ksResultsSortByTestBoxCpuRev: ( 827 '', 828 None, 829 ' TestBoxesWithStrings.sCpuVendor, TestBoxesWithStrings.lCpuRevision DESC', 830 ', TestBoxesWithStrings.lCpuRevision', 831 ', TestBoxesWithStrings.lCpuRevision' ), 832 ksResultsSortByTestBoxCpuFeatures: ( 833 '', 834 None, 835 ' TestBoxesWithStrings.fCpuHwVirt DESC, TestBoxesWithStrings.fCpuNestedPaging DESC, ' 836 +'TestBoxesWithStrings.fCpu64BitGuest DESC, TestBoxesWithStrings.cCpus DESC', 837 '', 838 '' ), } 839 ), 801 ksResultsGroupingTypeSchedGroup: ( '', 'TestSets.idSchedGroup', None, {},), 840 802 }; 841 803 … … 1228 1190 1229 1191 self._oDb.execute('SELECT SchedGroups.*\n' 1230 'FROM ( SELECT TestBoxes.idSchedGroup ASidSchedGroup,\n'1192 'FROM ( SELECT idSchedGroup,\n' 1231 1193 ' MAX(TestSets.tsCreated) AS tsNow\n' 1232 ' FROM TestSets,\n' 1233 ' TestBoxes\n' 1234 ' WHERE TestSets.idGenTestBox = TestBoxes.idGenTestBox\n' 1235 ' AND ' + self._getTimePeriodQueryPart(tsNow, sPeriod, ' ') + 1194 ' FROM TestSets\n' 1195 ' WHERE ' + self._getTimePeriodQueryPart(tsNow, sPeriod, ' ') + 1236 1196 ' GROUP BY idSchedGroup\n' 1237 1197 ' ) AS SchedGroupIDs\n' -
trunk/src/VBox/ValidationKit/testmanager/core/testset.py
r61468 r61474 79 79 ksParam_idGenTestBox = 'TestSet_idGenTestBox'; 80 80 ksParam_idTestBox = 'TestSet_idTestBox'; 81 ksParam_idSchedGroup = 'TestSet_idSchedGroup'; 81 82 ksParam_idTestGroup = 'TestSet_idTestGroup'; 82 83 ksParam_idGenTestCase = 'TestSet_idGenTestCase'; … … 89 90 ksParam_idTestSetGangLeader = 'TestSet_idTestSetGangLeader'; 90 91 91 kasAllowNullAttributes = [ 'tsDone', 'idBuildTestSuite', 'idTestSetGangLeader' ];92 kasAllowNullAttributes = [ 'tsDone', 'idBuildTestSuite', 'idTestSetGangLeader' ]; 92 93 kasValidValues_enmStatus = [ 93 94 ksTestStatus_Running, … … 104 105 105 106 107 kcDbColumns = 20; 108 106 109 def __init__(self): 107 110 ModelDataBase.__init__(self); … … 121 124 self.idGenTestBox = None; 122 125 self.idTestBox = None; 126 self.idSchedGroup = None; 123 127 self.idTestGroup = None; 124 128 self.idGenTestCase = None; … … 150 154 self.idGenTestBox = aoRow[8]; 151 155 self.idTestBox = aoRow[9]; 152 self.idTestGroup = aoRow[10]; 153 self.idGenTestCase = aoRow[11]; 154 self.idTestCase = aoRow[12]; 155 self.idGenTestCaseArgs = aoRow[13]; 156 self.idTestCaseArgs = aoRow[14]; 157 self.idTestResult = aoRow[15]; 158 self.sBaseFilename = aoRow[16]; 159 self.iGangMemberNo = aoRow[17]; 160 self.idTestSetGangLeader = aoRow[18]; 156 self.idSchedGroup = aoRow[10]; 157 self.idTestGroup = aoRow[11]; 158 self.idGenTestCase = aoRow[12]; 159 self.idTestCase = aoRow[13]; 160 self.idGenTestCaseArgs = aoRow[14]; 161 self.idTestCaseArgs = aoRow[15]; 162 self.idTestResult = aoRow[16]; 163 self.sBaseFilename = aoRow[17]; 164 self.iGangMemberNo = aoRow[18]; 165 self.idTestSetGangLeader = aoRow[19]; 161 166 return self; 162 167 … … 443 448 return oData.idTestSetGangLeader; 444 449 445 def completeAsAbandon d(self, idTestSet, fCommit = False):450 def completeAsAbandoned(self, idTestSet, fCommit = False): 446 451 """ 447 452 Completes the testset as abandoned if necessary. -
trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql
r61472 r61474 59 59 -- AND sEvent = 'TBoxUnkn' 60 60 -- AND sLogText = :sNewLogText; 61 -- - When cleaning up an abandon d testcase (scenario #9), log which62 -- testbox abandon d which testset.61 -- - When cleaning up an abandoned testcase (scenario #9), log which 62 -- testbox abandoned which testset. 63 63 -- 64 64 -- The Web UI will have some way of displaying the log. … … 1605 1605 -- Non-unique foreign key: TestBoxes(idTestBox) 1606 1606 idTestBox INTEGER NOT NULL, 1607 --- The scheduling group ID the test was scheduled thru (valid: tsStarted). 1608 -- Non-unique foreign key: SchedGroups(idSchedGroup) 1609 idSchedGroup INTEGER NOT NULL, 1607 1610 1608 1611 --- The testgroup (valid: tsConfig). … … 1664 1667 CREATE INDEX TestSetsGraphBoxIdx ON TestSets (idTestBox, tsCreated DESC, tsDone ASC NULLS LAST, idBuildCategory, idTestCase); 1665 1668 1666 ALTER TABLE TestResults ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL;1667 ALTER TABLE TestResultValues ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL;1668 ALTER TABLE TestResultFiles ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL;1669 ALTER TABLE TestResultMsgs ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL;1670 ALTER TABLE TestResultFailures ADD CONSTRAINT idTestSetFkFOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL;1669 ALTER TABLE TestResults ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; 1670 ALTER TABLE TestResultValues ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; 1671 ALTER TABLE TestResultFiles ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; 1672 ALTER TABLE TestResultMsgs ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; 1673 ALTER TABLE TestResultFailures ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; 1671 1674 1672 1675
Note:
See TracChangeset
for help on using the changeset viewer.

