Index: /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql	(revision 69448)
@@ -1,2 +1,29 @@
+-- $Id$
+--- @file
+-- Autogenerated from TestManagerDatabaseInit.pgsql.  Do not edit!
+--
+
+--
+-- Copyright (C) 2012-2017 Oracle Corporation
+--
+-- This file is part of VirtualBox Open Source Edition (OSE), as
+-- available from http://www.virtualbox.org. This file is free software;
+-- you can redistribute it and/or modify it under the terms of the GNU
+-- General Public License (GPL) as published by the Free Software
+-- Foundation, in version 2 as it comes in the "COPYING" file of the
+-- VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+-- hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+--
+-- The contents of this file may alternatively be used under the terms
+-- of the Common Development and Distribution License Version 1.0
+-- (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+-- VirtualBox OSE distribution, in which case the provisions of the
+-- CDDL are applicable instead of those of the GPL.
+--
+-- You may elect to license modified versions of this file under the
+-- terms and conditions of either the GPL or the CDDL or both.
+--
+
+
 COMMENT ON COLUMN SystemLog.tsCreated IS
   'When this was logged.';
@@ -1363,3 +1390,2 @@
 to figure out whether to remain in ''gather-gang''::TestBoxState_T.';
 
-
Index: /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql	(revision 69448)
@@ -693,9 +693,9 @@
 --
 -- This is a string cache for all string members in TestBoxes except the name.
--- The rational is to avoid duplicating large strings like sReport when the 
--- testbox reports a new cMbScratch value or the box when the test sheriff 
--- sends a reboot command or similar.  
--- 
--- At the time this table was introduced, we had 400558 TestBoxes rows,  where 
+-- The rational is to avoid duplicating large strings like sReport when the
+-- testbox reports a new cMbScratch value or the box when the test sheriff
+-- sends a reboot command or similar.
+--
+-- At the time this table was introduced, we had 400558 TestBoxes rows,  where
 -- the SUM(LENGTH(sReport)) was 993MB.  There were really just 1066 distinct
 -- sReport values, with a total length of 0x3 MB.
@@ -1171,5 +1171,5 @@
     PRIMARY KEY (idBlacklisting, tsExpire)
 );
-CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch, 
+CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch,
                                                   tsExpire DESC, tsEffective ASC);
 
@@ -1445,5 +1445,5 @@
 CREATE INDEX TestResultsNameIdx2 ON TestResults (idTestResult, idStrName);
 
-ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey 
+ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey
     FOREIGN KEY (idTestResult, idTestSet) REFERENCES TestResults(idTestResult, idTestSet) MATCH FULL;
 
Index: /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerVBoxPilot-1.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerVBoxPilot-1.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerVBoxPilot-1.pgsql	(revision 69448)
@@ -50,5 +50,5 @@
 INSERT INTO SchedGroups (sName, sDescription, fEnabled, idBuildSrc, idBuildSrcTestSuite)
     VALUES ('VirtualBox Trunk', NULL, TRUE,
-            (SELECT idBuildSrc FROM BuildSources WHERE sName = 'VBox trunk builds'), 
+            (SELECT idBuildSrc FROM BuildSources WHERE sName = 'VBox trunk builds'),
             (SELECT idBuildSrc FROM BuildSources WHERE sName = 'VBox TestSuite trunk builds') );
 \set idSchedGroupQuery '(SELECT idSchedGroup FROM SchedGroups WHERE sName = \'VirtualBox Trunk\')'
@@ -80,6 +80,6 @@
 --
 INSERT INTO TestCases (uidAuthor, sName, fEnabled, cSecTimeout, sBaseCmd, sTestSuiteZips)
-    VALUES (:idUserQuery, 'VBox install', TRUE, 600,  
-            'validationkit/testdriver/vboxinstaller.py --vbox-build @BUILD_BINARIES@ @ACTION@ -- testdriver/base.py @ACTION@', 
+    VALUES (:idUserQuery, 'VBox install', TRUE, 600,
+            'validationkit/testdriver/vboxinstaller.py --vbox-build @BUILD_BINARIES@ @ACTION@ -- testdriver/base.py @ACTION@',
             '@VALIDATIONKIT_ZIP@');
 INSERT INTO TestCaseArgs (idTestCase, uidAuthor, sArgs)
@@ -90,3 +90,2 @@
 COMMIT WORK;
 
-
Index: /trunk/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py	(revision 69448)
@@ -3,4 +3,9 @@
 # $Id$
 
+"""
+Converts doxygen style comments in SQL script to COMMENT ON statements.
+"""
+
+__copyright__ = \
 """
 Copyright (C) 2012-2017 Oracle Corporation
@@ -22,7 +27,4 @@
 You may elect to license modified versions of this file under the
 terms and conditions of either the GPL or the CDDL or both.
-"""
-"""
-Converts doxygen style comments in SQL script to COMMENT ON statements.
 """
 
@@ -204,4 +206,15 @@
     except:
         return errorMsg("failed to open '%s' for reading" % (sInput,));
+
+    # header.
+    print("-- $" "Id" "$");
+    print("--- @file");
+    print("-- Autogenerated from %s.  Do not edit!" % (sInput,));
+    print("--");
+    print("");
+    for sLine in __copyright__.split('\n'):
+        print("-- %s" % (sLine,));
+    print("");
+    print("");
     me = SqlDox(oFile, sInput);
     return me.process();
Index: /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r07-testresults-1.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r07-testresults-1.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r07-testresults-1.pgsql	(revision 69448)
@@ -36,3 +36,2 @@
 \d+ TestResults
 
-
Index: /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r11-testsets-2.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r11-testsets-2.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r11-testsets-2.pgsql	(revision 69448)
@@ -31,5 +31,5 @@
 DROP INDEX TestSetsBoxIdx;
 DROP INDEX TestSetsBuildIdx;
-DROP INDEX TestSetsTestCaseIdx;    
+DROP INDEX TestSetsTestCaseIdx;
 DROP INDEX TestSetsTestVarIdx;
 DROP INDEX TestSetsCreated;
@@ -78,5 +78,5 @@
     idBuild             INTEGER     NOT NULL,
     --- The build category of idBuild when the test started.
-    -- This is for speeding up graph data collection, i.e. avoid idBuild 
+    -- This is for speeding up graph data collection, i.e. avoid idBuild
     -- the WHERE part of the selection.
     idBuildCategory     INTEGER     , -- NOT NULL REFERENCES BuildCategories(idBuildCategory)
@@ -148,9 +148,9 @@
 SELECT COUNT(*) FROM TestSets;
 
-INSERT INTO NewTestSets (idTestSet, tsConfig, tsCreated, tsDone, enmStatus, idBuild, idBuildCategory, idBuildTestSuite, 
-                         idGenTestBox, idTestBox, idTestGroup, idGenTestCase, idTestCase, idGenTestCaseArgs, idTestCaseArgs, 
+INSERT INTO NewTestSets (idTestSet, tsConfig, tsCreated, tsDone, enmStatus, idBuild, idBuildCategory, idBuildTestSuite,
+                         idGenTestBox, idTestBox, idTestGroup, idGenTestCase, idTestCase, idGenTestCaseArgs, idTestCaseArgs,
                          idTestResult, sBaseFilename, iGangMemberNo, idTestSetGangLeader )
-    SELECT a.idTestSet, a.tsConfig, a.tsCreated, tsDone, a.enmStatus, a.idBuild, b.idBuildCategory, a.idBuildTestSuite, 
-           a.idGenTestBox, a.idTestBox, a.idTestGroup, a.idGenTestCase, a.idTestCase, a.idGenTestCaseArgs, a.idTestCaseArgs, 
+    SELECT a.idTestSet, a.tsConfig, a.tsCreated, tsDone, a.enmStatus, a.idBuild, b.idBuildCategory, a.idBuildTestSuite,
+           a.idGenTestBox, a.idTestBox, a.idTestGroup, a.idGenTestCase, a.idTestCase, a.idGenTestCaseArgs, a.idTestCaseArgs,
            a.idTestResult, a.sBaseFilename, a.iGangMemberNo, a.idTestSetGangLeader
     FROM   TestSets a LEFT OUTER JOIN Builds b ON (a.idBuild = b.idBuild AND b.tsExpire = 'infinity'::TIMESTAMP);
Index: /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r15-index-sorting.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r15-index-sorting.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r15-index-sorting.pgsql	(revision 69448)
@@ -61,5 +61,5 @@
 
 DROP INDEX IF EXISTS BuildBlacklistIdx;
-CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch, 
+CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch,
                                                   tsExpire DESC, tsEffective ASC);
 \d BuildBlacklist;
Index: /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql	(revision 69448)
@@ -91,10 +91,10 @@
            TestResults tr
     WHERE  o.idTestResult = tr.idTestResult;
-   
+
 -- Add unique constraint to TestResult for our new foreign key.
 ALTER TABLE TestResults ADD CONSTRAINT TestResults_idTestResult_idTestSet_key UNIQUE (idTestResult, idTestSet);
 
 -- Restore foreign key.
-ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey 
+ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey
     FOREIGN KEY (idTestResult, idTestSet) REFERENCES TestResults(idTestResult, idTestSet) MATCH FULL;
 
Index: /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r17-testresultvalues-4.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r17-testresultvalues-4.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r17-testresultvalues-4.pgsql	(revision 69448)
@@ -37,3 +37,2 @@
 \d+ TestResultValues
 
-
Index: /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql	(revision 69448)
@@ -37,9 +37,9 @@
 \set AUTOCOMMIT 0
 
-                                                                                  
---                                                                                
--- Rename the original table, drop constrains and foreign key references so we    
--- get the right name automatic when creating the new one.                        
---                                                                                
+
+--
+-- Rename the original table, drop constrains and foreign key references so we
+-- get the right name automatic when creating the new one.
+--
 \d+ TestResultFiles;
 ALTER TABLE TestResultFiles RENAME TO OldTestResultFiles;
@@ -82,12 +82,12 @@
 );
 
-INSERT INTO TestResultFiles ( idTestResultFile, idTestResult, idTestSet, tsCreated, idStrFile, idStrDescription, 
+INSERT INTO TestResultFiles ( idTestResultFile, idTestResult, idTestSet, tsCreated, idStrFile, idStrDescription,
                               idStrKind, idStrMime)
-    SELECT o.idTestResultFile, o.idTestResult, tr.idTestSet, o.tsCreated, o.idStrFile, o.idStrDescription, 
+    SELECT o.idTestResultFile, o.idTestResult, tr.idTestSet, o.tsCreated, o.idStrFile, o.idStrDescription,
            o.idStrKind, o.idStrMime
     FROM   OldTestResultFiles o,
            TestResults tr
     WHERE  o.idTestResult = tr.idTestResult;
-   
+
 -- Add new indexes.
 CREATE INDEX TestResultFilesIdx  ON TestResultFiles(idTestResult);
@@ -105,8 +105,8 @@
 
 
---                                                                                
--- Rename the original table, drop constrains and foreign key references so we    
--- get the right name automatic when creating the new one.                        
---                                                                                
+--
+-- Rename the original table, drop constrains and foreign key references so we
+-- get the right name automatic when creating the new one.
+--
 \d+ TestResultMsgs;
 ALTER TABLE TestResultMsgs RENAME TO OldTestResultMsgs;
@@ -134,9 +134,9 @@
 
 INSERT INTO TestResultMsgs ( idTestResultMsg, idTestResult, idTestSet, tsCreated, idStrMsg, enmLevel)
-    SELECT o.idTestResultMsg, o.idTestResult, tr.idTestSet, o.tsCreated, o.idStrMsg, o.enmLevel 
+    SELECT o.idTestResultMsg, o.idTestResult, tr.idTestSet, o.tsCreated, o.idStrMsg, o.enmLevel
     FROM   OldTestResultMsgs o,
            TestResults tr
     WHERE  o.idTestResult = tr.idTestResult;
-   
+
 -- Add new indexes.
 CREATE INDEX TestResultMsgsIdx  ON TestResultMsgs(idTestResult);
@@ -160,4 +160,2 @@
 COMMIT;
 
-
-
Index: /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r19-testboxes-3.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r19-testboxes-3.pgsql	(revision 69447)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r19-testboxes-3.pgsql	(revision 69448)
@@ -43,12 +43,12 @@
 LOCK TABLE TestBoxes            IN ACCESS EXCLUSIVE MODE;
 LOCK TABLE SchedGroupMembers    IN ACCESS EXCLUSIVE MODE;
-      
+
 \d+ TestBoxes;
 
 --
--- Rename the table, drop foreign keys refering to it, and drop constrains 
+-- Rename the table, drop foreign keys refering to it, and drop constrains
 -- within the table itself.  The latter is mostly for naming and we do it
 -- up front in case the database we're running against has different names
--- due to previous conversions. 
+-- due to previous conversions.
 --
 ALTER TABLE TestBoxes RENAME TO OldTestBoxes;
@@ -65,15 +65,15 @@
 ALTER TABLE OldTestBoxes    DROP CONSTRAINT testboxes_pkey;
 ALTER TABLE OldTestBoxes    DROP CONSTRAINT testboxes_idgentestbox_key;
-                   
+
 DROP INDEX IF EXISTS TestBoxesUuidIdx;
 DROP INDEX IF EXISTS TestBoxesExpireEffectiveIdx;
-             
+
 -- This output should be free of index, constraints and references from other tables.
 \d+ OldTestBoxes;
-      
---
--- Create the two new tables before starting data migration (don't want to spend time 
+
+--
+-- Create the two new tables before starting data migration (don't want to spend time
 -- on converting strings just to find a typo in the TestBoxes create table syntax).
---                   
+--
 CREATE SEQUENCE TestBoxStrTabIdSeq
     START 1
@@ -251,5 +251,5 @@
 --
 
-INSERT INTO TestBoxes ( 
+INSERT INTO TestBoxes (
             idTestBox,          --  0
             tsEffective,        --  1
@@ -278,44 +278,44 @@
             fCpu64BitGuest,     -- 24
             fChipsetIoMmu,      -- 25
-            fRawMode,           -- 26 
-            cMbMemory,          -- 27 
-            cMbScratch,         -- 28 
-            idStrReport,        -- 29 
-            iTestBoxScriptRev,  -- 30 
+            fRawMode,           -- 26
+            cMbMemory,          -- 27
+            cMbScratch,         -- 28
+            idStrReport,        -- 29
+            iTestBoxScriptRev,  -- 30
             iPythonHexVersion,  -- 31
             enmPendingCmd       -- 32
             )
-SELECT      idTestBox, 
-            tsEffective, 
-            tsExpire, 
-            uidAuthor, 
-            idGenTestBox, 
-            ip,  
-            uuidSystem,  
-            sName,  
-            st1.idStr, 
-            idSchedGroup,  
-            fEnabled,  
-            enmLomKind,  
-            ipLom,  
-            pctScaleTimeout,  
+SELECT      idTestBox,
+            tsEffective,
+            tsExpire,
+            uidAuthor,
+            idGenTestBox,
+            ip,
+            uuidSystem,
+            sName,
+            st1.idStr,
+            idSchedGroup,
+            fEnabled,
+            enmLomKind,
+            ipLom,
+            pctScaleTimeout,
             NULL,
-            st2.idStr,  
-            st3.idStr,  
-            st4.idStr,  
-            st5.idStr,  
+            st2.idStr,
+            st3.idStr,
+            st4.idStr,
+            st5.idStr,
             st6.idStr,
-            lCpuRevision,         
-            cCpus,  
-            fCpuHwVirt,  
-            fCpuNestedPaging,  
-            fCpu64BitGuest,  
-            fChipsetIoMmu,  
+            lCpuRevision,
+            cCpus,
+            fCpuHwVirt,
+            fCpuNestedPaging,
+            fCpu64BitGuest,
+            fChipsetIoMmu,
             NULL,
-            cMbMemory,  
-            cMbScratch,  
+            cMbMemory,
+            cMbScratch,
             st7.idStr,
-            iTestBoxScriptRev,  
-            iPythonHexVersion,  
+            iTestBoxScriptRev,
+            iPythonHexVersion,
             enmPendingCmd
 FROM        OldTestBoxes
@@ -333,7 +333,7 @@
 
 -- Restore foreign key references to the table.
-ALTER TABLE TestBoxStatuses ADD  CONSTRAINT TestBoxStatuses_idGenTestBox_fkey  
+ALTER TABLE TestBoxStatuses ADD  CONSTRAINT TestBoxStatuses_idGenTestBox_fkey
     FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox);
-ALTER TABLE TestSets        ADD  CONSTRAINT TestSets_idGenTestBox_fkey         
+ALTER TABLE TestSets        ADD  CONSTRAINT TestSets_idGenTestBox_fkey
     FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox);
 
@@ -345,3 +345,2 @@
 \d TestBoxes;
 
-
