Changeset 86987 in vbox for trunk/src/VBox/ValidationKit/testmanager
- Timestamp:
- Nov 26, 2020 2:25:20 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/db/partial-db-dump.py
r86985 r86987 118 118 'TestResultFailures', 119 119 'Builds', 120 'TestBoxStrTab', 120 121 'SystemLog', 121 122 ]; … … 183 184 idLastTestResult = oDb.fetchOne()[0]; 184 185 print('Last test result ID: %s' % (idLastTestResult,)); 185 186 # Get the build ID range.187 oDb.execute('SELECT MIN(idBuild), MIN(idBuildTestSuite) FROM TestSets WHERE idTestSet >= %s', (idFirstTestSet,));188 idFirstBuild = 0;189 if oDb.getRowCount() > 0:190 idFirstBuild = min(oDb.fetchOne());191 print('First build ID: %s' % (idFirstBuild,));192 186 193 187 # Tables with idTestSet member. … … 222 216 223 217 # The builds table. 218 oDb.execute('SELECT MIN(idBuild), MIN(idBuildTestSuite) FROM TestSets WHERE idTestSet >= %s', (idFirstTestSet,)); 219 idFirstBuild = 0; 220 if oDb.getRowCount() > 0: 221 idFirstBuild = min(oDb.fetchOne()); 222 print('First build ID: %s' % (idFirstBuild,)); 224 223 for sTable in [ 'Builds', ]: 225 224 self._doCopyTo(sTable, oZipFile, oDb, 226 225 'COPY (SELECT * FROM ' + sTable + ' WHERE idBuild >= %s) TO STDOUT WITH (FORMAT TEXT)', 227 226 (idFirstBuild,)); 227 228 # The test box string table. 229 self._doCopyTo('TestBoxStrTab', oZipFile, oDb, ''' 230 COPY (SELECT * FROM TestBoxStrTab WHERE idStr IN ( 231 ( SELECT 0 232 ) UNION ( SELECT idStrComment FROM TestBoxes WHERE tsExpire >= %s 233 ) UNION ( SELECT idStrCpuArch FROM TestBoxes WHERE tsExpire >= %s 234 ) UNION ( SELECT idStrCpuName FROM TestBoxes WHERE tsExpire >= %s 235 ) UNION ( SELECT idStrCpuVendor FROM TestBoxes WHERE tsExpire >= %s 236 ) UNION ( SELECT idStrDescription FROM TestBoxes WHERE tsExpire >= %s 237 ) UNION ( SELECT idStrOS FROM TestBoxes WHERE tsExpire >= %s 238 ) UNION ( SELECT idStrOsVersion FROM TestBoxes WHERE tsExpire >= %s 239 ) UNION ( SELECT idStrReport FROM TestBoxes WHERE tsExpire >= %s 240 ) ) ) TO STDOUT WITH (FORMAT TEXT) 241 ''', (tsEffectiveSafe, tsEffectiveSafe, tsEffectiveSafe, tsEffectiveSafe, 242 tsEffectiveSafe, tsEffectiveSafe, tsEffectiveSafe, tsEffectiveSafe,)); 228 243 229 244 oZipFile.close(); … … 251 266 'TestGroupMembers', 252 267 'SchedGroups', 253 'TestBoxStrTab',254 268 'TestBoxes', 255 269 'SchedGroupMembers',
Note:
See TracChangeset
for help on using the changeset viewer.