VirtualBox

Changeset 69448 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Oct 27, 2017 4:57:29 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118783
Message:

testmanager/db: scm updates

Location:
trunk/src/VBox/ValidationKit/testmanager/db
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql

    r65914 r69448  
     1-- $Id$
     2--- @file
     3-- Autogenerated from TestManagerDatabaseInit.pgsql.  Do not edit!
     4--
     5
     6--
     7-- Copyright (C) 2012-2017 Oracle Corporation
     8--
     9-- This file is part of VirtualBox Open Source Edition (OSE), as
     10-- available from http://www.virtualbox.org. This file is free software;
     11-- you can redistribute it and/or modify it under the terms of the GNU
     12-- General Public License (GPL) as published by the Free Software
     13-- Foundation, in version 2 as it comes in the "COPYING" file of the
     14-- VirtualBox OSE distribution. VirtualBox OSE is distributed in the
     15-- hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     16--
     17-- The contents of this file may alternatively be used under the terms
     18-- of the Common Development and Distribution License Version 1.0
     19-- (CDDL) only, as it comes in the "COPYING.CDDL" file of the
     20-- VirtualBox OSE distribution, in which case the provisions of the
     21-- CDDL are applicable instead of those of the GPL.
     22--
     23-- You may elect to license modified versions of this file under the
     24-- terms and conditions of either the GPL or the CDDL or both.
     25--
     26
     27
    128COMMENT ON COLUMN SystemLog.tsCreated IS
    229  'When this was logged.';
     
    13631390to figure out whether to remain in ''gather-gang''::TestBoxState_T.';
    13641391
    1365 
  • trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql

    r69111 r69448  
    693693--
    694694-- This is a string cache for all string members in TestBoxes except the name.
    695 -- The rational is to avoid duplicating large strings like sReport when the 
    696 -- testbox reports a new cMbScratch value or the box when the test sheriff 
    697 -- sends a reboot command or similar. 
    698 -- 
    699 -- At the time this table was introduced, we had 400558 TestBoxes rows,  where 
     695-- The rational is to avoid duplicating large strings like sReport when the
     696-- testbox reports a new cMbScratch value or the box when the test sheriff
     697-- sends a reboot command or similar.
     698--
     699-- At the time this table was introduced, we had 400558 TestBoxes rows,  where
    700700-- the SUM(LENGTH(sReport)) was 993MB.  There were really just 1066 distinct
    701701-- sReport values, with a total length of 0x3 MB.
     
    11711171    PRIMARY KEY (idBlacklisting, tsExpire)
    11721172);
    1173 CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch, 
     1173CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch,
    11741174                                                  tsExpire DESC, tsEffective ASC);
    11751175
     
    14451445CREATE INDEX TestResultsNameIdx2 ON TestResults (idTestResult, idStrName);
    14461446
    1447 ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey 
     1447ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey
    14481448    FOREIGN KEY (idTestResult, idTestSet) REFERENCES TestResults(idTestResult, idTestSet) MATCH FULL;
    14491449
  • trunk/src/VBox/ValidationKit/testmanager/db/TestManagerVBoxPilot-1.pgsql

    r69111 r69448  
    5050INSERT INTO SchedGroups (sName, sDescription, fEnabled, idBuildSrc, idBuildSrcTestSuite)
    5151    VALUES ('VirtualBox Trunk', NULL, TRUE,
    52             (SELECT idBuildSrc FROM BuildSources WHERE sName = 'VBox trunk builds'), 
     52            (SELECT idBuildSrc FROM BuildSources WHERE sName = 'VBox trunk builds'),
    5353            (SELECT idBuildSrc FROM BuildSources WHERE sName = 'VBox TestSuite trunk builds') );
    5454\set idSchedGroupQuery '(SELECT idSchedGroup FROM SchedGroups WHERE sName = \'VirtualBox Trunk\')'
     
    8080--
    8181INSERT INTO TestCases (uidAuthor, sName, fEnabled, cSecTimeout, sBaseCmd, sTestSuiteZips)
    82     VALUES (:idUserQuery, 'VBox install', TRUE, 600, 
    83             'validationkit/testdriver/vboxinstaller.py --vbox-build @BUILD_BINARIES@ @ACTION@ -- testdriver/base.py @ACTION@', 
     82    VALUES (:idUserQuery, 'VBox install', TRUE, 600,
     83            'validationkit/testdriver/vboxinstaller.py --vbox-build @BUILD_BINARIES@ @ACTION@ -- testdriver/base.py @ACTION@',
    8484            '@VALIDATIONKIT_ZIP@');
    8585INSERT INTO TestCaseArgs (idTestCase, uidAuthor, sArgs)
     
    9090COMMIT WORK;
    9191
    92 
  • trunk/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py

    r69111 r69448  
    33# $Id$
    44
     5"""
     6Converts doxygen style comments in SQL script to COMMENT ON statements.
     7"""
     8
     9__copyright__ = \
    510"""
    611Copyright (C) 2012-2017 Oracle Corporation
     
    2227You may elect to license modified versions of this file under the
    2328terms and conditions of either the GPL or the CDDL or both.
    24 """
    25 """
    26 Converts doxygen style comments in SQL script to COMMENT ON statements.
    2729"""
    2830
     
    204206    except:
    205207        return errorMsg("failed to open '%s' for reading" % (sInput,));
     208
     209    # header.
     210    print("-- $" "Id" "$");
     211    print("--- @file");
     212    print("-- Autogenerated from %s.  Do not edit!" % (sInput,));
     213    print("--");
     214    print("");
     215    for sLine in __copyright__.split('\n'):
     216        print("-- %s" % (sLine,));
     217    print("");
     218    print("");
    206219    me = SqlDox(oFile, sInput);
    207220    return me.process();
  • trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r07-testresults-1.pgsql

    r69111 r69448  
    3636\d+ TestResults
    3737
    38 
  • trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r11-testsets-2.pgsql

    r69111 r69448  
    3131DROP INDEX TestSetsBoxIdx;
    3232DROP INDEX TestSetsBuildIdx;
    33 DROP INDEX TestSetsTestCaseIdx;   
     33DROP INDEX TestSetsTestCaseIdx;
    3434DROP INDEX TestSetsTestVarIdx;
    3535DROP INDEX TestSetsCreated;
     
    7878    idBuild             INTEGER     NOT NULL,
    7979    --- The build category of idBuild when the test started.
    80     -- This is for speeding up graph data collection, i.e. avoid idBuild 
     80    -- This is for speeding up graph data collection, i.e. avoid idBuild
    8181    -- the WHERE part of the selection.
    8282    idBuildCategory     INTEGER     , -- NOT NULL REFERENCES BuildCategories(idBuildCategory)
     
    148148SELECT COUNT(*) FROM TestSets;
    149149
    150 INSERT INTO NewTestSets (idTestSet, tsConfig, tsCreated, tsDone, enmStatus, idBuild, idBuildCategory, idBuildTestSuite, 
    151                          idGenTestBox, idTestBox, idTestGroup, idGenTestCase, idTestCase, idGenTestCaseArgs, idTestCaseArgs, 
     150INSERT INTO NewTestSets (idTestSet, tsConfig, tsCreated, tsDone, enmStatus, idBuild, idBuildCategory, idBuildTestSuite,
     151                         idGenTestBox, idTestBox, idTestGroup, idGenTestCase, idTestCase, idGenTestCaseArgs, idTestCaseArgs,
    152152                         idTestResult, sBaseFilename, iGangMemberNo, idTestSetGangLeader )
    153     SELECT a.idTestSet, a.tsConfig, a.tsCreated, tsDone, a.enmStatus, a.idBuild, b.idBuildCategory, a.idBuildTestSuite, 
    154            a.idGenTestBox, a.idTestBox, a.idTestGroup, a.idGenTestCase, a.idTestCase, a.idGenTestCaseArgs, a.idTestCaseArgs, 
     153    SELECT a.idTestSet, a.tsConfig, a.tsCreated, tsDone, a.enmStatus, a.idBuild, b.idBuildCategory, a.idBuildTestSuite,
     154           a.idGenTestBox, a.idTestBox, a.idTestGroup, a.idGenTestCase, a.idTestCase, a.idGenTestCaseArgs, a.idTestCaseArgs,
    155155           a.idTestResult, a.sBaseFilename, a.iGangMemberNo, a.idTestSetGangLeader
    156156    FROM   TestSets a LEFT OUTER JOIN Builds b ON (a.idBuild = b.idBuild AND b.tsExpire = 'infinity'::TIMESTAMP);
  • trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r15-index-sorting.pgsql

    r69111 r69448  
    6161
    6262DROP INDEX IF EXISTS BuildBlacklistIdx;
    63 CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch, 
     63CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch,
    6464                                                  tsExpire DESC, tsEffective ASC);
    6565\d BuildBlacklist;
  • trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql

    r69111 r69448  
    9191           TestResults tr
    9292    WHERE  o.idTestResult = tr.idTestResult;
    93    
     93
    9494-- Add unique constraint to TestResult for our new foreign key.
    9595ALTER TABLE TestResults ADD CONSTRAINT TestResults_idTestResult_idTestSet_key UNIQUE (idTestResult, idTestSet);
    9696
    9797-- Restore foreign key.
    98 ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey 
     98ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey
    9999    FOREIGN KEY (idTestResult, idTestSet) REFERENCES TestResults(idTestResult, idTestSet) MATCH FULL;
    100100
  • trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r17-testresultvalues-4.pgsql

    r69111 r69448  
    3737\d+ TestResultValues
    3838
    39 
  • trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql

    r69111 r69448  
    3737\set AUTOCOMMIT 0
    3838
    39                                                                                  
    40 --                                                                               
    41 -- Rename the original table, drop constrains and foreign key references so we   
    42 -- get the right name automatic when creating the new one.                       
    43 --                                                                               
     39
     40--
     41-- Rename the original table, drop constrains and foreign key references so we
     42-- get the right name automatic when creating the new one.
     43--
    4444\d+ TestResultFiles;
    4545ALTER TABLE TestResultFiles RENAME TO OldTestResultFiles;
     
    8282);
    8383
    84 INSERT INTO TestResultFiles ( idTestResultFile, idTestResult, idTestSet, tsCreated, idStrFile, idStrDescription, 
     84INSERT INTO TestResultFiles ( idTestResultFile, idTestResult, idTestSet, tsCreated, idStrFile, idStrDescription,
    8585                              idStrKind, idStrMime)
    86     SELECT o.idTestResultFile, o.idTestResult, tr.idTestSet, o.tsCreated, o.idStrFile, o.idStrDescription, 
     86    SELECT o.idTestResultFile, o.idTestResult, tr.idTestSet, o.tsCreated, o.idStrFile, o.idStrDescription,
    8787           o.idStrKind, o.idStrMime
    8888    FROM   OldTestResultFiles o,
    8989           TestResults tr
    9090    WHERE  o.idTestResult = tr.idTestResult;
    91    
     91
    9292-- Add new indexes.
    9393CREATE INDEX TestResultFilesIdx  ON TestResultFiles(idTestResult);
     
    105105
    106106
    107 --                                                                               
    108 -- Rename the original table, drop constrains and foreign key references so we   
    109 -- get the right name automatic when creating the new one.                       
    110 --                                                                               
     107--
     108-- Rename the original table, drop constrains and foreign key references so we
     109-- get the right name automatic when creating the new one.
     110--
    111111\d+ TestResultMsgs;
    112112ALTER TABLE TestResultMsgs RENAME TO OldTestResultMsgs;
     
    134134
    135135INSERT INTO TestResultMsgs ( idTestResultMsg, idTestResult, idTestSet, tsCreated, idStrMsg, enmLevel)
    136     SELECT o.idTestResultMsg, o.idTestResult, tr.idTestSet, o.tsCreated, o.idStrMsg, o.enmLevel 
     136    SELECT o.idTestResultMsg, o.idTestResult, tr.idTestSet, o.tsCreated, o.idStrMsg, o.enmLevel
    137137    FROM   OldTestResultMsgs o,
    138138           TestResults tr
    139139    WHERE  o.idTestResult = tr.idTestResult;
    140    
     140
    141141-- Add new indexes.
    142142CREATE INDEX TestResultMsgsIdx  ON TestResultMsgs(idTestResult);
     
    160160COMMIT;
    161161
    162 
    163 
  • trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r19-testboxes-3.pgsql

    r69111 r69448  
    4343LOCK TABLE TestBoxes            IN ACCESS EXCLUSIVE MODE;
    4444LOCK TABLE SchedGroupMembers    IN ACCESS EXCLUSIVE MODE;
    45      
     45
    4646\d+ TestBoxes;
    4747
    4848--
    49 -- Rename the table, drop foreign keys refering to it, and drop constrains 
     49-- Rename the table, drop foreign keys refering to it, and drop constrains
    5050-- within the table itself.  The latter is mostly for naming and we do it
    5151-- up front in case the database we're running against has different names
    52 -- due to previous conversions. 
     52-- due to previous conversions.
    5353--
    5454ALTER TABLE TestBoxes RENAME TO OldTestBoxes;
     
    6565ALTER TABLE OldTestBoxes    DROP CONSTRAINT testboxes_pkey;
    6666ALTER TABLE OldTestBoxes    DROP CONSTRAINT testboxes_idgentestbox_key;
    67                    
     67
    6868DROP INDEX IF EXISTS TestBoxesUuidIdx;
    6969DROP INDEX IF EXISTS TestBoxesExpireEffectiveIdx;
    70              
     70
    7171-- This output should be free of index, constraints and references from other tables.
    7272\d+ OldTestBoxes;
    73      
    74 --
    75 -- Create the two new tables before starting data migration (don't want to spend time 
     73
     74--
     75-- Create the two new tables before starting data migration (don't want to spend time
    7676-- on converting strings just to find a typo in the TestBoxes create table syntax).
    77 --                   
     77--
    7878CREATE SEQUENCE TestBoxStrTabIdSeq
    7979    START 1
     
    251251--
    252252
    253 INSERT INTO TestBoxes ( 
     253INSERT INTO TestBoxes (
    254254            idTestBox,          --  0
    255255            tsEffective,        --  1
     
    278278            fCpu64BitGuest,     -- 24
    279279            fChipsetIoMmu,      -- 25
    280             fRawMode,           -- 26 
    281             cMbMemory,          -- 27 
    282             cMbScratch,         -- 28 
    283             idStrReport,        -- 29 
    284             iTestBoxScriptRev,  -- 30 
     280            fRawMode,           -- 26
     281            cMbMemory,          -- 27
     282            cMbScratch,         -- 28
     283            idStrReport,        -- 29
     284            iTestBoxScriptRev,  -- 30
    285285            iPythonHexVersion,  -- 31
    286286            enmPendingCmd       -- 32
    287287            )
    288 SELECT      idTestBox, 
    289             tsEffective, 
    290             tsExpire, 
    291             uidAuthor, 
    292             idGenTestBox, 
    293             ip, 
    294             uuidSystem, 
    295             sName, 
    296             st1.idStr, 
    297             idSchedGroup, 
    298             fEnabled, 
    299             enmLomKind, 
    300             ipLom, 
    301             pctScaleTimeout, 
     288SELECT      idTestBox,
     289            tsEffective,
     290            tsExpire,
     291            uidAuthor,
     292            idGenTestBox,
     293            ip,
     294            uuidSystem,
     295            sName,
     296            st1.idStr,
     297            idSchedGroup,
     298            fEnabled,
     299            enmLomKind,
     300            ipLom,
     301            pctScaleTimeout,
    302302            NULL,
    303             st2.idStr, 
    304             st3.idStr, 
    305             st4.idStr, 
    306             st5.idStr, 
     303            st2.idStr,
     304            st3.idStr,
     305            st4.idStr,
     306            st5.idStr,
    307307            st6.idStr,
    308             lCpuRevision,         
    309             cCpus, 
    310             fCpuHwVirt, 
    311             fCpuNestedPaging, 
    312             fCpu64BitGuest, 
    313             fChipsetIoMmu, 
     308            lCpuRevision,
     309            cCpus,
     310            fCpuHwVirt,
     311            fCpuNestedPaging,
     312            fCpu64BitGuest,
     313            fChipsetIoMmu,
    314314            NULL,
    315             cMbMemory, 
    316             cMbScratch, 
     315            cMbMemory,
     316            cMbScratch,
    317317            st7.idStr,
    318             iTestBoxScriptRev, 
    319             iPythonHexVersion, 
     318            iTestBoxScriptRev,
     319            iPythonHexVersion,
    320320            enmPendingCmd
    321321FROM        OldTestBoxes
     
    333333
    334334-- Restore foreign key references to the table.
    335 ALTER TABLE TestBoxStatuses ADD  CONSTRAINT TestBoxStatuses_idGenTestBox_fkey 
     335ALTER TABLE TestBoxStatuses ADD  CONSTRAINT TestBoxStatuses_idGenTestBox_fkey
    336336    FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox);
    337 ALTER TABLE TestSets        ADD  CONSTRAINT TestSets_idGenTestBox_fkey         
     337ALTER TABLE TestSets        ADD  CONSTRAINT TestSets_idGenTestBox_fkey
    338338    FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox);
    339339
     
    345345\d TestBoxes;
    346346
    347 
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette