VirtualBox

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


Ignore:
Timestamp:
Jun 6, 2016 8:03:45 PM (9 years ago)
Author:
vboxsync
Message:

testmanager: Testboxes can now be members of more than one scheduling group.

Location:
trunk/src/VBox/ValidationKit/testmanager
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/core/testboxstatus.py

    r61502 r61507  
    166166        """
    167167        self._oDb.execute('SELECT   TestBoxStatuses.*,\n'
    168                           '         TestBoxesWithStrings.*,\n'
     168                          '         TestBoxesWithStrings.*\n'
    169169                          'FROM     TestBoxStatuses,\n'
    170170                          '         TestBoxesWithStrings\n'
     
    174174                          '     AND TestBoxesWithStrings.uuidSystem = %s\n'
    175175                          '     AND TestBoxesWithStrings.ip         = %s\n'
    176                           , (idTestBox,
    177                              idTestBox,
    178                              sTestBoxUuid,
    179                              sTestBoxAddr,
    180                           ));
     176                          , ( idTestBox,
     177                              idTestBox,
     178                              sTestBoxUuid,
     179                              sTestBoxAddr,) );
    181180        cRows = self._oDb.getRowCount();
    182181        if cRows != 1:
     
    202201                          '         %s,\n'
    203202                          '         \'idle\'::TestBoxState_T,\n'
    204                           '         NULL,\n',
    205                           '         0)\n',
    206                           (idTestBox, idGenTestBox) );
     203                          '         NULL,\n'
     204                          '         0)\n'
     205                          , (idTestBox, idGenTestBox) );
    207206        self._oDb.maybeCommit(fCommit);
    208207        return True;
  • trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql

    r61474 r61507  
    550550    --- Test case scheduling priority.
    551551    -- Higher number causes the test case to be run more frequently.
    552     -- @sa SchedGroupMembers.iSchedPriority
     552    -- @sa SchedGroupMembers.iSchedPriority, TestBoxesInSchedGroups.iSchedPriority
    553553    -- @todo Not sure we want to keep this...
    554554    iSchedPriority      INTEGER     DEFAULT 16  CHECK (iSchedPriority >= 0 AND iSchedPriority < 32)  NOT NULL,
     
    666666    uidAuthor           INTEGER     NOT NULL,
    667667
    668     --- The scheduling priority if the test group.
     668    --- The scheduling priority of the test group.
    669669    -- Higher number causes the test case to be run more frequently.
    670     -- @sa TestGroupMembers.iSchedPriority
     670    -- @sa TestGroupMembers.iSchedPriority, TestBoxesInSchedGroups.iSchedPriority
    671671    iSchedPriority      INTEGER     DEFAULT 16 CHECK (iSchedPriority >= 0 AND iSchedPriority < 32)  NOT NULL,
    672672    --- When during the week this group is allowed to start running, NULL means
     
    823823    -- Intended for describing the box as well as making other relevant notes.
    824824    idStrDescription    INTEGER     REFERENCES TestBoxStrTab(idStr)  DEFAULT NULL,
    825 
    826     --- Reference to the scheduling group that this testbox is a member of.
    827     -- Non-unique foreign key: SchedGroups(idSchedGroup)
    828     -- A testbox is always part of a group, the default one nothing else.
    829     idSchedGroup        INTEGER     DEFAULT 1  NOT NULL,
    830825
    831826    --- Indicates whether this testbox is enabled.
     
    927922            LEFT OUTER JOIN TestBoxStrTab Str8 ON idStrReport      = Str8.idStr;
    928923
     924
     925--- @table TestBoxesInSchedGroups
     926-- N:M relationship between test boxes and scheduling groups.
     927--
     928-- We associate a priority with this relationship.
     929--
     930-- @remarks This table stores history.  Never update or delete anything.  The
     931--          equivalent of deleting is done by setting the 'tsExpire' field to
     932--          current_timestamp.  To select the currently valid entries use
     933--          tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'.
     934--
     935CREATE TABLE TestBoxesInSchedGroups (
     936    --- TestBox ID.
     937    -- Non-unique foreign key: TestBoxes(idTestBox).
     938    idTestBox           INTEGER     NOT NULL,
     939    --- Scheduling ID.
     940    -- Non-unique foreign key: SchedGroups(idSchedGroup).
     941    idSchedGroup        INTEGER     NOT NULL,
     942    --- When this row starts taking effect (inclusive).
     943    tsEffective         TIMESTAMP WITH TIME ZONE  DEFAULT current_timestamp  NOT NULL,
     944    --- When this row stops being tsEffective (exclusive).
     945    tsExpire            TIMESTAMP WITH TIME ZONE  DEFAULT TIMESTAMP WITH TIME ZONE 'infinity'  NOT NULL,
     946    --- The user id of the one who created/modified this entry.
     947    -- Non-unique foreign key: Users(uid)
     948    uidAuthor           INTEGER     NOT NULL,
     949
     950    --- The scheduling priority of the scheduling group for the test box.
     951    -- Higher number causes the scheduling group to be serviced more frequently.
     952    -- @sa TestGroupMembers.iSchedPriority, SchedGroups.iSchedPriority
     953    iSchedPriority      INTEGER     DEFAULT 16 CHECK (iSchedPriority >= 0 AND iSchedPriority < 32)  NOT NULL,
     954
     955    PRIMARY KEY (idTestBox, idSchedGroup, tsExpire)
     956);
    929957
    930958
     
    17711799    enmState            TestBoxState_T DEFAULT 'idle'::TestBoxState_T  NOT NULL,
    17721800    --- Reference to the test set
    1773     idTestSet           INTEGER     REFERENCES TestSets(idTestSet)
     1801    idTestSet           INTEGER     REFERENCES TestSets(idTestSet),
     1802    --- Interal work item number.
     1803    -- This is used to pick and prioritize between multiple scheduling groups.
     1804    iWorkItem           INTEGER     DEFAULT 0  NOT NULL
    17741805);
    17751806
Note: See TracChangeset for help on using the changeset viewer.

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