VirtualBox

Ignore:
Timestamp:
Oct 27, 2017 5:00:31 PM (7 years ago)
Author:
vboxsync
Message:

testmanager: scm updates

Location:
trunk/src/VBox/ValidationKit/testmanager/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/core/testbox.pgsql

    r69111 r69449  
    624624$$ LANGUAGE plpgsql;
    625625
    626 
  • trunk/src/VBox/ValidationKit/testmanager/core/testcase.pgsql

    r69111 r69449  
    6060    END;
    6161$$ LANGUAGE plpgsql;
    62              
     62
    6363---
    6464-- Check that the test case exists.
     
    8383-- @internal
    8484--
    85 CREATE OR REPLACE FUNCTION TestCaseLogic_historizeEntry(a_idTestCase INTEGER, a_tsExpire TIMESTAMP WITH TIME ZONE) 
     85CREATE OR REPLACE FUNCTION TestCaseLogic_historizeEntry(a_idTestCase INTEGER, a_tsExpire TIMESTAMP WITH TIME ZONE)
    8686    RETURNS VOID AS $$
    8787    DECLARE
     
    103103
    104104
    105 CREATE OR REPLACE function TestCaseLogic_addEntry(a_uidAuthor INTEGER, a_sName TEXT, a_sDescription TEXT, 
    106                                                   a_fEnabled BOOL, a_cSecTimeout INTEGER,  a_sTestBoxReqExpr TEXT, 
     105CREATE OR REPLACE function TestCaseLogic_addEntry(a_uidAuthor INTEGER, a_sName TEXT, a_sDescription TEXT,
     106                                                  a_fEnabled BOOL, a_cSecTimeout INTEGER,  a_sTestBoxReqExpr TEXT,
    107107                                                  a_sBuildReqExpr TEXT, a_sBaseCmd TEXT, a_sTestSuiteZips TEXT,
    108108                                                  a_sComment TEXT)
    109109    RETURNS INTEGER AS $$
    110     DECLARE 
     110    DECLARE
    111111         v_idTestCase INTEGER;
    112112    BEGIN
    113113        PERFORM TestCaseLogic_checkUniqueName(a_sName, -1);
    114114
    115         INSERT INTO TestCases (uidAuthor, sName, sDescription, fEnabled, cSecTimeout, 
     115        INSERT INTO TestCases (uidAuthor, sName, sDescription, fEnabled, cSecTimeout,
    116116                               sTestBoxReqExpr, sBuildReqExpr, sBaseCmd, sTestSuiteZips, sComment)
    117             VALUES (a_uidAuthor, a_sName, a_sDescription, a_fEnabled, a_cSecTimeout, 
     117            VALUES (a_uidAuthor, a_sName, a_sDescription, a_fEnabled, a_cSecTimeout,
    118118                    a_sTestBoxReqExpr, a_sBuildReqExpr, a_sBaseCmd, a_sTestSuiteZips, a_sComment)
    119119            RETURNING idTestcase INTO v_idTestCase;
     
    123123
    124124
    125 CREATE OR REPLACE function TestCaseLogic_editEntry(a_uidAuthor INTEGER, a_idTestCase INTEGER, a_sName TEXT, a_sDescription TEXT, 
    126                                                    a_fEnabled BOOL, a_cSecTimeout INTEGER,  a_sTestBoxReqExpr TEXT, 
     125CREATE OR REPLACE function TestCaseLogic_editEntry(a_uidAuthor INTEGER, a_idTestCase INTEGER, a_sName TEXT, a_sDescription TEXT,
     126                                                   a_fEnabled BOOL, a_cSecTimeout INTEGER,  a_sTestBoxReqExpr TEXT,
    127127                                                   a_sBuildReqExpr TEXT, a_sBaseCmd TEXT, a_sTestSuiteZips TEXT,
    128128                                                   a_sComment TEXT)
    129129    RETURNS INTEGER AS $$
    130     DECLARE 
     130    DECLARE
    131131         v_idGenTestCase INTEGER;
    132132    BEGIN
     
    135135
    136136        PERFORM TestCaseLogic_historizeEntry(a_idTestCase, CURRENT_TIMESTAMP);
    137         INSERT INTO TestCases (idTestCase, uidAuthor, sName, sDescription, fEnabled, cSecTimeout, 
     137        INSERT INTO TestCases (idTestCase, uidAuthor, sName, sDescription, fEnabled, cSecTimeout,
    138138                               sTestBoxReqExpr, sBuildReqExpr, sBaseCmd, sTestSuiteZips, sComment)
    139             VALUES (a_idTestCase, a_uidAuthor, a_sName, a_sDescription, a_fEnabled, a_cSecTimeout, 
     139            VALUES (a_idTestCase, a_uidAuthor, a_sName, a_sDescription, a_fEnabled, a_cSecTimeout,
    140140                    a_sTestBoxReqExpr, a_sBuildReqExpr, a_sBaseCmd, a_sTestSuiteZips, a_sComment)
    141141            RETURNING idGenTestCase INTO v_idGenTestCase;
     
    145145
    146146
    147 CREATE OR REPLACE FUNCTION TestCaseLogic_delEntry(a_uidAuthor INTEGER, a_idTestCase INTEGER, a_fCascade BOOLEAN) 
     147CREATE OR REPLACE FUNCTION TestCaseLogic_delEntry(a_uidAuthor INTEGER, a_idTestCase INTEGER, a_fCascade BOOLEAN)
    148148    RETURNS VOID AS $$
    149149    DECLARE
     
    156156        -- Check preconditions.
    157157        --
    158         IF a_fCascade <> TRUE THEN   
     158        IF a_fCascade <> TRUE THEN
    159159            IF EXISTS(  SELECT  *
    160160                        FROM    TestCaseDeps
     
    162162                            AND tsExpire         = 'infinity'::TIMESTAMP ) THEN
    163163                v_sErrors := '';
    164                 FOR v_Rec IN   
    165                     SELECT  TestCases.idTestCase AS idTestCase, 
     164                FOR v_Rec IN
     165                    SELECT  TestCases.idTestCase AS idTestCase,
    166166                            TestCases.sName AS sName
    167167                    FROM    TestCaseDeps, TestCases
     
    178178                RAISE EXCEPTION 'Other test cases depends on test case with ID %: % ', a_idTestCase, v_sErrors;
    179179            END IF;
    180            
     180
    181181            IF EXISTS(  SELECT  *
    182182                        FROM    TestGroupMembers
     
    184184                            AND tsExpire   = 'infinity'::TIMESTAMP ) THEN
    185185                v_sErrors := '';
    186                 FOR v_Rec IN   
    187                     SELECT  TestGroups.idTestGroup AS idTestGroup, 
     186                FOR v_Rec IN
     187                    SELECT  TestGroups.idTestGroup AS idTestGroup,
    188188                            TestGroups.sName AS sName
    189189                    FROM    TestGroupMembers, TestGroups
     
    204204        --
    205205        -- To preserve the information about who deleted the record, we try to
    206         -- add a dummy record which expires immediately.  I say try because of 
     206        -- add a dummy record which expires immediately.  I say try because of
    207207        -- the primary key, we must let the new record be valid for 1 us. :-(
    208208        --
     
    226226        --
    227227        -- Delete arguments, test case dependencies and resource dependencies.
    228         -- (We don't bother recording who deleted the records here since it's 
     228        -- (We don't bother recording who deleted the records here since it's
    229229        -- a lot of work and sufficiently covered in the TestCases table.)
    230230        --
     
    249249            WHERE   idTestCasePreReq = a_idTestCase
    250250                AND tsExpire         = 'infinity'::TIMESTAMP;
    251            
     251
    252252            UPDATE  TestGroupMembers
    253253            SET     tsExpire   = CURRENT_TIMESTAMP
  • trunk/src/VBox/ValidationKit/testmanager/core/useraccount.pgsql

    r69111 r69449  
    6060    END;
    6161$$ LANGUAGE plpgsql;
    62              
     62
    6363---
    6464-- Check that the user account exists.
     
    8484-- @internal
    8585--
    86 CREATE OR REPLACE FUNCTION UserAccountLogic_historizeEntry(a_uid INTEGER, a_tsExpire TIMESTAMP WITH TIME ZONE) 
     86CREATE OR REPLACE FUNCTION UserAccountLogic_historizeEntry(a_uid INTEGER, a_tsExpire TIMESTAMP WITH TIME ZONE)
    8787    RETURNS VOID AS $$
    8888    DECLARE
     
    107107-- Adds a new user.
    108108--
    109 CREATE OR REPLACE FUNCTION UserAccountLogic_addEntry(a_uidAuthor INTEGER, a_sUsername TEXT, a_sEmail TEXT, a_sFullName TEXT, 
     109CREATE OR REPLACE FUNCTION UserAccountLogic_addEntry(a_uidAuthor INTEGER, a_sUsername TEXT, a_sEmail TEXT, a_sFullName TEXT,
    110110                                                     a_sLoginName TEXT, a_fReadOnly BOOLEAN)
    111111    RETURNS VOID AS $$
     
    119119$$ LANGUAGE plpgsql;
    120120
    121 CREATE OR REPLACE FUNCTION UserAccountLogic_editEntry(a_uidAuthor INTEGER, a_uid INTEGER, a_sUsername TEXT, a_sEmail TEXT, 
     121CREATE OR REPLACE FUNCTION UserAccountLogic_editEntry(a_uidAuthor INTEGER, a_uid INTEGER, a_sUsername TEXT, a_sEmail TEXT,
    122122                                                      a_sFullName TEXT, a_sLoginName TEXT, a_fReadOnly BOOLEAN)
    123123    RETURNS VOID AS $$
     
    140140        --
    141141        -- To preserve the information about who deleted the record, we try to
    142         -- add a dummy record which expires immediately.  I say try because of 
     142        -- add a dummy record which expires immediately.  I say try because of
    143143        -- the primary key, we must let the new record be valid for 1 us. :-(
    144144        --
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