From 16f504a9dca3fe3b70568f67b7d41241ae485288 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:49:04 +0200 Subject: Adding upstream version 7.0.6-dfsg. Signed-off-by: Daniel Baumann --- src/VBox/ValidationKit/testmanager/db/Makefile.kmk | 98 + .../testmanager/db/TestManagerDatabase.dmd | 8 + .../db/TestManagerDatabase/datatypes/DataTypes.xml | 15 + .../seg_0/47E390DE-0671-C4B1-8428-0F45CBEE18F8.xml | 37 + .../seg_0/F72C39E0-D1CA-8821-2AD7-A1E95A37D3D1.xml | 37 + .../E9476B45-3C62-EE27-4705-6F1EFAD11B74.xml | 21 + .../db/TestManagerDatabase/defaultRDBMSSites.xml | 12 + .../db/TestManagerDatabase/defaultdomains.xml | 13 + .../db/TestManagerDatabase/dl_settings.xml | 288 +++ .../db/TestManagerDatabase/dr_custom_scripts.xml | 360 ++++ .../db/TestManagerDatabase/logical/Logical.xml | 7 + .../seg_0/16464F5A-64BE-D2ED-91E0-BCBD0AA34680.xml | 52 + .../seg_0/1BEAB532-23CA-8628-0C97-7CAD39119A4E.xml | 52 + .../seg_0/24150FB1-B00F-4F69-6F77-49ECB58F0F66.xml | 52 + .../seg_0/28DD93CF-D058-7343-CD47-E9B435E1AC16.xml | 52 + .../seg_0/2F6ACC6D-3D17-537D-8ADF-F8424395B345.xml | 52 + .../seg_0/44FFF5E9-0C2F-7BAC-B5B7-73CA3A230B39.xml | 52 + .../seg_0/4579B792-2F35-D72A-1A3B-C7E53C41A766.xml | 52 + .../seg_0/4D937E7C-3A28-E52D-89C0-EC8804C62367.xml | 52 + .../seg_0/504221DA-1B57-4EAD-39DB-40FD553E9FA2.xml | 52 + .../seg_0/6A886CEE-579B-48FF-63F6-0FB03393FBF6.xml | 52 + .../seg_0/7AE36CC1-A030-63E5-6EF3-72FCD04815EE.xml | 52 + .../seg_0/90367AFB-BA2D-A918-46B9-1E5DE53ACC48.xml | 52 + .../seg_0/90F477EE-35D6-21A7-B693-E5724FB07476.xml | 52 + .../seg_0/9F78B73C-056D-DDEF-8C50-A9DA76B9E724.xml | 52 + .../seg_0/A352A20F-310D-E285-FBC9-90DD0DA7BB9B.xml | 52 + .../seg_0/A6A5F317-479C-A0DD-CAAE-9DCB56B29D40.xml | 52 + .../seg_0/B36A186B-CDB3-7851-8C38-12EA8D50EAEB.xml | 52 + .../seg_0/B82DAF9A-6F99-5CF6-4D99-A391BAD66192.xml | 52 + .../seg_0/C332E3D7-638B-6CA8-24BF-383CA8659A3A.xml | 52 + .../seg_0/C79482B8-771B-FAD8-0337-163E3A45003A.xml | 52 + .../seg_0/D09E0DE5-99D6-2991-032A-A8A124F6ACBA.xml | 52 + .../seg_0/DCC79294-5434-1DED-298C-6473DEE59FBA.xml | 52 + .../seg_0/DE366053-6F7A-7F42-ABA3-00E583098C37.xml | 52 + .../seg_0/E93BBF08-067B-A665-39F3-CF488A6547B2.xml | 52 + .../seg_0/876CB767-80BA-6C8E-AACA-F1CCC95C445E.xml | 16 + .../seg_0/D487AFDC-4027-F824-EA29-5C6D0ABB9E1E.xml | 16 + .../seg_0/01537211-CCFB-0A1E-B43B-E8C641B69471.xml | 17 + .../seg_0/02096BBB-0795-1759-1E26-2877BE36BB59.xml | 17 + .../seg_0/0CCF1DE3-7916-9054-BEA6-C601FF564DB2.xml | 17 + .../seg_0/10867E70-94CE-FDAF-6B6E-2742D3A49E57.xml | 17 + .../seg_0/11710A55-6423-1904-841A-C7D2AB8CEEBF.xml | 17 + .../seg_0/1C189437-742B-B999-C955-7754C8ADB089.xml | 17 + .../seg_0/34733942-1305-4CA1-47EB-ACE724B04E69.xml | 17 + .../seg_0/3563C940-E524-7F96-7AE0-DAC3C1C17AFC.xml | 17 + .../seg_0/3983F50A-EBB9-E4DE-1958-60EA4EDD6D6C.xml | 17 + .../seg_0/3B7C8913-EB6A-47B1-27D0-E2C85EE9048B.xml | 17 + .../seg_0/518CE489-97B4-C05C-07A2-E3DBF14EE267.xml | 17 + .../seg_0/68A0C3E1-0FA1-8414-A361-33B08A8EDB39.xml | 17 + .../seg_0/7497D76B-781B-3BDD-D797-FFBDB974F772.xml | 17 + .../seg_0/7DA9DD83-A52E-CA1E-FCBF-FC9CE71AF635.xml | 17 + .../seg_0/89A83E25-364B-6B73-0613-FEAD875EF9FB.xml | 17 + .../seg_0/8E5018CC-34E3-9AFC-D6D1-31E2BC4E9FE2.xml | 17 + .../seg_0/9B1FE0CF-B2AD-EED0-22FC-461A7D46DE51.xml | 17 + .../seg_0/A182A65A-47AE-5D00-9A30-BC20AB050BF2.xml | 17 + .../seg_0/B346381F-48FE-E495-01A7-E22EC26AEE8A.xml | 17 + .../seg_0/B3596116-540F-6397-ECE4-58A386644E15.xml | 17 + .../seg_0/BAD8EC05-6F14-4E38-366C-B4B660C6F38A.xml | 17 + .../seg_0/C5B67DD4-FA4F-EF9F-1FF5-0445D51B32EE.xml | 17 + .../seg_0/CCD38E11-8557-EB34-2651-07EB29E83FA6.xml | 17 + .../seg_0/E2A47942-ED55-E81D-4C71-9A134C49C147.xml | 17 + .../seg_0/E4FE88E9-EE21-B43B-B0FE-A153E38246F9.xml | 17 + .../seg_0/E62AE7DF-49EE-9280-B328-A867CBD273AE.xml | 17 + .../seg_0/E74406B5-20F1-4323-DC99-6E45982CB606.xml | 17 + .../seg_0/EC4EB506-3DBE-7F36-6451-F31920EDAB52.xml | 17 + .../seg_0/EE1D98EF-6AEA-2790-D9B9-DBC2ED21D880.xml | 17 + .../016BA1CF-6EA4-9CA4-CDF7-3AAA507EF6EF.xml | 40 + .../32D718B4-250F-95DC-37F0-C0A817F69020.xml | 70 + .../571DBBAF-CDDA-1C46-4220-D1319C0EEC00.xml | 24 + .../65FA5BA0-CC9C-C108-BB1B-AC9E13F5BC83.xml | 127 ++ .../AFCEF013-4CF2-4A5A-79A3-31521C1CA20A.xml | 306 +++ .../F936BE6D-7A74-1B57-7564-41C1E13B973B.xml | 33 + .../db/TestManagerDatabase/mapping/ExtendedMap.xml | 3 + ...dMap_RMB082B14A-BEA8-D8A7-D661-197F34766ED3.xml | 3 + .../rdbms/TestManagerDatabase_RDBMSSites.xml | 2 + .../rel/B082B14A-197F34766ED3.xml | 8 + .../6CEC5843-B4DD-D9B0-54D4-2845569D5E9F.xml | 13 + .../testmanager/db/TestManagerDatabase/types.xml | 933 ++++++++++ .../db/TestManagerDatabaseComments.pgsql | 1193 ++++++++++++ .../TestManagerDatabaseDefaultUserAccounts.pgsql | 43 + .../db/TestManagerDatabaseForeignKeyErHacks.pgsql | 90 + .../db/TestManagerDatabaseForeignKeyErHacks2.pgsql | 77 + .../testmanager/db/TestManagerDatabaseInit.pgsql | 1950 ++++++++++++++++++++ .../testmanager/db/TestManagerDatabaseMap.png | Bin 0 -> 44750 bytes .../testmanager/db/TestManagerVBoxPilot-1.pgsql | 101 + .../testmanager/db/gen-sql-comments.py | 236 +++ .../testmanager/db/partial-db-dump.py | 392 ++++ .../testmanager/db/tmdb-r01-builds-1.pgsql | 91 + .../testmanager/db/tmdb-r02-testboxes-1.pgsql | 194 ++ .../testmanager/db/tmdb-r03-teststatus-1.pgsql | 48 + .../testmanager/db/tmdb-r04-teststatus-2.pgsql | 46 + .../testmanager/db/tmdb-r05-teststatus-3.pgsql | 54 + .../testmanager/db/tmdb-r06-buildsources-1.pgsql | 46 + .../testmanager/db/tmdb-r07-testresults-1.pgsql | 47 + .../db/tmdb-r08-testresultvalues-1.pgsql | 47 + .../testmanager/db/tmdb-r09-testsets-1.pgsql | 48 + .../db/tmdb-r10-testresultvalues-2.pgsql | 111 ++ .../testmanager/db/tmdb-r11-testsets-2.pgsql | 214 +++ .../tmdb-r12-testresultvalues-3-testsets-3.pgsql | 58 + ...tmdb-r13-buildcategories-1-vcsrevisions-1.pgsql | 134 ++ .../testmanager/db/tmdb-r14-testboxes-2.pgsql | 201 ++ .../testmanager/db/tmdb-r15-index-sorting.pgsql | 108 ++ ...b-r16-testcaseargs-1-testresultfailures-1.pgsql | 122 ++ .../db/tmdb-r17-testresultvalues-4.pgsql | 48 + ...db-r18-testresultfiles-1-testresultmsgs-1.pgsql | 171 ++ .../testmanager/db/tmdb-r19-testboxes-3.pgsql | 356 ++++ ...20-testcases-1-testgroups-1-schedgroups-1.pgsql | 67 + .../testmanager/db/tmdb-r21-testsets-4.pgsql | 290 +++ ...xes-3-teststatus-4-testboxinschedgroups-1.pgsql | 181 ++ .../testmanager/db/tmdb-r23-users-2.pgsql | 60 + .../db/tmdb-r24-vcsbugreferences-1.pgsql | 59 + .../testmanager/db/tmdb-r25-vcsrevisions-2.pgsql | 45 + 112 files changed, 11159 insertions(+) create mode 100644 src/VBox/ValidationKit/testmanager/db/Makefile.kmk create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase.dmd create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/DataTypes.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/structuredtype/seg_0/47E390DE-0671-C4B1-8428-0F45CBEE18F8.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/structuredtype/seg_0/F72C39E0-D1CA-8821-2AD7-A1E95A37D3D1.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/subviews/E9476B45-3C62-EE27-4705-6F1EFAD11B74.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/defaultRDBMSSites.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/defaultdomains.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/dl_settings.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/dr_custom_scripts.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/Logical.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/16464F5A-64BE-D2ED-91E0-BCBD0AA34680.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/1BEAB532-23CA-8628-0C97-7CAD39119A4E.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/24150FB1-B00F-4F69-6F77-49ECB58F0F66.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/28DD93CF-D058-7343-CD47-E9B435E1AC16.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/2F6ACC6D-3D17-537D-8ADF-F8424395B345.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/44FFF5E9-0C2F-7BAC-B5B7-73CA3A230B39.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/4579B792-2F35-D72A-1A3B-C7E53C41A766.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/4D937E7C-3A28-E52D-89C0-EC8804C62367.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/504221DA-1B57-4EAD-39DB-40FD553E9FA2.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/6A886CEE-579B-48FF-63F6-0FB03393FBF6.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/7AE36CC1-A030-63E5-6EF3-72FCD04815EE.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/90367AFB-BA2D-A918-46B9-1E5DE53ACC48.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/90F477EE-35D6-21A7-B693-E5724FB07476.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/9F78B73C-056D-DDEF-8C50-A9DA76B9E724.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/A352A20F-310D-E285-FBC9-90DD0DA7BB9B.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/A6A5F317-479C-A0DD-CAAE-9DCB56B29D40.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/B36A186B-CDB3-7851-8C38-12EA8D50EAEB.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/B82DAF9A-6F99-5CF6-4D99-A391BAD66192.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/C332E3D7-638B-6CA8-24BF-383CA8659A3A.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/C79482B8-771B-FAD8-0337-163E3A45003A.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/D09E0DE5-99D6-2991-032A-A8A124F6ACBA.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/DCC79294-5434-1DED-298C-6473DEE59FBA.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/DE366053-6F7A-7F42-ABA3-00E583098C37.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/E93BBF08-067B-A665-39F3-CF488A6547B2.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/note/seg_0/876CB767-80BA-6C8E-AACA-F1CCC95C445E.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/note/seg_0/D487AFDC-4027-F824-EA29-5C6D0ABB9E1E.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/01537211-CCFB-0A1E-B43B-E8C641B69471.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/02096BBB-0795-1759-1E26-2877BE36BB59.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/0CCF1DE3-7916-9054-BEA6-C601FF564DB2.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/10867E70-94CE-FDAF-6B6E-2742D3A49E57.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/11710A55-6423-1904-841A-C7D2AB8CEEBF.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/1C189437-742B-B999-C955-7754C8ADB089.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/34733942-1305-4CA1-47EB-ACE724B04E69.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3563C940-E524-7F96-7AE0-DAC3C1C17AFC.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3983F50A-EBB9-E4DE-1958-60EA4EDD6D6C.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3B7C8913-EB6A-47B1-27D0-E2C85EE9048B.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/518CE489-97B4-C05C-07A2-E3DBF14EE267.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/68A0C3E1-0FA1-8414-A361-33B08A8EDB39.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/7497D76B-781B-3BDD-D797-FFBDB974F772.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/7DA9DD83-A52E-CA1E-FCBF-FC9CE71AF635.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/89A83E25-364B-6B73-0613-FEAD875EF9FB.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/8E5018CC-34E3-9AFC-D6D1-31E2BC4E9FE2.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/9B1FE0CF-B2AD-EED0-22FC-461A7D46DE51.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/A182A65A-47AE-5D00-9A30-BC20AB050BF2.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/B346381F-48FE-E495-01A7-E22EC26AEE8A.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/B3596116-540F-6397-ECE4-58A386644E15.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/BAD8EC05-6F14-4E38-366C-B4B660C6F38A.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/C5B67DD4-FA4F-EF9F-1FF5-0445D51B32EE.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/CCD38E11-8557-EB34-2651-07EB29E83FA6.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E2A47942-ED55-E81D-4C71-9A134C49C147.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E4FE88E9-EE21-B43B-B0FE-A153E38246F9.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E62AE7DF-49EE-9280-B328-A867CBD273AE.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E74406B5-20F1-4323-DC99-6E45982CB606.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/EC4EB506-3DBE-7F36-6451-F31920EDAB52.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/EE1D98EF-6AEA-2790-D9B9-DBC2ED21D880.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/016BA1CF-6EA4-9CA4-CDF7-3AAA507EF6EF.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/32D718B4-250F-95DC-37F0-C0A817F69020.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/571DBBAF-CDDA-1C46-4220-D1319C0EEC00.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/65FA5BA0-CC9C-C108-BB1B-AC9E13F5BC83.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/AFCEF013-4CF2-4A5A-79A3-31521C1CA20A.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/F936BE6D-7A74-1B57-7564-41C1E13B973B.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/mapping/ExtendedMap.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/mapping/ExtendedMap_RMB082B14A-BEA8-D8A7-D661-197F34766ED3.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rdbms/TestManagerDatabase_RDBMSSites.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rel/B082B14A-197F34766ED3.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rel/B082B14A-197F34766ED3/subviews/6CEC5843-B4DD-D9B0-54D4-2845569D5E9F.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/types.xml create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseDefaultUserAccounts.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseForeignKeyErHacks.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseForeignKeyErHacks2.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseMap.png create mode 100644 src/VBox/ValidationKit/testmanager/db/TestManagerVBoxPilot-1.pgsql create mode 100755 src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py create mode 100755 src/VBox/ValidationKit/testmanager/db/partial-db-dump.py create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r01-builds-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r02-testboxes-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r03-teststatus-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r04-teststatus-2.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r05-teststatus-3.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r06-buildsources-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r07-testresults-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r08-testresultvalues-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r09-testsets-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r10-testresultvalues-2.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r11-testsets-2.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r12-testresultvalues-3-testsets-3.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r13-buildcategories-1-vcsrevisions-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r14-testboxes-2.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r15-index-sorting.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r17-testresultvalues-4.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r19-testboxes-3.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r20-testcases-1-testgroups-1-schedgroups-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r21-testsets-4.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r22-testboxes-3-teststatus-4-testboxinschedgroups-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r23-users-2.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r24-vcsbugreferences-1.pgsql create mode 100644 src/VBox/ValidationKit/testmanager/db/tmdb-r25-vcsrevisions-2.pgsql (limited to 'src/VBox/ValidationKit/testmanager/db') diff --git a/src/VBox/ValidationKit/testmanager/db/Makefile.kmk b/src/VBox/ValidationKit/testmanager/db/Makefile.kmk new file mode 100644 index 00000000..c73cbfca --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/Makefile.kmk @@ -0,0 +1,98 @@ +# $Id: Makefile.kmk $ +## @file +# VirtualBox Validation Kit - Makefile for generating .html from .txt. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# The contents of this file may alternatively be used under the terms +# of the Common Development and Distribution License Version 1.0 +# (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +# in the VirtualBox 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. +# +# SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +# + + +# Need proper shell on windows. +DEPTH = ../../../../.. +ifneq ($(wildcard $(DEPTH)/Config.kmk),) + include $(KBUILD_PATH)/header.kmk +else + VBOX_BLD_PYTHON ?= python +endif + + +GENERATED_FILES = TestManagerDatabaseComments.pgsql +PSQL := $(firstword $(which $(foreach pgver, 16 15 14 13 12 10 11 95 94 93 92,psql$(pgver)) ) psql) +ifeq ($(PSQL_DB_HOST),) + PSQL_DB_HOST := localhost # Use localhost if nothing else is set. +endif +ifeq ($(PSQL_DB_PORT),) + PSQL_DB_PORT := 5432 # Same for the port; use the default. +endif +ifeq ($(PSQL_DB_USER),) + PSQL_DB_USER := postgres +endif +PSQL_OPTS = --user=$(PSQL_DB_USER) --set=ON_ERROR_STOP=1 --host=$(PSQL_DB_HOST) --port=$(PSQL_DB_PORT) + +all: $(GENERATED_FILES) + +clean: + kmk_builtin_rm -f -- $(GENERATED_FILES) + + +TestManagerDatabaseComments.pgsql: TestManagerDatabaseInit.pgsql gen-sql-comments.py + LC_ALL=C $(VBOX_BLD_PYTHON) gen-sql-comments.py $< > $@ + + +load-testmanager-db: \ + TestManagerDatabaseInit.pgsql \ + TestManagerDatabaseComments.pgsql \ + ../core/useraccount.pgsql \ + ../core/testcase.pgsql \ + ../core/testbox.pgsql \ + ../core/globalresource.pgsql + @kmk_builtin_echo "Creating testmanager database: For script verification only!" + $(PSQL) $(PSQL_OPTS) -f TestManagerDatabaseInit.pgsql + $(PSQL) $(PSQL_OPTS) -d testmanager -f TestManagerDatabaseComments.pgsql + $(PSQL) $(PSQL_OPTS) -d testmanager -f ../core/useraccount.pgsql + $(PSQL) $(PSQL_OPTS) -d testmanager -f ../core/testcase.pgsql + $(PSQL) $(PSQL_OPTS) -d testmanager -f ../core/testbox.pgsql + $(PSQL) $(PSQL_OPTS) -d testmanager -f ../core/globalresource.pgsql + $(PSQL) $(PSQL_OPTS) -d testmanager -f TestManagerDatabaseDefaultUserAccounts.pgsql + +reload-testmanager-db-functions: \ + ../core/useraccount.pgsql \ + ../core/testcase.pgsql \ + ../core/testbox.pgsql \ + ../core/globalresource.pgsql + @kmk_builtin_echo "Reloading testmanager database functions" + $(PSQL) $(PSQL_OPTS) -d testmanager -f ../core/useraccount.pgsql + $(PSQL) $(PSQL_OPTS) -d testmanager -f ../core/testcase.pgsql + $(PSQL) $(PSQL_OPTS) -d testmanager -f ../core/testbox.pgsql + $(PSQL) $(PSQL_OPTS) -d testmanager -f ../core/globalresource.pgsql + +# Only for prettier graphs: +# $(PSQL) $(PSQL_OPTS) -d testmanager -f TestManagerDatabaseForeignKeyErHacks.pgsql diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase.dmd b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase.dmd new file mode 100644 index 00000000..cf35f3fb --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase.dmd @@ -0,0 +1,8 @@ + + +bird +2012-08-20 21:58:45 UTC +TestManagerDatabase +false +99299876-6D97-026B-55F9-DF582D334681 + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/DataTypes.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/DataTypes.xml new file mode 100644 index 00000000..9b86b6dd --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/DataTypes.xml @@ -0,0 +1,15 @@ + + +bird +2012-08-20 21:58:45 UTC +TestManagerDatabase +false +array_ref_ +array_ +10 +ARRAY +_Array +inst_ +ref_ +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/structuredtype/seg_0/47E390DE-0671-C4B1-8428-0F45CBEE18F8.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/structuredtype/seg_0/47E390DE-0671-C4B1-8428-0F45CBEE18F8.xml new file mode 100644 index 00000000..e274e153 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/structuredtype/seg_0/47E390DE-0671-C4B1-8428-0F45CBEE18F8.xml @@ -0,0 +1,37 @@ + + +bird +2012-08-20 21:58:45 UTC +TestManagerDatabase +false +true +false +true + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16777056 + + +Method +-16777216 + + +Not Instantiable +-65536 + + +Mandatory +-65536 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/structuredtype/seg_0/F72C39E0-D1CA-8821-2AD7-A1E95A37D3D1.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/structuredtype/seg_0/F72C39E0-D1CA-8821-2AD7-A1E95A37D3D1.xml new file mode 100644 index 00000000..5ff7c301 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/structuredtype/seg_0/F72C39E0-D1CA-8821-2AD7-A1E95A37D3D1.xml @@ -0,0 +1,37 @@ + + +bird +2012-08-20 21:58:45 UTC +TestManagerDatabase +false +true +false +true + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16777056 + + +Method +-16777216 + + +Not Instantiable +-65536 + + +Mandatory +-65536 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/subviews/E9476B45-3C62-EE27-4705-6F1EFAD11B74.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/subviews/E9476B45-3C62-EE27-4705-6F1EFAD11B74.xml new file mode 100644 index 00000000..d09e8a61 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/datatypes/subviews/E9476B45-3C62-EE27-4705-6F1EFAD11B74.xml @@ -0,0 +1,21 @@ + + +bird +2012-08-20 21:58:45 UTC +false +true +false +false +false +-1 +false +0 + + + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/defaultRDBMSSites.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/defaultRDBMSSites.xml new file mode 100644 index 00000000..07122f85 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/defaultRDBMSSites.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/defaultdomains.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/defaultdomains.xml new file mode 100644 index 00000000..d858b5c4 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/defaultdomains.xml @@ -0,0 +1,13 @@ + + + + + bird + 2012-08-20 21:58:45 UTC + System + 0 + defaultdomains + LOGDT017 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/dl_settings.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/dl_settings.xml new file mode 100644 index 00000000..6c426008 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/dl_settings.xml @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/dr_custom_scripts.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/dr_custom_scripts.xml new file mode 100644 index 00000000..3580f0f0 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/dr_custom_scripts.xml @@ -0,0 +1,360 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/Logical.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/Logical.xml new file mode 100644 index 00000000..0403a605 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/Logical.xml @@ -0,0 +1,7 @@ + + +bird +2012-08-20 21:58:45 UTC +TestManagerDatabase +false + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/16464F5A-64BE-D2ED-91E0-BCBD0AA34680.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/16464F5A-64BE-D2ED-91E0-BCBD0AA34680.xml new file mode 100644 index 00000000..6904bb54 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/16464F5A-64BE-D2ED-91E0-BCBD0AA34680.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 09:11:26 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/1BEAB532-23CA-8628-0C97-7CAD39119A4E.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/1BEAB532-23CA-8628-0C97-7CAD39119A4E.xml new file mode 100644 index 00000000..9f54c6cd --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/1BEAB532-23CA-8628-0C97-7CAD39119A4E.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-20 22:38:18 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/24150FB1-B00F-4F69-6F77-49ECB58F0F66.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/24150FB1-B00F-4F69-6F77-49ECB58F0F66.xml new file mode 100644 index 00000000..3a02553a --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/24150FB1-B00F-4F69-6F77-49ECB58F0F66.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 08:54:55 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/28DD93CF-D058-7343-CD47-E9B435E1AC16.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/28DD93CF-D058-7343-CD47-E9B435E1AC16.xml new file mode 100644 index 00000000..3a9992c9 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/28DD93CF-D058-7343-CD47-E9B435E1AC16.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 09:12:51 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/2F6ACC6D-3D17-537D-8ADF-F8424395B345.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/2F6ACC6D-3D17-537D-8ADF-F8424395B345.xml new file mode 100644 index 00000000..4ea40fc7 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/2F6ACC6D-3D17-537D-8ADF-F8424395B345.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 09:17:42 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/44FFF5E9-0C2F-7BAC-B5B7-73CA3A230B39.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/44FFF5E9-0C2F-7BAC-B5B7-73CA3A230B39.xml new file mode 100644 index 00000000..e3300354 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/44FFF5E9-0C2F-7BAC-B5B7-73CA3A230B39.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-22 11:47:11 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/4579B792-2F35-D72A-1A3B-C7E53C41A766.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/4579B792-2F35-D72A-1A3B-C7E53C41A766.xml new file mode 100644 index 00000000..e35d8bc0 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/4579B792-2F35-D72A-1A3B-C7E53C41A766.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 09:13:03 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/4D937E7C-3A28-E52D-89C0-EC8804C62367.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/4D937E7C-3A28-E52D-89C0-EC8804C62367.xml new file mode 100644 index 00000000..7b2d1d01 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/4D937E7C-3A28-E52D-89C0-EC8804C62367.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-22 11:47:19 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/504221DA-1B57-4EAD-39DB-40FD553E9FA2.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/504221DA-1B57-4EAD-39DB-40FD553E9FA2.xml new file mode 100644 index 00000000..e536867c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/504221DA-1B57-4EAD-39DB-40FD553E9FA2.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 08:52:15 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/6A886CEE-579B-48FF-63F6-0FB03393FBF6.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/6A886CEE-579B-48FF-63F6-0FB03393FBF6.xml new file mode 100644 index 00000000..20424c7c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/6A886CEE-579B-48FF-63F6-0FB03393FBF6.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-20 22:16:15 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/7AE36CC1-A030-63E5-6EF3-72FCD04815EE.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/7AE36CC1-A030-63E5-6EF3-72FCD04815EE.xml new file mode 100644 index 00000000..9475385d --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/7AE36CC1-A030-63E5-6EF3-72FCD04815EE.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-20 22:34:30 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/90367AFB-BA2D-A918-46B9-1E5DE53ACC48.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/90367AFB-BA2D-A918-46B9-1E5DE53ACC48.xml new file mode 100644 index 00000000..96b815e1 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/90367AFB-BA2D-A918-46B9-1E5DE53ACC48.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 08:59:31 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/90F477EE-35D6-21A7-B693-E5724FB07476.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/90F477EE-35D6-21A7-B693-E5724FB07476.xml new file mode 100644 index 00000000..6bcf734c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/90F477EE-35D6-21A7-B693-E5724FB07476.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 09:11:20 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/9F78B73C-056D-DDEF-8C50-A9DA76B9E724.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/9F78B73C-056D-DDEF-8C50-A9DA76B9E724.xml new file mode 100644 index 00000000..d672b27e --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/9F78B73C-056D-DDEF-8C50-A9DA76B9E724.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 08:52:32 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/A352A20F-310D-E285-FBC9-90DD0DA7BB9B.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/A352A20F-310D-E285-FBC9-90DD0DA7BB9B.xml new file mode 100644 index 00000000..301a3f28 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/A352A20F-310D-E285-FBC9-90DD0DA7BB9B.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 09:09:55 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/A6A5F317-479C-A0DD-CAAE-9DCB56B29D40.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/A6A5F317-479C-A0DD-CAAE-9DCB56B29D40.xml new file mode 100644 index 00000000..a6f31387 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/A6A5F317-479C-A0DD-CAAE-9DCB56B29D40.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-20 22:14:04 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/B36A186B-CDB3-7851-8C38-12EA8D50EAEB.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/B36A186B-CDB3-7851-8C38-12EA8D50EAEB.xml new file mode 100644 index 00000000..7e22bcc2 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/B36A186B-CDB3-7851-8C38-12EA8D50EAEB.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-20 22:14:37 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/B82DAF9A-6F99-5CF6-4D99-A391BAD66192.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/B82DAF9A-6F99-5CF6-4D99-A391BAD66192.xml new file mode 100644 index 00000000..aa84dcf3 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/B82DAF9A-6F99-5CF6-4D99-A391BAD66192.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-20 22:34:30 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/C332E3D7-638B-6CA8-24BF-383CA8659A3A.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/C332E3D7-638B-6CA8-24BF-383CA8659A3A.xml new file mode 100644 index 00000000..f093d805 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/C332E3D7-638B-6CA8-24BF-383CA8659A3A.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 09:09:44 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/C79482B8-771B-FAD8-0337-163E3A45003A.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/C79482B8-771B-FAD8-0337-163E3A45003A.xml new file mode 100644 index 00000000..3550b18c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/C79482B8-771B-FAD8-0337-163E3A45003A.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-20 22:13:16 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/D09E0DE5-99D6-2991-032A-A8A124F6ACBA.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/D09E0DE5-99D6-2991-032A-A8A124F6ACBA.xml new file mode 100644 index 00000000..1e10ffb7 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/D09E0DE5-99D6-2991-032A-A8A124F6ACBA.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-21 09:11:32 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/DCC79294-5434-1DED-298C-6473DEE59FBA.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/DCC79294-5434-1DED-298C-6473DEE59FBA.xml new file mode 100644 index 00000000..7891dab7 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/DCC79294-5434-1DED-298C-6473DEE59FBA.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-22 11:46:51 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/DE366053-6F7A-7F42-ABA3-00E583098C37.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/DE366053-6F7A-7F42-ABA3-00E583098C37.xml new file mode 100644 index 00000000..145b2c76 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/DE366053-6F7A-7F42-ABA3-00E583098C37.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-20 22:34:30 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/E93BBF08-067B-A665-39F3-CF488A6547B2.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/E93BBF08-067B-A665-39F3-CF488A6547B2.xml new file mode 100644 index 00000000..c8632bf7 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/entity/seg_0/E93BBF08-067B-A665-39F3-CF488A6547B2.xml @@ -0,0 +1,52 @@ + + +bird +2012-08-20 22:14:21 UTC +TestManagerDatabase + + + +NO +0 +Single Table +0 +Year +9999999 +0 +Third + + +Title +1 +-16776961 + + +Attribute +-16777216 + + +Datatype +-16744448 + + +PK Element +-16776961 + + +FK Element +-16777216 + + +UK Element +-16776961 + + +Not Null +-65536 + + +Key +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/note/seg_0/876CB767-80BA-6C8E-AACA-F1CCC95C445E.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/note/seg_0/876CB767-80BA-6C8E-AACA-F1CCC95C445E.xml new file mode 100644 index 00000000..31ddc417 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/note/seg_0/876CB767-80BA-6C8E-AACA-F1CCC95C445E.xml @@ -0,0 +1,16 @@ + + +bird +2012-08-21 08:43:49 UTC +Priority, scheduling time, and testgroup dependencies are associated with SchedGroup membership. +TestManagerDatabase + + + + + +Title +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/note/seg_0/D487AFDC-4027-F824-EA29-5C6D0ABB9E1E.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/note/seg_0/D487AFDC-4027-F824-EA29-5C6D0ABB9E1E.xml new file mode 100644 index 00000000..9152a7c6 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/note/seg_0/D487AFDC-4027-F824-EA29-5C6D0ABB9E1E.xml @@ -0,0 +1,16 @@ + + +bird +2012-08-21 08:57:21 UTC +Testsuite and build sources. +TestManagerDatabase + + + + + +Title +-16777216 + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/01537211-CCFB-0A1E-B43B-E8C641B69471.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/01537211-CCFB-0A1E-B43B-E8C641B69471.xml new file mode 100644 index 00000000..e8b317cd --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/01537211-CCFB-0A1E-B43B-E8C641B69471.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:57:18 UTC +TestManagerDatabase + + + +false +false +true +* +90F477EE-35D6-21A7-B693-E5724FB07476 +1 +1BEAB532-23CA-8628-0C97-7CAD39119A4E +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/02096BBB-0795-1759-1E26-2877BE36BB59.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/02096BBB-0795-1759-1E26-2877BE36BB59.xml new file mode 100644 index 00000000..48df0a07 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/02096BBB-0795-1759-1E26-2877BE36BB59.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:16:26 UTC +TestManagerDatabase + + + +false +true +true +1 +16464F5A-64BE-D2ED-91E0-BCBD0AA34680 +* +16464F5A-64BE-D2ED-91E0-BCBD0AA34680 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/0CCF1DE3-7916-9054-BEA6-C601FF564DB2.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/0CCF1DE3-7916-9054-BEA6-C601FF564DB2.xml new file mode 100644 index 00000000..e5304e1d --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/0CCF1DE3-7916-9054-BEA6-C601FF564DB2.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-20 22:35:28 UTC +TestManagerDatabase + + + +true +false +false +1 +7AE36CC1-A030-63E5-6EF3-72FCD04815EE +* +6A886CEE-579B-48FF-63F6-0FB03393FBF6 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/10867E70-94CE-FDAF-6B6E-2742D3A49E57.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/10867E70-94CE-FDAF-6B6E-2742D3A49E57.xml new file mode 100644 index 00000000..ed642271 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/10867E70-94CE-FDAF-6B6E-2742D3A49E57.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-22 11:56:22 UTC +TestManagerDatabase + + + +false +false +true +1 +90367AFB-BA2D-A918-46B9-1E5DE53ACC48 +1 +44FFF5E9-0C2F-7BAC-B5B7-73CA3A230B39 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/11710A55-6423-1904-841A-C7D2AB8CEEBF.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/11710A55-6423-1904-841A-C7D2AB8CEEBF.xml new file mode 100644 index 00000000..4c37ff79 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/11710A55-6423-1904-841A-C7D2AB8CEEBF.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:17:15 UTC +TestManagerDatabase + + + +false +true +true +1 +16464F5A-64BE-D2ED-91E0-BCBD0AA34680 +* +D09E0DE5-99D6-2991-032A-A8A124F6ACBA +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/1C189437-742B-B999-C955-7754C8ADB089.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/1C189437-742B-B999-C955-7754C8ADB089.xml new file mode 100644 index 00000000..ee340833 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/1C189437-742B-B999-C955-7754C8ADB089.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-20 22:46:08 UTC +TestManagerDatabase + + + +false +true +true +* +6A886CEE-579B-48FF-63F6-0FB03393FBF6 +* +DE366053-6F7A-7F42-ABA3-00E583098C37 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/34733942-1305-4CA1-47EB-ACE724B04E69.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/34733942-1305-4CA1-47EB-ACE724B04E69.xml new file mode 100644 index 00000000..bde14e2c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/34733942-1305-4CA1-47EB-ACE724B04E69.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:16:58 UTC +TestManagerDatabase + + + +false +true +true +1 +16464F5A-64BE-D2ED-91E0-BCBD0AA34680 +* +28DD93CF-D058-7343-CD47-E9B435E1AC16 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3563C940-E524-7F96-7AE0-DAC3C1C17AFC.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3563C940-E524-7F96-7AE0-DAC3C1C17AFC.xml new file mode 100644 index 00000000..0d924eae --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3563C940-E524-7F96-7AE0-DAC3C1C17AFC.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 10:14:03 UTC +TestManagerDatabase + + + +true +true +false +1 +504221DA-1B57-4EAD-39DB-40FD553E9FA2 +* +90F477EE-35D6-21A7-B693-E5724FB07476 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3983F50A-EBB9-E4DE-1958-60EA4EDD6D6C.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3983F50A-EBB9-E4DE-1958-60EA4EDD6D6C.xml new file mode 100644 index 00000000..f0a22501 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3983F50A-EBB9-E4DE-1958-60EA4EDD6D6C.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 08:55:43 UTC +TestManagerDatabase + + + +false +true +false +1 +24150FB1-B00F-4F69-6F77-49ECB58F0F66 +* +6A886CEE-579B-48FF-63F6-0FB03393FBF6 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3B7C8913-EB6A-47B1-27D0-E2C85EE9048B.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3B7C8913-EB6A-47B1-27D0-E2C85EE9048B.xml new file mode 100644 index 00000000..9a95a66a --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/3B7C8913-EB6A-47B1-27D0-E2C85EE9048B.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-20 22:41:40 UTC +TestManagerDatabase + + + +true +true +false +1 +A6A5F317-479C-A0DD-CAAE-9DCB56B29D40 +* +B36A186B-CDB3-7851-8C38-12EA8D50EAEB +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/518CE489-97B4-C05C-07A2-E3DBF14EE267.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/518CE489-97B4-C05C-07A2-E3DBF14EE267.xml new file mode 100644 index 00000000..7987194b --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/518CE489-97B4-C05C-07A2-E3DBF14EE267.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-22 11:58:35 UTC +TestManagerDatabase + + + +false +false +true +1 +DCC79294-5434-1DED-298C-6473DEE59FBA +1 +44FFF5E9-0C2F-7BAC-B5B7-73CA3A230B39 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/68A0C3E1-0FA1-8414-A361-33B08A8EDB39.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/68A0C3E1-0FA1-8414-A361-33B08A8EDB39.xml new file mode 100644 index 00000000..bf2200dc --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/68A0C3E1-0FA1-8414-A361-33B08A8EDB39.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-22 11:48:45 UTC +TestManagerDatabase + + + +false +false +true +1 +DCC79294-5434-1DED-298C-6473DEE59FBA +1 +16464F5A-64BE-D2ED-91E0-BCBD0AA34680 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/7497D76B-781B-3BDD-D797-FFBDB974F772.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/7497D76B-781B-3BDD-D797-FFBDB974F772.xml new file mode 100644 index 00000000..43673229 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/7497D76B-781B-3BDD-D797-FFBDB974F772.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-20 22:42:25 UTC +TestManagerDatabase + + + +false +true +true +* +B82DAF9A-6F99-5CF6-4D99-A391BAD66192 +* +C79482B8-771B-FAD8-0337-163E3A45003A +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/7DA9DD83-A52E-CA1E-FCBF-FC9CE71AF635.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/7DA9DD83-A52E-CA1E-FCBF-FC9CE71AF635.xml new file mode 100644 index 00000000..dd75d4cb --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/7DA9DD83-A52E-CA1E-FCBF-FC9CE71AF635.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:17:23 UTC +TestManagerDatabase + + + +false +true +true +1 +16464F5A-64BE-D2ED-91E0-BCBD0AA34680 +* +4579B792-2F35-D72A-1A3B-C7E53C41A766 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/89A83E25-364B-6B73-0613-FEAD875EF9FB.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/89A83E25-364B-6B73-0613-FEAD875EF9FB.xml new file mode 100644 index 00000000..e8a4730c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/89A83E25-364B-6B73-0613-FEAD875EF9FB.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-20 22:40:39 UTC +TestManagerDatabase + + + +false +false +false +1 +B82DAF9A-6F99-5CF6-4D99-A391BAD66192 +* +1BEAB532-23CA-8628-0C97-7CAD39119A4E +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/8E5018CC-34E3-9AFC-D6D1-31E2BC4E9FE2.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/8E5018CC-34E3-9AFC-D6D1-31E2BC4E9FE2.xml new file mode 100644 index 00000000..9d086559 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/8E5018CC-34E3-9AFC-D6D1-31E2BC4E9FE2.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:41:56 UTC +TestManagerDatabase + + + +false +false +true +* +C332E3D7-638B-6CA8-24BF-383CA8659A3A +* +1BEAB532-23CA-8628-0C97-7CAD39119A4E +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/9B1FE0CF-B2AD-EED0-22FC-461A7D46DE51.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/9B1FE0CF-B2AD-EED0-22FC-461A7D46DE51.xml new file mode 100644 index 00000000..b50ed32a --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/9B1FE0CF-B2AD-EED0-22FC-461A7D46DE51.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:52:20 UTC +TestManagerDatabase + + + +false +false +true +1 +2F6ACC6D-3D17-537D-8ADF-F8424395B345 +1 +C79482B8-771B-FAD8-0337-163E3A45003A +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/A182A65A-47AE-5D00-9A30-BC20AB050BF2.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/A182A65A-47AE-5D00-9A30-BC20AB050BF2.xml new file mode 100644 index 00000000..b29652bd --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/A182A65A-47AE-5D00-9A30-BC20AB050BF2.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:15:48 UTC +TestManagerDatabase + + + +false +true +true +1 +90F477EE-35D6-21A7-B693-E5724FB07476 +1 +16464F5A-64BE-D2ED-91E0-BCBD0AA34680 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/B346381F-48FE-E495-01A7-E22EC26AEE8A.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/B346381F-48FE-E495-01A7-E22EC26AEE8A.xml new file mode 100644 index 00000000..ba60f398 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/B346381F-48FE-E495-01A7-E22EC26AEE8A.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-20 22:37:24 UTC +TestManagerDatabase + + + +false +true +true +* +B82DAF9A-6F99-5CF6-4D99-A391BAD66192 +* +DE366053-6F7A-7F42-ABA3-00E583098C37 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/B3596116-540F-6397-ECE4-58A386644E15.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/B3596116-540F-6397-ECE4-58A386644E15.xml new file mode 100644 index 00000000..d4f9edd8 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/B3596116-540F-6397-ECE4-58A386644E15.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-20 22:39:51 UTC +TestManagerDatabase + + + +false +true +true +* +B82DAF9A-6F99-5CF6-4D99-A391BAD66192 +1 +B82DAF9A-6F99-5CF6-4D99-A391BAD66192 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/BAD8EC05-6F14-4E38-366C-B4B660C6F38A.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/BAD8EC05-6F14-4E38-366C-B4B660C6F38A.xml new file mode 100644 index 00000000..da1e2a8f --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/BAD8EC05-6F14-4E38-366C-B4B660C6F38A.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-22 11:57:18 UTC +TestManagerDatabase + + + +true +false +false +1 +44FFF5E9-0C2F-7BAC-B5B7-73CA3A230B39 +* +4D937E7C-3A28-E52D-89C0-EC8804C62367 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/C5B67DD4-FA4F-EF9F-1FF5-0445D51B32EE.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/C5B67DD4-FA4F-EF9F-1FF5-0445D51B32EE.xml new file mode 100644 index 00000000..d75c9a0a --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/C5B67DD4-FA4F-EF9F-1FF5-0445D51B32EE.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:59:42 UTC +TestManagerDatabase + + + +false +false +true +* +90F477EE-35D6-21A7-B693-E5724FB07476 +1 +7AE36CC1-A030-63E5-6EF3-72FCD04815EE +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/CCD38E11-8557-EB34-2651-07EB29E83FA6.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/CCD38E11-8557-EB34-2651-07EB29E83FA6.xml new file mode 100644 index 00000000..bf216b5d --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/CCD38E11-8557-EB34-2651-07EB29E83FA6.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 08:56:11 UTC +TestManagerDatabase + + + +false +true +true +1 +24150FB1-B00F-4F69-6F77-49ECB58F0F66 +* +6A886CEE-579B-48FF-63F6-0FB03393FBF6 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E2A47942-ED55-E81D-4C71-9A134C49C147.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E2A47942-ED55-E81D-4C71-9A134C49C147.xml new file mode 100644 index 00000000..5164076c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E2A47942-ED55-E81D-4C71-9A134C49C147.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:43:14 UTC +TestManagerDatabase + + + +false +false +true +1 +7AE36CC1-A030-63E5-6EF3-72FCD04815EE +* +A352A20F-310D-E285-FBC9-90DD0DA7BB9B +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E4FE88E9-EE21-B43B-B0FE-A153E38246F9.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E4FE88E9-EE21-B43B-B0FE-A153E38246F9.xml new file mode 100644 index 00000000..fc0ec020 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E4FE88E9-EE21-B43B-B0FE-A153E38246F9.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-20 22:38:38 UTC +TestManagerDatabase + + + +false +true +true +* +B82DAF9A-6F99-5CF6-4D99-A391BAD66192 +1 +A6A5F317-479C-A0DD-CAAE-9DCB56B29D40 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E62AE7DF-49EE-9280-B328-A867CBD273AE.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E62AE7DF-49EE-9280-B328-A867CBD273AE.xml new file mode 100644 index 00000000..3121966f --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E62AE7DF-49EE-9280-B328-A867CBD273AE.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:48:53 UTC +TestManagerDatabase + + + +false +true +true +1 +A352A20F-310D-E285-FBC9-90DD0DA7BB9B +1 +90F477EE-35D6-21A7-B693-E5724FB07476 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E74406B5-20F1-4323-DC99-6E45982CB606.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E74406B5-20F1-4323-DC99-6E45982CB606.xml new file mode 100644 index 00000000..498ce1fb --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/E74406B5-20F1-4323-DC99-6E45982CB606.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-20 22:41:57 UTC +TestManagerDatabase + + + +true +true +false +1 +A6A5F317-479C-A0DD-CAAE-9DCB56B29D40 +* +E93BBF08-067B-A665-39F3-CF488A6547B2 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/EC4EB506-3DBE-7F36-6451-F31920EDAB52.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/EC4EB506-3DBE-7F36-6451-F31920EDAB52.xml new file mode 100644 index 00000000..18840e25 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/EC4EB506-3DBE-7F36-6451-F31920EDAB52.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 09:44:47 UTC +TestManagerDatabase + + + +false +true +true +1 +7AE36CC1-A030-63E5-6EF3-72FCD04815EE +* +2F6ACC6D-3D17-537D-8ADF-F8424395B345 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/EE1D98EF-6AEA-2790-D9B9-DBC2ED21D880.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/EE1D98EF-6AEA-2790-D9B9-DBC2ED21D880.xml new file mode 100644 index 00000000..6fcc7e2b --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/relation/seg_0/EE1D98EF-6AEA-2790-D9B9-DBC2ED21D880.xml @@ -0,0 +1,17 @@ + + +bird +2012-08-21 08:53:25 UTC +TestManagerDatabase + + + +false +true +false +1 +9F78B73C-056D-DDEF-8C50-A9DA76B9E724 +* +504221DA-1B57-4EAD-39DB-40FD553E9FA2 +true + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/016BA1CF-6EA4-9CA4-CDF7-3AAA507EF6EF.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/016BA1CF-6EA4-9CA4-CDF7-3AAA507EF6EF.xml new file mode 100644 index 00000000..e947c03a --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/016BA1CF-6EA4-9CA4-CDF7-3AAA507EF6EF.xml @@ -0,0 +1,40 @@ + + +bird +2012-08-22 12:01:22 UTC +false +true +false +false +false +-1 +false +0 + + + + + + + + + + + + + +1 + + + + + + +1 + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/32D718B4-250F-95DC-37F0-C0A817F69020.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/32D718B4-250F-95DC-37F0-C0A817F69020.xml new file mode 100644 index 00000000..6493425b --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/32D718B4-250F-95DC-37F0-C0A817F69020.xml @@ -0,0 +1,70 @@ + + +bird +2012-08-21 09:19:53 UTC +false +true +false +false +false +-1 +false +0 + + + + + + + + + + + + + + + + + + + +1 + + + + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/571DBBAF-CDDA-1C46-4220-D1319C0EEC00.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/571DBBAF-CDDA-1C46-4220-D1319C0EEC00.xml new file mode 100644 index 00000000..25df5afc --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/571DBBAF-CDDA-1C46-4220-D1319C0EEC00.xml @@ -0,0 +1,24 @@ + + +bird +2012-08-21 09:19:18 UTC +false +true +false +false +false +-1 +false +0 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/65FA5BA0-CC9C-C108-BB1B-AC9E13F5BC83.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/65FA5BA0-CC9C-C108-BB1B-AC9E13F5BC83.xml new file mode 100644 index 00000000..c248a58e --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/65FA5BA0-CC9C-C108-BB1B-AC9E13F5BC83.xml @@ -0,0 +1,127 @@ + + +bird +2012-08-21 08:58:45 UTC +false +true +false +false +false +-1 +false +0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/AFCEF013-4CF2-4A5A-79A3-31521C1CA20A.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/AFCEF013-4CF2-4A5A-79A3-31521C1CA20A.xml new file mode 100644 index 00000000..14a7566f --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/AFCEF013-4CF2-4A5A-79A3-31521C1CA20A.xml @@ -0,0 +1,306 @@ + + +bird +2012-08-20 22:02:17 UTC +false +true +false +true +true +-1 +265 +490 +false +0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 + + + + + + +1 + + + + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + +1 + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/F936BE6D-7A74-1B57-7564-41C1E13B973B.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/F936BE6D-7A74-1B57-7564-41C1E13B973B.xml new file mode 100644 index 00000000..bcc0009f --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/logical/subviews/F936BE6D-7A74-1B57-7564-41C1E13B973B.xml @@ -0,0 +1,33 @@ + + +bird +2012-08-21 09:08:50 UTC +false +true +false +false +false +-1 +false +0 + + + + + + + + + + + + + +1 + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/mapping/ExtendedMap.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/mapping/ExtendedMap.xml new file mode 100644 index 00000000..6811f63f --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/mapping/ExtendedMap.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/mapping/ExtendedMap_RMB082B14A-BEA8-D8A7-D661-197F34766ED3.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/mapping/ExtendedMap_RMB082B14A-BEA8-D8A7-D661-197F34766ED3.xml new file mode 100644 index 00000000..7ea5df08 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/mapping/ExtendedMap_RMB082B14A-BEA8-D8A7-D661-197F34766ED3.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rdbms/TestManagerDatabase_RDBMSSites.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rdbms/TestManagerDatabase_RDBMSSites.xml new file mode 100644 index 00000000..e0c5dad0 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rdbms/TestManagerDatabase_RDBMSSites.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rel/B082B14A-197F34766ED3.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rel/B082B14A-197F34766ED3.xml new file mode 100644 index 00000000..76bdad85 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rel/B082B14A-197F34766ED3.xml @@ -0,0 +1,8 @@ + + +bird +2012-08-20 21:58:45 UTC +TestManagerDatabase +false +32076570-2523-435C-2E92-BF29817DFF70 + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rel/B082B14A-197F34766ED3/subviews/6CEC5843-B4DD-D9B0-54D4-2845569D5E9F.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rel/B082B14A-197F34766ED3/subviews/6CEC5843-B4DD-D9B0-54D4-2845569D5E9F.xml new file mode 100644 index 00000000..44b040be --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/rel/B082B14A-197F34766ED3/subviews/6CEC5843-B4DD-D9B0-54D4-2845569D5E9F.xml @@ -0,0 +1,13 @@ + + +bird +2012-08-20 22:02:17 UTC +false +true +false +false +false +-1 +false +0 + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/types.xml b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/types.xml new file mode 100644 index 00000000..64fa7ab8 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabase/types.xml @@ -0,0 +1,933 @@ + + + + BLOB + BLOB + BLOB + BINARY, size + BINARY, size + BLOB, size + BLOB, size + BLOB, size + BLOB, size + + + BFILE + BFILE + BFILE + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + DATALINK + DATALINK + + + INTEGER + INTEGER + INTEGER + BIGINT + BIGINT + INTEGER + INTEGER + INTEGER + INTEGER + + + BLOB + BLOB + BLOB + BINARY, size + BINARY, size + BLOB, size + BLOB, size + BLOB, size + BLOB, size + + + BINARY_DOUBLE + BINARY_DOUBLE + NUMBER + FLOAT + FLOAT + DOUBLE + DOUBLE + DOUBLE + DOUBLE + + + BINARY_FLOAT + BINARY_FLOAT + NUMBER + REAL + REAL + REAL + REAL + REAL + REAL + + + CHAR + CHAR + CHAR + BIT + BIT + CHAR, size + CHAR, size + CHAR, size + CHAR, size + + + BLOB + BLOB + BLOB + IMAGE + IMAGE + BLOB, size + BLOB, size + BLOB, size + BLOB, size + + + CHAR + CHAR + CHAR + BIT + BIT + CHAR + CHAR + CHAR + CHAR + + + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + + + CLOB + CLOB + CLOB + VARCHAR, size + TEXT + CLOB, size + CLOB, size + CLOB, size + CLOB, size + + + BLOB + BLOB + BLOB + BINARY + BINARY + VARCHAR, size + VARCHAR, size + DATALINK + DATALINK + + + DBURITYPE + DBURITYPE + DBURITYPE + CHAR, size + CHAR, size + CHAR, size + CHAR, size + DATALINK + DATALINK + + + NUMBER, precision, scale + NUMBER, precision, scale + NUMBER, precision, scale + DECIMAL, precision, scale + DECIMAL, precision, scale + DECIMAL, precision, scale + DECIMAL, precision, scale + DECIMAL, precision, scale + DECIMAL, precision, scale + + + NUMBER + NUMBER + NUMBER + BIGINT + BIGINT + DOUBLE + DOUBLE + DOUBLE + DOUBLE + + + DATE + DATE + DATE + DATETIME + DATETIME + DATE + DATE + DATE + DATE + + + DATE + DATE + DATE + DATETIME + DATETIME + TIMESTAMP + TIMESTAMP + TIMESTAMP + TIMESTAMP + + + FLOAT, precision + FLOAT, precision + FLOAT, precision + FLOAT, precision + FLOAT, precision + FLOAT, precision + FLOAT, precision + FLOAT, precision + FLOAT, precision + + + BLOB + BLOB + BLOB + BINARY + BINARY + GRAPHIC, size + GRAPHIC, size + GRAPHIC, size + GRAPHIC, size + + + HTTPURITYPE + HTTPURITYPE + HTTPURITYPE + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + + + INTERVAL DAY TO SECOND, precision, scale + INTERVAL DAY TO SECOND, precision, scale + INTERVAL DAY TO SECOND, precision, scale + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + + + INTERVAL YEAR TO MONTH, precision + INTERVAL YEAR TO MONTH, precision + INTERVAL YEAR TO MONTH, precision + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + + + BLOB + BLOB + BLOB + IMAGE + IMAGE + BLOB, size + BLOB, size + BLOB, size + BLOB, size + + + INTEGER + INTEGER + INTEGER + INTEGER + INTEGER + INTEGER + INTEGER + INTEGER + INTEGER + + + LONG + LONG + LONG + VARCHAR, size + VARCHAR, size + CLOB, size + CLOB, size + CLOB, size + CLOB, size + + + LONG RAW + LONG RAW + LONG RAW + VARBINARY, size + VARBINARY, size + BLOB, size + BLOB, size + BLOB, size + BLOB, size + + + NUMBER, precision, scale + NUMBER, precision, scale + NUMBER, precision, scale + MONEY + MONEY + DOUBLE + DOUBLE + DOUBLE + DOUBLE + + + NCHAR, size + NCHAR, size + NCHAR, size + NCHAR, size + NCHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + + + NCLOB + NCLOB + NCLOB + NTEXT + NTEXT + CLOB, size + CLOB, size + CLOB, size + CLOB, size + + + NCLOB + NCLOB + NCLOB + NTEXT + NTEXT + CLOB, size + CLOB, size + CLOB, size + CLOB, size + + + NUMBER, precision, scale + NUMBER, precision, scale + NUMBER, precision, scale + NUMERIC, precision, scale + NUMERIC, precision, scale + NUMERIC, precision, scale + NUMERIC, precision, scale + NUMERIC, precision, scale + NUMERIC, precision, scale + + + NVARCHAR2, size + NVARCHAR2, size + NVARCHAR2, size + NVARCHAR, size + NVARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + + + ORDSYS.ORDAudio + ORDSYS.ORDAudio + ORDSYS.ORDAudio + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + ORDSYS.ORDDoc + ORDSYS.ORDDoc + ORDSYS.ORDDoc + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + ORDSYS.ORDImage + ORDSYS.ORDImage + ORDSYS.ORDImage + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + ORDSYS.ORDImageSignature + ORDSYS.ORDImageSignature + ORDSYS.ORDImageSignature + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + ORDSYS.ORDVideo + ORDSYS.ORDVideo + ORDSYS.ORDVideo + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + REAL + REAL + REAL + REAL, precision + REAL, precision + REAL + REAL + REAL + REAL + + + ROWID + ROWID + ROWID + CHAR, size + CHAR, size + ROWID + ROWID + CHAR, size + CHAR, size + + + RAW, size + RAW, size + RAW, size + VARBINARY, size + VARBINARY, size + VARGRAPHIC, size + VARGRAPHIC, size + VARGRAPHIC, size + VARGRAPHIC, size + + + DATE + DATE + DATE + SMALLDATETIME + SMALLDATETIME + TIMESTAMP + TIMESTAMP + TIMESTAMP + TIMESTAMP + + + SMALLINT + SMALLINT + SMALLINT + SMALLINT + SMALLINT + SMALLINT + SMALLINT + SMALLINT + SMALLINT + + + NUMBER, precision, scale + NUMBER, precision, scale + NUMBER, precision, scale + SMALLMONEY + SMALLMONEY + REAL + REAL + REAL + REAL + + + SYS.ANYDATA + SYS.ANYDATA + SYS.ANYDATA + SQL_VARIANT + SQL_VARIANT + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + VARCHAR2, size + VARCHAR2, size + VARCHAR2, size + SYSNAME + SYSNAME + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + + + SYS.ANYDATA + SYS.ANYDATA + SYS.ANYDATA + SQL_VARIANT + SQL_VARIANT + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + SYS.ANYDATASET + SYS.ANYDATASET + SYS.ANYDATASET + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + SYS.ANYTYPE + SYS.ANYTYPE + SYS.ANYTYPE + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + CLOB + CLOB + CLOB + TEXT + TEXT + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + + + TIMESTAMP WITH LOCAL TIME ZONE, precision + TIMESTAMP WITH LOCAL TIME ZONE, precision + TIMESTAMP WITH LOCAL TIME ZONE, precision + DATETIME + DATETIME + TIMESTAMP + TIMESTAMP + TIMESTAMP + TIMESTAMP + + + TIMESTAMP WITH TIME ZONE, precision + TIMESTAMP WITH TIME ZONE, precision + TIMESTAMP WITH TIME ZONE, precision + DATETIME + DATETIME + TIMESTAMP + TIMESTAMP + TIMESTAMP + TIMESTAMP + + + SMALLINT + SMALLINT + SMALLINT + TINYINT + TINYINT + SMALLINT + SMALLINT + SMALLINT + SMALLINT + + + DATE + DATE + DATE + DATETIME + DATETIME + TIME + TIME + TIME + TIME + + + TIMESTAMP, precision + TIMESTAMP, precision + TIMESTAMP, precision + DATETIME + DATETIME + TIMESTAMP + TIMESTAMP + TIMESTAMP + TIMESTAMP + + + CHAR, size + CHAR, size + CHAR, size + UNIQUEIDENTIFIER + UNIQUEIDENTIFIER + CHAR, size + CHAR, size + CHAR, size + CHAR, size + + + URITYPE + URITYPE + URITYPE + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + + + UROWID, size + UROWID, size + UROWID, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + + + BLOB + BLOB + BLOB + VARBINARY, size + VARBINARY, size + BLOB, size + BLOB, size + BLOB, size + BLOB, size + + + VARCHAR2, size + VARCHAR2, size + VARCHAR2, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + VARCHAR, size + + + BLOB + BLOB + BLOB + VARBINARY, size + VARBINARY, size + VARGRAPHIC, size + VARGRAPHIC, size + VARGRAPHIC, size + VARGRAPHIC, size + + + BLOB + BLOB + BLOB + IMAGE + IMAGE + VARGRAPHIC, size + VARGRAPHIC, size + BLOB + BLOB + + + XDBURITYPE + XDBURITYPE + XDBURITYPE + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + CHAR, size + + + XMLTYPE + XMLTYPE + XMLTYPE + XML + TEXT + CLOB, size + CLOB, size + XML + CLOB, size + + + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + UNKNOWN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql new file mode 100644 index 00000000..91978e37 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql @@ -0,0 +1,1193 @@ +-- $Id: TestManagerDatabaseComments.pgsql $ +--- @file +-- Autogenerated from TestManagerDatabaseInit.pgsql. Do not edit! +-- + +-- +-- Copyright (C) 2012-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +COMMENT ON COLUMN SystemLog.tsCreated IS + 'When this was logged.'; + +COMMENT ON COLUMN SystemLog.sEvent IS + 'The event type. +This is a 8 character string identifier so that we don''t need to change +some enum type everytime we introduce a new event type.'; + +COMMENT ON COLUMN SystemLog.sLogText IS + 'The log text.'; + +COMMENT ON TABLE Users IS + 'Test manager users. + +This is mainly for doing simple access checks before permitting access to +the test manager. This needs to be coordinated with +apache/ldap/Oracle-Single-Sign-On. + +The main purpose, though, is for tracing who changed the test config and +analysis data. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp.'; + +COMMENT ON COLUMN Users.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN Users.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN Users.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN Users.sUsername IS + 'User name.'; + +COMMENT ON COLUMN Users.sEmail IS + 'The email address of the user.'; + +COMMENT ON COLUMN Users.sFullName IS + 'The full name.'; + +COMMENT ON COLUMN Users.sLoginName IS + 'The login name used by apache.'; + +COMMENT ON COLUMN Users.fReadOnly IS + 'Read access only.'; + +COMMENT ON TABLE GlobalResources IS + 'Global resource configuration. + +For example an iSCSI target. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp.'; + +COMMENT ON COLUMN GlobalResources.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN GlobalResources.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN GlobalResources.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN GlobalResources.sName IS + 'The name of the resource.'; + +COMMENT ON COLUMN GlobalResources.sDescription IS + 'Optional resource description.'; + +COMMENT ON COLUMN GlobalResources.fEnabled IS + 'Indicates whether this resource is currently enabled (online).'; + +COMMENT ON TABLE BuildSources IS + 'Build sources. + +This is used by a scheduling group to select builds and the default +Validation Kit from the Builds table. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. + +@todo Any better way of representing this so we could more easily + join/whatever when searching for builds?'; + +COMMENT ON COLUMN BuildSources.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN BuildSources.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN BuildSources.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN BuildSources.sName IS + 'The name of the build source.'; + +COMMENT ON COLUMN BuildSources.sDescription IS + 'Description.'; + +COMMENT ON COLUMN BuildSources.sProduct IS + 'Which product. +ASSUME that it is okay to limit a build source to a single product.'; + +COMMENT ON COLUMN BuildSources.sBranch IS + 'Which branch. +ASSUME that it is okay to limit a build source to a branch.'; + +COMMENT ON COLUMN BuildSources.asTypes IS + 'Build types to include, all matches if NULL. +@todo Weighting the types would be nice in a later version.'; + +COMMENT ON COLUMN BuildSources.asOsArches IS + 'Array of the ''sOs.sCpuArch'' to match, all matches if NULL. +See KBUILD_OSES in kBuild for a list of standard target OSes, and +KBUILD_ARCHES for a list of standard architectures. + +@remarks See marks on ''os-agnostic'' and ''noarch'' in BuildCategories.'; + +COMMENT ON COLUMN BuildSources.iFirstRevision IS + 'The first subversion tree revision to match, no lower limit if NULL.'; + +COMMENT ON COLUMN BuildSources.iLastRevision IS + 'The last subversion tree revision to match, no upper limit if NULL.'; + +COMMENT ON COLUMN BuildSources.cSecMaxAge IS + 'The maximum age of the builds in seconds, unlimited if NULL.'; + +COMMENT ON TABLE TestCases IS + 'Test case configuration. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp.'; + +COMMENT ON COLUMN TestCases.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN TestCases.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN TestCases.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN TestCases.sName IS + 'The name of the test case.'; + +COMMENT ON COLUMN TestCases.sDescription IS + 'Optional test case description.'; + +COMMENT ON COLUMN TestCases.fEnabled IS + 'Indicates whether this test case is currently enabled.'; + +COMMENT ON COLUMN TestCases.cSecTimeout IS + 'Default test case timeout given in seconds.'; + +COMMENT ON COLUMN TestCases.sTestBoxReqExpr IS + 'Default TestBox requirement expression (python boolean expression). +All the scheduler properties are available for use with the same names +as in that table. +If NULL everything matches.'; + +COMMENT ON COLUMN TestCases.sBuildReqExpr IS + 'Default build requirement expression (python boolean expression). +The following build properties are available: sProduct, sBranch, +sType, asOsArches, sVersion, iRevision, uidAuthor and idBuild. +If NULL everything matches.'; + +COMMENT ON COLUMN TestCases.sBaseCmd IS + 'The base command. +String suitable for executing in bourne shell with space as separator +(IFS). References to @BUILD_BINARIES@ will be replaced WITH the content +of the Builds(sBinaries) field.'; + +COMMENT ON COLUMN TestCases.sTestSuiteZips IS + 'Comma separated list of test suite zips (or tars) that the testbox will +need to download and expand prior to testing. +If NULL the current test suite of the scheduling group will be used (the +scheduling group will have an optional test suite build queue associated +with it). The current test suite can also be referenced by +@VALIDATIONKIT_ZIP@ in case more downloads are required. Files may also be +uploaded to the test manager download area, in which case the +@DOWNLOAD_BASE_URL@ prefix can be used to refer to this area.'; + +COMMENT ON TABLE TestCaseArgs IS + 'Test case argument list variations. + +For example, we have a test case that does a set of tests on a virtual +machine. To get better code/feature coverage of this testcase we wish to +run it with different guest hardware configuration. The test case may do +the same stuff, but the guest OS as well as the VMM may react differently to +the hardware configurations and uncover issues in the VMM, device emulation +or other places. + +Typical hardware variations are: + - guest memory size (RAM), + - guest video memory size (VRAM), + - virtual CPUs / cores / threads, + - virtual chipset + - virtual network interface card (NIC) + - USB 1.1, USB 2.0, no USB + +The TM web UI will help the user create a reasonable set of permutations +of these parameters, the user specifies a maximum and the TM uses certain +rules together with random selection to generate the desired number. The +UI will also help suggest fitting testbox requirements according to the +RAM/VRAM sizes and the virtual CPU counts. The user may then make +adjustments to the suggestions before commit them. + +Alternatively, the user may also enter all the permutations without any +help from the UI. + +Note! All test cases has at least one entry in this table, even if it is +empty, because testbox requirements are specified thru this. + +Querying the valid parameter lists for a testase this way: + SELECT * ... WHERE idTestCase = TestCases.idTestCase + AND tsExpire > + AND tsEffective <= ; + +Querying the valid parameter list for the latest generation can be +simplified by just checking tsExpire date: + SELECT * ... WHERE idTestCase = TestCases.idTestCase + AND tsExpire == TIMESTAMP WITH TIME ZONE ''infinity''; + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp.'; + +COMMENT ON COLUMN TestCaseArgs.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN TestCaseArgs.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN TestCaseArgs.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN TestCaseArgs.sArgs IS + 'The additional arguments. +String suitable for bourne shell style argument parsing with space as +separator (IFS). References to @BUILD_BINARIES@ will be replaced with +the content of the Builds(sBinaries) field.'; + +COMMENT ON COLUMN TestCaseArgs.cSecTimeout IS + 'Optional test case timeout given in seconds. +If NULL, the TestCases.cSecTimeout field is used instead.'; + +COMMENT ON COLUMN TestCaseArgs.sTestBoxReqExpr IS + 'Additional TestBox requirement expression (python boolean expression). +All the scheduler properties are available for use with the same names +as in that table. This is checked after first checking the requirements +in the TestCases.sTestBoxReqExpr field.'; + +COMMENT ON COLUMN TestCaseArgs.sBuildReqExpr IS + 'Additional build requirement expression (python boolean expression). +The following build properties are available: sProduct, sBranch, +sType, asOsArches, sVersion, iRevision, uidAuthor and idBuild. This is +checked after first checking the requirements in the +TestCases.sBuildReqExpr field.'; + +COMMENT ON COLUMN TestCaseArgs.cGangMembers IS + 'Number of testboxes required (gang scheduling).'; + +COMMENT ON COLUMN TestCaseArgs.sSubName IS + 'Optional variation sub-name.'; + +COMMENT ON INDEX TestCaseArgsLookupIdx IS + 'The arguments are part of the primary key for several reasons. +No duplicate argument lists (makes no sense - if you want to prioritize +argument lists, we add that explicitly). This may hopefully enable us +to more easily check coverage later on, even when the test case is +reconfigured with more/less permutations.'; + +COMMENT ON TABLE TestCaseDeps IS + 'Test case dependencies (N:M) + +This effect build selection. The build must have passed all runs of the +given prerequisite testcase (idTestCasePreReq) and executed at a minimum one +argument list variation. + +This should also affect scheduling order, if possible at least one +prerequisite testcase variation should be place before the specific testcase +in the scheduling queue. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN TestCaseDeps.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN TestCaseDeps.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN TestCaseDeps.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON TABLE TestCaseGlobalRsrcDeps IS + 'Test case dependencies on global resources (N:M) + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN TestCaseGlobalRsrcDeps.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN TestCaseGlobalRsrcDeps.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN TestCaseGlobalRsrcDeps.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON TABLE TestGroups IS + 'Test Group - A collection of test cases. + +This is for simplifying test configuration by working with a few groups +instead of a herd of individual testcases. It may also be used for creating +test suites for certain areas (like guest additions) or tasks (like +performance measurements). + +A test case can be member of any number of test groups. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN TestGroups.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN TestGroups.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN TestGroups.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN TestGroups.sName IS + 'The name of the scheduling group.'; + +COMMENT ON COLUMN TestGroups.sDescription IS + 'Optional group description.'; + +COMMENT ON TABLE TestGroupMembers IS + 'The N:M relationship between test case configurations and test groups. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN TestGroupMembers.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN TestGroupMembers.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN TestGroupMembers.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN TestGroupMembers.iSchedPriority IS + 'Test case scheduling priority. +Higher number causes the test case to be run more frequently. +@sa SchedGroupMembers.iSchedPriority, TestBoxesInSchedGroups.iSchedPriority +@todo Not sure we want to keep this...'; + +COMMENT ON TABLE SchedGroups IS + 'Scheduling group (aka. testbox partitioning) configuration. + +A testbox is associated with exactly one scheduling group. This association +can be changed, of course. If we (want to) retire a group which still has +testboxes associated with it, these will be moved to the ''default'' group. + +The TM web UI will make sure that a testbox is always in a group and that +the default group cannot be deleted. + +A scheduling group combines several things: + - A selection of builds to test (via idBuildSrc). + - A collection of test groups to test with (via SchedGroupMembers). + - A set of testboxes to test on (via TestBoxes.idSchedGroup). + +In additions there is an optional source of fresh test suite builds (think +VBoxTestSuite) as well as scheduling options. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN SchedGroups.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN SchedGroups.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN SchedGroups.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid) +@note This is NULL for the default group.'; + +COMMENT ON COLUMN SchedGroups.sName IS + 'The name of the scheduling group.'; + +COMMENT ON COLUMN SchedGroups.sDescription IS + 'Optional group description.'; + +COMMENT ON COLUMN SchedGroups.fEnabled IS + 'Indicates whether this group is currently enabled.'; + +COMMENT ON COLUMN SchedGroups.enmScheduler IS + 'The scheduler to use. +This is for when we later desire different scheduling that the best +effort stuff provided by the initial implementation.'; + +COMMENT ON COLUMN SchedGroups.sComment IS + 'The Validation Kit build source (@VALIDATIONKIT_ZIP@). +Non-unique foreign key: BuildSources(idBuildSrc)'; + +COMMENT ON TABLE SchedGroupMembers IS + 'N:M relationship between scheduling groups and test groups. + +Several scheduling parameters are associated with this relationship. + +The test group dependency (idTestGroupPreReq) can be used in the same way as +TestCaseDeps.idTestCasePreReq, only here on test group level. This means it +affects the build selection. The builds needs to have passed all test runs +the prerequisite test group and done at least one argument variation of each +test case in it. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN SchedGroupMembers.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN SchedGroupMembers.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN SchedGroupMembers.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN SchedGroupMembers.iSchedPriority IS + 'The scheduling priority of the test group. +Higher number causes the test case to be run more frequently. +@sa TestGroupMembers.iSchedPriority, TestBoxesInSchedGroups.iSchedPriority'; + +COMMENT ON COLUMN SchedGroupMembers.bmHourlySchedule IS + 'When during the week this group is allowed to start running, NULL means +there are no constraints. +Each bit in the bitstring represents one hour, with bit 0 indicating the +midnight hour on a monday.'; + +COMMENT ON TABLE TestBoxStrTab IS + 'String table for the test boxes. + +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 SUM(LENGTH(sReport)) was 993MB. There were really just 1066 distinct +sReport values, with a total length of 0x3 MB. + +Nothing is ever deleted from this table. + +@note Should use a stored procedure to query/insert a string. + + +TestBox stats prior to conversion: + SELECT COUNT(*) FROM TestBoxes: 400558 rows + SELECT pg_total_relation_size(''TestBoxes''): 740794368 bytes (706 MB) + Average row cost: 740794368 / 400558 = 1849 bytes/row + +After conversion: + SELECT COUNT(*) FROM TestBoxes: 400558 rows + SELECT pg_total_relation_size(''TestBoxes''): 144375808 bytes (138 MB) + SELECT COUNT(idStr) FROM TestBoxStrTab: 1292 rows + SELECT pg_total_relation_size(''TestBoxStrTab''): 5709824 bytes (5.5 MB) + (144375808 + 5709824) / 740794368 = 20 % + Average row cost boxes: 144375808 / 400558 = 360 bytes/row + Average row cost strings: 5709824 / 1292 = 4420 bytes/row'; + +COMMENT ON COLUMN TestBoxStrTab.sValue IS + 'The string value.'; + +COMMENT ON COLUMN TestBoxStrTab.tsCreated IS + 'Creation time stamp.'; + +COMMENT ON TYPE TestBoxCmd_T IS + 'Testbox commands.'; + +COMMENT ON TYPE LomKind_T IS + 'The kind of lights out management on a testbox.'; + +COMMENT ON TABLE TestBoxes IS + 'Testbox configurations. + +The testboxes are identified by IP and the system UUID if available. Should +the IP change, the testbox will be refused at sign on and the testbox +sheriff will have to update it''s IP. + +@todo Implement the UUID stuff. Get it from DMI, UEFI or whereever. + Mismatching needs to be logged somewhere... + +To query the currently valid configuration: + SELECT ... WHERE id = idTestBox AND tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''; + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN TestBoxes.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN TestBoxes.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN TestBoxes.uidAuthor IS + 'The user id of the one who created/modified this entry. +When modified automatically by the testbox, NULL is used. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN TestBoxes.uuidSystem IS + 'The system or firmware UUID. +This uniquely identifies the testbox when talking to the server. After +SIGNON though, the testbox will also provide idTestBox and ip to +establish its identity beyond doubt.'; + +COMMENT ON COLUMN TestBoxes.sName IS + 'The testbox name. +Usually similar to the DNS name.'; + +COMMENT ON COLUMN TestBoxes.fEnabled IS + 'Indicates whether this testbox is enabled. +A testbox gets disabled when we''re doing maintenance, debugging a issue +that happens only on that testbox, or some similar stuff. This is an +alternative to deleting the testbox.'; + +COMMENT ON COLUMN TestBoxes.enmLomKind IS + 'The kind of lights-out-management.'; + +COMMENT ON COLUMN TestBoxes.lCpuRevision IS + 'Number identifying the CPU family/model/stepping/whatever. +For x86 and AMD64 type CPUs, this will on the following format: + (EffFamily << 24) | (EffModel << 8) | Stepping.'; + +COMMENT ON COLUMN TestBoxes.cCpus IS + 'Number of CPUs, CPU cores and CPU threads.'; + +COMMENT ON COLUMN TestBoxes.fCpuHwVirt IS + 'Set if capable of hardware virtualization.'; + +COMMENT ON COLUMN TestBoxes.fCpuNestedPaging IS + 'Set if capable of nested paging.'; + +COMMENT ON COLUMN TestBoxes.fCpu64BitGuest IS + 'Set if CPU capable of 64-bit (VBox) guests.'; + +COMMENT ON COLUMN TestBoxes.fChipsetIoMmu IS + 'Set if chipset with usable IOMMU (VT-d / AMD-Vi).'; + +COMMENT ON COLUMN TestBoxes.fRawMode IS + 'Set if the test box does raw-mode tests.'; + +COMMENT ON COLUMN TestBoxes.cMbMemory IS + 'The (approximate) memory size in megabytes (rounded down to nearest 4 MB).'; + +COMMENT ON COLUMN TestBoxes.cMbScratch IS + 'The amount of scratch space in megabytes (rounded down to nearest 64 MB).'; + +COMMENT ON COLUMN TestBoxes.iTestBoxScriptRev IS + 'The testbox script revision number, serves the purpose of a version number. +Probably good to have when scheduling upgrades as well for status purposes.'; + +COMMENT ON COLUMN TestBoxes.iPythonHexVersion IS + 'The python sys.hexversion (layed out as of 2.7). +Good to know which python versions we need to support.'; + +COMMENT ON COLUMN TestBoxes.enmPendingCmd IS + 'Pending command. +@note We put it here instead of in TestBoxStatuses to get history.'; + +COMMENT ON INDEX TestBoxesUuidIdx IS + 'Nested paging requires hardware virtualization.'; + +COMMENT ON TABLE TestBoxesInSchedGroups IS + 'N:M relationship between test boxes and scheduling groups. + +We associate a priority with this relationship. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN TestBoxesInSchedGroups.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN TestBoxesInSchedGroups.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN TestBoxesInSchedGroups.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN TestBoxesInSchedGroups.iSchedPriority IS + 'The scheduling priority of the scheduling group for the test box. +Higher number causes the scheduling group to be serviced more frequently. +@sa TestGroupMembers.iSchedPriority, SchedGroups.iSchedPriority'; + +COMMENT ON TABLE FailureCategories IS + 'Failure categories. + +This is for organizing the failure reasons. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN FailureCategories.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN FailureCategories.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN FailureCategories.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN FailureCategories.sShort IS + 'The short category description. +For combo boxes and other selection lists.'; + +COMMENT ON COLUMN FailureCategories.sFull IS + 'Full description +For cursor-over-poppups for instance.'; + +COMMENT ON TABLE FailureReasons IS + 'Failure reasons. + +When analysing a test failure, the testbox sheriff will try assign a fitting +reason for the failure. This table is here to help the sheriff in his/hers +job as well as developers looking checking if their changes affected the +test results in any way. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN FailureReasons.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN FailureReasons.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN FailureReasons.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN FailureReasons.sShort IS + 'The short failure description. +For combo boxes and other selection lists.'; + +COMMENT ON COLUMN FailureReasons.sFull IS + 'Full failure description.'; + +COMMENT ON COLUMN FailureReasons.iTicket IS + 'Ticket number in the primary bugtracker.'; + +COMMENT ON COLUMN FailureReasons.asUrls IS + 'Other URLs to reports or discussions of the observed symptoms.'; + +COMMENT ON TABLE TestResultFailures IS + 'This is for tracking/discussing test result failures. + +The rational for putting this is a separate table is that we need history on +this while TestResults does not. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN TestResultFailures.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN TestResultFailures.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN TestResultFailures.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN TestResultFailures.sComment IS + 'Optional comment.'; + +COMMENT ON TABLE BuildBlacklist IS + 'Table used to blacklist sets of builds. + +The best usage example is a VMM developer realizing that a change causes the +host to panic, hang, or otherwise misbehave. To prevent the testbox sheriff +from repeatedly having to reboot testboxes, the builds gets blacklisted +until there is a working build again. This may mean adding an open ended +blacklist spec and then updating it with the final revision number once the +fix has been committed. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''. + +@todo Would be nice if we could replace the text strings below with a set of + BuildCategories, or sore it in any other way which would enable us to + do a negative join with build category... The way it is specified + now, it looks like we have to open a cursor of prospecitve builds and + filter then thru this table one by one. + + Any better representation is welcome, but this is low prioirty for + now, as it''s relatively easy to change this later one.'; + +COMMENT ON COLUMN BuildBlacklist.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN BuildBlacklist.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN BuildBlacklist.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid)'; + +COMMENT ON COLUMN BuildBlacklist.sProduct IS + 'Which product. +ASSUME that it is okay to limit a blacklisting to a single product.'; + +COMMENT ON COLUMN BuildBlacklist.sBranch IS + 'Which branch. +ASSUME that it is okay to limit a blacklisting to a branch.'; + +COMMENT ON COLUMN BuildBlacklist.asTypes IS + 'Build types to include, all matches if NULL.'; + +COMMENT ON COLUMN BuildBlacklist.asOsArches IS + 'Array of the ''sOs.sCpuArch'' to match, all matches if NULL. +See KBUILD_OSES in kBuild for a list of standard target OSes, and +KBUILD_ARCHES for a list of standard architectures. + +@remarks See marks on ''os-agnostic'' and ''noarch'' in BuildCategories.'; + +COMMENT ON COLUMN BuildBlacklist.iFirstRevision IS + 'The first subversion tree revision to blacklist.'; + +COMMENT ON COLUMN BuildBlacklist.iLastRevision IS + 'The last subversion tree revision to blacklist, no upper limit if NULL.'; + +COMMENT ON TABLE BuildCategories IS + 'Build categories. + +The purpose of this table is saving space in the Builds table and hopefully +speed things up when selecting builds as well (compared to selecting on 4 +text fields in the much larger Builds table). + +Insert only table, no update, no delete. History is not needed.'; + +COMMENT ON COLUMN BuildCategories.sProduct IS + 'Product. +The product name. For instance ''VBox'' or ''VBoxTestSuite''.'; + +COMMENT ON COLUMN BuildCategories.sRepository IS + 'The version control repository name.'; + +COMMENT ON COLUMN BuildCategories.sBranch IS + 'The branch name (in the version control system).'; + +COMMENT ON COLUMN BuildCategories.sType IS + 'The build type. +See KBUILD_BLD_TYPES in kBuild for a list of standard build types.'; + +COMMENT ON COLUMN BuildCategories.asOsArches IS + 'Array of the ''sOs.sCpuArch'' supported by the build. +See KBUILD_OSES in kBuild for a list of standard target OSes, and +KBUILD_ARCHES for a list of standard architectures. + +@remarks ''os-agnostic'' is used if the build doesn''t really target any + specific OS or if it targets all applicable OSes. + ''noarch'' is used if the build is architecture independent or if + all applicable architectures are handled. + Thus, ''os-agnostic.noarch'' will run on all build boxes. + +@note The array shall be sorted ascendingly to prevent unnecessary duplicates!'; + +COMMENT ON TABLE Builds IS + 'The builds table contains builds from the tinderboxes and oaccasionally from +developers. + +The tinderbox side could be fed by a batch job enumerating the build output +directories every so often, looking for new builds. Or we could query them +from the tinderbox database. Yet another alternative is making the +tinderbox server or client side software inform us about all new builds. + +The developer builds are entered manually thru the TM web UI. They are used +for subjecting new code to some larger scale testing before commiting, +enabling, or merging a private branch. + +The builds are being selected from this table by the via the build source +specification that SchedGroups.idBuildSrc and +SchedGroups.idBuildSrcTestSuite links to. + +@remarks This table stores history. Never update or delete anything. The + equivalent of deleting is done by setting the ''tsExpire'' field to + current_timestamp. To select the currently valid entries use + tsExpire = TIMESTAMP WITH TIME ZONE ''infinity''.'; + +COMMENT ON COLUMN Builds.tsCreated IS + 'When this build was created or entered into the database. +This remains unchanged'; + +COMMENT ON COLUMN Builds.tsEffective IS + 'When this row starts taking effect (inclusive).'; + +COMMENT ON COLUMN Builds.tsExpire IS + 'When this row stops being tsEffective (exclusive).'; + +COMMENT ON COLUMN Builds.uidAuthor IS + 'The user id of the one who created/modified this entry. +Non-unique foreign key: Users(uid) +@note This is NULL if added by a batch job / tinderbox.'; + +COMMENT ON COLUMN Builds.iRevision IS + 'The subversion tree revision of the build.'; + +COMMENT ON COLUMN Builds.sVersion IS + 'The product version number (suitable for RTStrVersionCompare).'; + +COMMENT ON COLUMN Builds.sLogUrl IS + 'The link to the tinderbox log of this build.'; + +COMMENT ON COLUMN Builds.sBinaries IS + 'Comma separated list of binaries. +The binaries have paths relative to the TESTBOX_PATH_BUILDS or full URLs.'; + +COMMENT ON COLUMN Builds.fBinariesDeleted IS + 'Set when the binaries gets deleted by the build quota script.'; + +COMMENT ON TABLE VcsRevisions IS + 'This table is for translating build revisions into commit details. + +For graphs and test results, it would be useful to translate revisions into +dates and maybe provide commit message and the committer. + +Data is entered exclusively thru one or more batch jobs, so no internal +authorship needed. Also, since we''re mirroring data from external sources +here, the batch job is allowed to update/replace existing records. + +@todo We we could collect more info from the version control systems, if we + believe it''s useful and can be presented in a reasonable manner. + Getting a list of affected files would be simple (requires + a separate table with a M:1 relationship to this table), or try + associate a commit to a branch.'; + +COMMENT ON COLUMN VcsRevisions.sRepository IS + 'The version control tree name.'; + +COMMENT ON COLUMN VcsRevisions.iRevision IS + 'The version control tree revision number.'; + +COMMENT ON COLUMN VcsRevisions.tsCreated IS + 'When the revision was created (committed).'; + +COMMENT ON COLUMN VcsRevisions.sAuthor IS + 'The name of the committer. +@note Not to be confused with uidAuthor and test manager users.'; + +COMMENT ON COLUMN VcsRevisions.sMessage IS + 'The commit message.'; + +COMMENT ON TABLE TestResultStrTab IS + 'String table for the test results. + +This is a string cache for value names, test names and possible more, that +is frequently repated in the test results record for each test run. The +purpose is not only to save space, but to make datamining queries faster by +giving them integer fields to work on instead of text fields. There may +possibly be some benefits on INSERT as well as there are only integer +indexes. + +Nothing is ever deleted from this table. + +@note Should use a stored procedure to query/insert a string.'; + +COMMENT ON COLUMN TestResultStrTab.sValue IS + 'The string value.'; + +COMMENT ON COLUMN TestResultStrTab.tsCreated IS + 'Creation time stamp.'; + +COMMENT ON TYPE TestStatus_T IS + 'The status of a test (set / result).'; + +COMMENT ON TABLE TestResults IS + 'Test results - a recursive bundle of joy! + +A test case will be created when the testdriver calls reporter.testStart and +concluded with reporter.testDone. The testdriver (or it subordinates) can +use these methods to create nested test results. For IPRT based test cases, +RTTestCreate, RTTestInitAndCreate and RTTestSub will both create new test +result records, where as RTTestSubDone, RTTestSummaryAndDestroy and +RTTestDestroy will conclude records. + +By concluding is meant updating the status. When the test driver reports +success, we check it against reported results. (paranoia strikes again!) + +Nothing is ever deleted from this table. + +@note As seen below, several other tables associate data with a + test result, and the top most test result is referenced by the + test set.'; + +COMMENT ON COLUMN TestResults.tsCreated IS + 'Creation time stamp. This may also be the timestamp of when the test started.'; + +COMMENT ON COLUMN TestResults.tsElapsed IS + 'The elapsed time for this test. +This is either reported by the directly (with some sanity checking) or +calculated (current_timestamp - created_ts). +@todo maybe use a nanosecond field here, check with what'; + +COMMENT ON COLUMN TestResults.cErrors IS + 'The error count.'; + +COMMENT ON COLUMN TestResults.enmStatus IS + 'The test status.'; + +COMMENT ON COLUMN TestResults.iNestingDepth IS + 'Nesting depth.'; + +COMMENT ON TABLE TestResultValues IS + 'Test result values. + +A testdriver or subordinate may report a test value via +reporter.testValue(), while IPRT based test will use RTTestValue and +associates. + +This is an insert only table, no deletes, no updates.'; + +COMMENT ON COLUMN TestResultValues.tsCreated IS + 'Creation time stamp.'; + +COMMENT ON COLUMN TestResultValues.lValue IS + 'The value.'; + +COMMENT ON COLUMN TestResultValues.iUnit IS + 'The unit. +@todo This is currently not defined properly. Will fix/correlate this + with the other places we use unit (IPRT/testdriver/VMMDev).'; + +COMMENT ON TABLE TestResultFiles IS + 'Test result files. + +A testdriver or subordinate may report a file by using +reporter.addFile() or reporter.addLogFile(). + +The files stored here as well as the primary log file will be processed by a +batch job and compressed if considered compressable. Thus, TM will look for +files with a .gz/.bz2 suffix first and then without a suffix. + +This is an insert only table, no deletes, no updates.'; + +COMMENT ON COLUMN TestResultFiles.tsCreated IS + 'Creation time stamp.'; + +COMMENT ON INDEX TestResultFilesIdx IS + 'The mime type for the file. +For instance: ''text/plain'', + ''image/png'', + ''video/webm'', + ''text/xml'''; + +COMMENT ON TABLE TestResultMsgs IS + 'Test result message. + +A testdriver or subordinate may report a message via the sDetails parameter +of the reporter.testFailure() method, while IPRT test cases will use +RTTestFailed, RTTestPrintf and their friends. For RTTestPrintf, we will +ignore the more verbose message levels since these can also be found in one +of the logs. + +This is an insert only table, no deletes, no updates.'; + +COMMENT ON COLUMN TestResultMsgs.tsCreated IS + 'Creation time stamp.'; + +COMMENT ON COLUMN TestResultMsgs.enmLevel IS + 'The message level.'; + +COMMENT ON TABLE TestSets IS + 'Test sets / Test case runs. + +This is where we collect data about test runs. + +@todo Not entirely sure where the ''test set'' term came from. Consider + finding something more appropriate.'; + +COMMENT ON COLUMN TestSets.tsConfig IS + 'The test config timestamp, used when reading test config.'; + +COMMENT ON COLUMN TestSets.tsCreated IS + 'When this test set was scheduled. +idGenTestBox is valid at this point.'; + +COMMENT ON COLUMN TestSets.tsDone IS + 'When this test completed, i.e. testing stopped. This should only be set once.'; + +COMMENT ON COLUMN TestSets.enmStatus IS + 'The current status.'; + +COMMENT ON COLUMN TestSets.sBaseFilename IS + 'The base filename used for storing files related to this test set. +This is a path relative to wherever TM is dumping log files. In order +to not become a file system test case, we will try not to put too many +hundred thousand files in a directory. A simple first approach would +be to just use the current date (tsCreated) like this: + TM_FILE_DIR/year/month/day/TestSets.idTestSet + +The primary log file for the test is this name suffixed by ''.log''. + +The files in the testresultfile table gets their full names like this: + TM_FILE_DIR/sBaseFilename-testresultfile.id-TestResultStrTab(testresultfile.idStrFilename) + +@remarks We store this explicitly in case we change the directly layout + at some later point.'; + +COMMENT ON COLUMN TestSets.iGangMemberNo IS + 'The gang member number number, 0 is the leader.'; + +COMMENT ON INDEX TestSetsGangIdx IS + 'The test set of the gang leader, NULL if no gang involved. +@note This is set by the gang leader as well, so that we can find all + gang members by WHERE idTestSetGangLeader = :id.'; + +COMMENT ON INDEX TestSetsDoneCreatedBuildCatIdx IS + 'The TestSetsDoneCreatedBuildCatIdx is for testbox results, graph options and such.'; + +COMMENT ON INDEX TestSetsGraphBoxIdx IS + 'For graphs.'; + +COMMENT ON TYPE TestBoxState_T IS + 'TestBox state. + +@todo Consider drawing a state diagram for this.'; + +COMMENT ON TABLE TestBoxStatuses IS + 'Testbox status table. + +History is not planned on this table.'; + +COMMENT ON COLUMN TestBoxStatuses.tsUpdated IS + 'When this status was last updated. +This is updated everytime the testbox talks to the test manager, thus it +can easily be used to find testboxes which has stopped responding. + +This is used for timeout calculation during gang-gathering, so in that +scenario it won''t be updated until the gang is gathered or we time out.'; + +COMMENT ON COLUMN TestBoxStatuses.enmState IS + 'The current state.'; + +COMMENT ON COLUMN TestBoxStatuses.iWorkItem IS + 'Interal work item number. +This is used to pick and prioritize between multiple scheduling groups.'; + +COMMENT ON TABLE GlobalResourceStatuses IS + 'Global resource status, tracks which test set resources are allocated by. + +History is not planned on this table.'; + +COMMENT ON COLUMN GlobalResourceStatuses.tsAllocated IS + 'When the allocation took place.'; + +COMMENT ON TABLE SchedQueues IS + 'Scheduler queue. + +The queues are currently associated with a scheduling group, it could +alternative be changed to hook on to a testbox instead. It depends on what +kind of scheduling method we prefer. The former method aims at test case +thruput, making sacrifices in the hardware distribution area. The latter is +more like the old buildbox style testing, making sure that each test case is +executed on each testbox. + +When there are configuration changes, TM will regenerate the scheduling +queue for the affected scheduling groups. We do not concern ourselves with +trying to continue at the approximately same queue position, we simply take +it from the top. + +When a testbox ask for work, we will open a cursor on the queue and take the +first test in the queue that can be executed on that testbox. The test will +be moved to the end of the queue (getting a new item_id). + +If a test is manually changed to the head of the queue, the item will get a +item_id which is 1 lower than the head of the queue. Unless someone does +this a couple of billion times, we shouldn''t have any trouble running out of +number space. :-) + +Manually moving a test to the end of the queue is easy, just get a new +''item_id''. + +History is not planned on this table.'; + +COMMENT ON COLUMN SchedQueues.bmHourlySchedule IS + 'The scheduling time constraints (see SchedGroupMembers.bmHourlySchedule).'; + +COMMENT ON COLUMN SchedQueues.tsConfig IS + 'When the queue entry was created and for which config is valid. +This is the timestamp that should be used when reading config info.'; + +COMMENT ON COLUMN SchedQueues.tsLastScheduled IS + 'When this status was last scheduled. +This is set to current_timestamp when moving the entry to the end of the +queue. It''s initial value is unix-epoch. Not entirely sure if it''s +useful beyond introspection and non-unique foreign key hacking.'; + +COMMENT ON COLUMN SchedQueues.cMissingGangMembers IS + 'The number of gang members still missing. + +This saves calculating the number of missing members via selects like: + SELECT COUNT(*) FROM TestSets WHERE idTestSetGangLeader = :idGang; +and + SELECT cGangMembers FROM TestCaseArgs WHERE idGenTestCaseArgs = :idTest; +to figure out whether to remain in ''gather-gang''::TestBoxState_T.'; + +COMMENT ON INDEX SchedQueuesItemIdx IS + 'The number of times this has been considered for scheduling. +cConsidered SMALLINT DEFAULT 0 NOT NULL,'; + diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseDefaultUserAccounts.pgsql b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseDefaultUserAccounts.pgsql new file mode 100644 index 00000000..992cab06 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseDefaultUserAccounts.pgsql @@ -0,0 +1,43 @@ +-- $Id: TestManagerDatabaseDefaultUserAccounts.pgsql $ +--- @file +-- VBox Test Manager default user account records creation script. +-- + +-- +-- Copyright (C) 2012-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +\set ON_ERROR_STOP 1 +\connect testmanager; + +-- Add record for user 'admin' +INSERT INTO Users (sUsername, sEmail, sFullName, sLoginName) + VALUES ('root', 'admin@example.org', 'Administrator', 'admin'); + diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseForeignKeyErHacks.pgsql b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseForeignKeyErHacks.pgsql new file mode 100644 index 00000000..5c567147 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseForeignKeyErHacks.pgsql @@ -0,0 +1,90 @@ +-- $Id: TestManagerDatabaseForeignKeyErHacks.pgsql $ +--- @file +-- VBox Test Manager Database Addendum that adds non-unique foreign keys. +-- +-- This is for getting better visualization in reverse engeering ER tools, +-- it is not for production databases. +-- + +-- +-- Copyright (C) 2012-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +\set ON_ERROR_STOP 1 +\connect testmanager + +ALTER TABLE TestCaseArgs + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idTestCase, tsExpire) REFERENCES TestCases(idTestCase, tsExpire) MATCH FULL; + +ALTER TABLE TestcaseDeps + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idTestCase, tsExpire) REFERENCES TestCases(idTestCase, tsExpire) MATCH FULL; +ALTER TABLE TestcaseDeps + ADD CONSTRAINT non_unique_fk2 FOREIGN KEY (idTestCasePreReq,tsExpire) REFERENCES TestCases(idTestCase, tsExpire) MATCH FULL; + +ALTER TABLE TestCaseGlobalRsrcDeps + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idTestCase, tsExpire) REFERENCES TestCases(idTestCase, tsExpire) MATCH FULL; +ALTER TABLE TestCaseGlobalRsrcDeps + ADD CONSTRAINT non_unique_fk2 FOREIGN KEY (idGlobalRsrc, tsExpire) REFERENCES GlobalResources(idGlobalRsrc, tsExpire) MATCH FULL; + +ALTER TABLE TestGroupMembers + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idTestGroup, tsExpire) REFERENCES TestGroups(idTestGroup, tsExpire) MATCH FULL; +ALTER TABLE TestGroupMembers + ADD CONSTRAINT non_unique_fk2 FOREIGN KEY (idTestCase, tsExpire) REFERENCES TestCases(idTestCase, tsExpire) MATCH FULL; + +ALTER TABLE SchedGroups + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idBuildSrc, tsExpire) REFERENCES BuildSources(idBuildSrc, tsExpire) MATCH SIMPLE; +ALTER TABLE SchedGroups + ADD CONSTRAINT non_unique_fk2 FOREIGN KEY (idBuildSrcTestSuite, tsExpire) REFERENCES BuildSources(idBuildSrc, tsExpire) MATCH SIMPLE; + +ALTER TABLE SchedGroupMembers + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idSchedGroup, tsExpire) REFERENCES SchedGroups(idSchedGroup, tsExpire) MATCH FULL; +ALTER TABLE SchedGroupMembers + ADD CONSTRAINT non_unique_fk2 FOREIGN KEY (idTestGroup, tsExpire) REFERENCES TestGroups(idTestGroup, tsExpire) MATCH FULL; +ALTER TABLE SchedGroupMembers + ADD CONSTRAINT non_unique_fk3 FOREIGN KEY (idTestGroupPreReq, tsExpire) REFERENCES TestGroups(idTestGroup, tsExpire) MATCH FULL; + +ALTER TABLE TestBoxes + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idSchedGroup, tsExpire) REFERENCES SchedGroups(idSchedGroup, tsExpire) MATCH FULL; + +ALTER TABLE FailureReasons + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idFailureCategory, tsExpire) REFERENCES FailureCategories(idFailureCategory, tsExpire) MATCH FULL; + +ALTER TABLE TestResultFailures + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idFailureReason, tsExpire) REFERENCES FailureReasons(idFailureReason, tsExpire) MATCH FULL; + +ALTER TABLE BuildBlacklist + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idFailureReason, tsExpire) REFERENCES FailureReasons(idFailureReason, tsExpire) MATCH FULL; + +ALTER TABLE GlobalResourceStatuses + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idGlobalRsrc, tsAllocated) REFERENCES GlobalResources(idGlobalRsrc, tsExpire) MATCH FULL; + +ALTER TABLE SchedQueues + ADD CONSTRAINT non_unique_fk1 FOREIGN KEY (idSchedGroup, tsLastScheduled) REFERENCES SchedGroups(idSchedGroup, tsExpire) MATCH FULL; + diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseForeignKeyErHacks2.pgsql b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseForeignKeyErHacks2.pgsql new file mode 100644 index 00000000..f81a941c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseForeignKeyErHacks2.pgsql @@ -0,0 +1,77 @@ +-- $Id: TestManagerDatabaseForeignKeyErHacks2.pgsql $ +--- @file +-- VBox Test Manager Database Addendum that adds non-unique foreign keys to Users. +-- +-- This is for getting better visualization in reverse engeering ER tools, +-- it is not for production databases. +-- + +-- +-- Copyright (C) 2012-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +\set ON_ERROR_STOP 1 +\connect testmanager + +ALTER TABLE GlobalResources + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE BuildSources + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE RequirementSets + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsCreated) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE TestCases + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE TestCaseArgs + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE TestcaseDeps + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE TestCaseGlobalRsrcDeps + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE TestGroups + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE TestGroupMembers + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE SchedGroups + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH SIMPLE; +ALTER TABLE SchedGroupMembers + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE TestBoxes + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE FailureCategories + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE FailureReasons + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE TestResultFailures + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE BuildBlacklist + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL; +ALTER TABLE Builds + ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsCreated) REFERENCES Users(uid, tsExpire) MATCH FULL; + diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql new file mode 100644 index 00000000..0c245aa4 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql @@ -0,0 +1,1950 @@ +-- $Id: TestManagerDatabaseInit.pgsql $ +--- @file +-- VBox Test Manager Database Creation script. +-- + +-- +-- Copyright (C) 2012-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Declaimer: +-- +-- The guys working on this design are not database experts, web +-- programming experts or similar, rather we are low level guys +-- who's main job is x86 & AMD64 virtualization. So, please don't +-- be too hard on us. :-) +-- +-- + + +-- D R O P D A T A B A S E t e s t m a n a g e r - - you do this now. +\set ON_ERROR_STOP 1 +CREATE DATABASE testmanager; +\connect testmanager; + + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +-- +-- S y s t e m +-- +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +--- +-- Log table for a few important events. +-- +-- Currently, two events are planned to be logged: +-- - Sign on of an unknown testbox, including the IP and System UUID. +-- This will be restricted to one entry per 24h or something like that: +-- SELECT COUNT(*) +-- FROM SystemLog +-- WHERE tsCreated >= (current_timestamp - interval '24 hours') +-- AND sEvent = 'TBoxUnkn' +-- AND sLogText = :sNewLogText; +-- - When cleaning up an abandoned testcase (scenario #9), log which +-- testbox abandoned which testset. +-- +-- The Web UI will have some way of displaying the log. +-- +-- A batch job should regularly clean out old log messages, like for instance +-- > 64 days. +-- +CREATE TABLE SystemLog ( + --- When this was logged. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- The event type. + -- This is a 8 character string identifier so that we don't need to change + -- some enum type everytime we introduce a new event type. + sEvent CHAR(8) NOT NULL, + --- The log text. + sLogText text NOT NULL, + + PRIMARY KEY (tsCreated, sEvent) +); + + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +-- +-- C o n f i g u r a t i o n +-- +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +--- @table Users +-- Test manager users. +-- +-- This is mainly for doing simple access checks before permitting access to +-- the test manager. This needs to be coordinated with +-- apache/ldap/Oracle-Single-Sign-On. +-- +-- The main purpose, though, is for tracing who changed the test config and +-- analysis data. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. +-- +CREATE SEQUENCE UserIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE Users ( + --- The user id. + uid INTEGER DEFAULT NEXTVAL('UserIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER DEFAULT NULL, + --- User name. + sUsername text NOT NULL, + --- The email address of the user. + sEmail text NOT NULL, + --- The full name. + sFullName text NOT NULL, + --- The login name used by apache. + sLoginName text NOT NULL, + --- Read access only. + fReadOnly BOOLEAN NOT NULL DEFAULT FALSE, + + PRIMARY KEY (uid, tsExpire) +); +CREATE INDEX UsersLoginNameIdx ON Users (sLoginName, tsExpire DESC); + + +--- @table GlobalResources +-- Global resource configuration. +-- +-- For example an iSCSI target. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. +-- +CREATE SEQUENCE GlobalResourceIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE GlobalResources ( + --- The global resource ID. + -- This stays the same thru updates. + idGlobalRsrc INTEGER DEFAULT NEXTVAL('GlobalResourceIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + --- The name of the resource. + sName text NOT NULL, + --- Optional resource description. + sDescription text, + --- Indicates whether this resource is currently enabled (online). + fEnabled boolean DEFAULT FALSE NOT NULL, + + PRIMARY KEY (idGlobalRsrc, tsExpire) +); + + +--- @table BuildSources +-- Build sources. +-- +-- This is used by a scheduling group to select builds and the default +-- Validation Kit from the Builds table. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. +-- +-- @todo Any better way of representing this so we could more easily +-- join/whatever when searching for builds? +-- +CREATE SEQUENCE BuildSourceIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE BuildSources ( + --- The build source identifier. + -- This stays constant over time. + idBuildSrc INTEGER DEFAULT NEXTVAL('BuildSourceIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + --- The name of the build source. + sName TEXT NOT NULL, + --- Description. + sDescription TEXT DEFAULT NULL, + + --- Which product. + -- ASSUME that it is okay to limit a build source to a single product. + sProduct text NOT NULL, + --- Which branch. + -- ASSUME that it is okay to limit a build source to a branch. + sBranch text NOT NULL, + + --- Build types to include, all matches if NULL. + -- @todo Weighting the types would be nice in a later version. + asTypes text ARRAY DEFAULT NULL, + --- Array of the 'sOs.sCpuArch' to match, all matches if NULL. + -- See KBUILD_OSES in kBuild for a list of standard target OSes, and + -- KBUILD_ARCHES for a list of standard architectures. + -- + -- @remarks See marks on 'os-agnostic' and 'noarch' in BuildCategories. + asOsArches text ARRAY DEFAULT NULL, + + --- The first subversion tree revision to match, no lower limit if NULL. + iFirstRevision INTEGER DEFAULT NULL, + --- The last subversion tree revision to match, no upper limit if NULL. + iLastRevision INTEGER DEFAULT NULL, + + --- The maximum age of the builds in seconds, unlimited if NULL. + cSecMaxAge INTEGER DEFAULT NULL, + + PRIMARY KEY (idBuildSrc, tsExpire) +); + + +--- @table TestCases +-- Test case configuration. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. +-- +CREATE SEQUENCE TestCaseIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE SEQUENCE TestCaseGenIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestCases ( + --- The fixed test case ID. + -- This is assigned when the test case is created and will never change. + idTestCase INTEGER DEFAULT NEXTVAL('TestCaseIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + --- Generation ID for this row, a truly unique identifier. + -- This is primarily for referencing by TestSets. + idGenTestCase INTEGER UNIQUE DEFAULT NEXTVAL('TestCaseGenIdSeq') NOT NULL, + + --- The name of the test case. + sName TEXT NOT NULL, + --- Optional test case description. + sDescription TEXT DEFAULT NULL, + --- Indicates whether this test case is currently enabled. + fEnabled BOOLEAN DEFAULT FALSE NOT NULL, + --- Default test case timeout given in seconds. + cSecTimeout INTEGER NOT NULL CHECK (cSecTimeout > 0), + --- Default TestBox requirement expression (python boolean expression). + -- All the scheduler properties are available for use with the same names + -- as in that table. + -- If NULL everything matches. + sTestBoxReqExpr TEXT DEFAULT NULL, + --- Default build requirement expression (python boolean expression). + -- The following build properties are available: sProduct, sBranch, + -- sType, asOsArches, sVersion, iRevision, uidAuthor and idBuild. + -- If NULL everything matches. + sBuildReqExpr TEXT DEFAULT NULL, + + --- The base command. + -- String suitable for executing in bourne shell with space as separator + -- (IFS). References to @BUILD_BINARIES@ will be replaced WITH the content + -- of the Builds(sBinaries) field. + sBaseCmd TEXT NOT NULL, + + --- Comma separated list of test suite zips (or tars) that the testbox will + -- need to download and expand prior to testing. + -- If NULL the current test suite of the scheduling group will be used (the + -- scheduling group will have an optional test suite build queue associated + -- with it). The current test suite can also be referenced by + -- @VALIDATIONKIT_ZIP@ in case more downloads are required. Files may also be + -- uploaded to the test manager download area, in which case the + -- @DOWNLOAD_BASE_URL@ prefix can be used to refer to this area. + sTestSuiteZips TEXT DEFAULT NULL, + + -- Comment regarding a change or something. + sComment TEXT DEFAULT NULL, + + PRIMARY KEY (idTestCase, tsExpire) +); + + +--- @table TestCaseArgs +-- Test case argument list variations. +-- +-- For example, we have a test case that does a set of tests on a virtual +-- machine. To get better code/feature coverage of this testcase we wish to +-- run it with different guest hardware configuration. The test case may do +-- the same stuff, but the guest OS as well as the VMM may react differently to +-- the hardware configurations and uncover issues in the VMM, device emulation +-- or other places. +-- +-- Typical hardware variations are: +-- - guest memory size (RAM), +-- - guest video memory size (VRAM), +-- - virtual CPUs / cores / threads, +-- - virtual chipset +-- - virtual network interface card (NIC) +-- - USB 1.1, USB 2.0, no USB +-- +-- The TM web UI will help the user create a reasonable set of permutations +-- of these parameters, the user specifies a maximum and the TM uses certain +-- rules together with random selection to generate the desired number. The +-- UI will also help suggest fitting testbox requirements according to the +-- RAM/VRAM sizes and the virtual CPU counts. The user may then make +-- adjustments to the suggestions before commit them. +-- +-- Alternatively, the user may also enter all the permutations without any +-- help from the UI. +-- +-- Note! All test cases has at least one entry in this table, even if it is +-- empty, because testbox requirements are specified thru this. +-- +-- Querying the valid parameter lists for a testase this way: +-- SELECT * ... WHERE idTestCase = TestCases.idTestCase +-- AND tsExpire > +-- AND tsEffective <= ; +-- +-- Querying the valid parameter list for the latest generation can be +-- simplified by just checking tsExpire date: +-- SELECT * ... WHERE idTestCase = TestCases.idTestCase +-- AND tsExpire == TIMESTAMP WITH TIME ZONE 'infinity'; +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. +-- +CREATE SEQUENCE TestCaseArgsIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE SEQUENCE TestCaseArgsGenIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestCaseArgs ( + --- The test case ID. + -- Non-unique foreign key: TestCases(idTestCase). + idTestCase INTEGER NOT NULL, + --- The testcase argument variation ID (fixed). + -- This is primarily for TestGroupMembers.aidTestCaseArgs. + idTestCaseArgs INTEGER DEFAULT NEXTVAL('TestCaseArgsIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + --- Generation ID for this row. + -- This is primarily for efficient referencing by TestSets and SchedQueues. + idGenTestCaseArgs INTEGER UNIQUE DEFAULT NEXTVAL('TestCaseArgsGenIdSeq') NOT NULL, + + --- The additional arguments. + -- String suitable for bourne shell style argument parsing with space as + -- separator (IFS). References to @BUILD_BINARIES@ will be replaced with + -- the content of the Builds(sBinaries) field. + sArgs TEXT NOT NULL, + --- Optional test case timeout given in seconds. + -- If NULL, the TestCases.cSecTimeout field is used instead. + cSecTimeout INTEGER DEFAULT NULL CHECK (cSecTimeout IS NULL OR cSecTimeout > 0), + --- Additional TestBox requirement expression (python boolean expression). + -- All the scheduler properties are available for use with the same names + -- as in that table. This is checked after first checking the requirements + -- in the TestCases.sTestBoxReqExpr field. + sTestBoxReqExpr TEXT DEFAULT NULL, + --- Additional build requirement expression (python boolean expression). + -- The following build properties are available: sProduct, sBranch, + -- sType, asOsArches, sVersion, iRevision, uidAuthor and idBuild. This is + -- checked after first checking the requirements in the + -- TestCases.sBuildReqExpr field. + sBuildReqExpr TEXT DEFAULT NULL, + --- Number of testboxes required (gang scheduling). + cGangMembers SMALLINT DEFAULT 1 NOT NULL CHECK (cGangMembers > 0 AND cGangMembers < 1024), + --- Optional variation sub-name. + sSubName TEXT DEFAULT NULL, + + --- The arguments are part of the primary key for several reasons. + -- No duplicate argument lists (makes no sense - if you want to prioritize + -- argument lists, we add that explicitly). This may hopefully enable us + -- to more easily check coverage later on, even when the test case is + -- reconfigured with more/less permutations. + PRIMARY KEY (idTestCase, tsExpire, sArgs) +); +CREATE INDEX TestCaseArgsLookupIdx ON TestCaseArgs (idTestCase, tsExpire DESC, tsEffective ASC); + + +--- @table TestCaseDeps +-- Test case dependencies (N:M) +-- +-- This effect build selection. The build must have passed all runs of the +-- given prerequisite testcase (idTestCasePreReq) and executed at a minimum one +-- argument list variation. +-- +-- This should also affect scheduling order, if possible at least one +-- prerequisite testcase variation should be place before the specific testcase +-- in the scheduling queue. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE TABLE TestCaseDeps ( + --- The test case that depends on someone. + -- Non-unique foreign key: TestCases(idTestCase). + idTestCase INTEGER NOT NULL, + --- The prerequisite test case ID. + -- Non-unique foreign key: TestCases(idTestCase). + idTestCasePreReq INTEGER NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + PRIMARY KEY (idTestCase, idTestCasePreReq, tsExpire) +); + + +--- @table TestCaseGlobalRsrcDeps +-- Test case dependencies on global resources (N:M) +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE TABLE TestCaseGlobalRsrcDeps ( + --- The test case that depends on someone. + -- Non-unique foreign key: TestCases(idTestCase). + idTestCase INTEGER NOT NULL, + --- The prerequisite resource ID. + -- Non-unique foreign key: GlobalResources(idGlobalRsrc). + idGlobalRsrc INTEGER NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + PRIMARY KEY (idTestCase, idGlobalRsrc, tsExpire) +); + + +--- @table TestGroups +-- Test Group - A collection of test cases. +-- +-- This is for simplifying test configuration by working with a few groups +-- instead of a herd of individual testcases. It may also be used for creating +-- test suites for certain areas (like guest additions) or tasks (like +-- performance measurements). +-- +-- A test case can be member of any number of test groups. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE SEQUENCE TestGroupIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestGroups ( + --- The fixed scheduling group ID. + -- This is assigned when the group is created and will never change. + idTestGroup INTEGER DEFAULT NEXTVAL('TestGroupIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + --- The name of the scheduling group. + sName TEXT NOT NULL, + --- Optional group description. + sDescription TEXT, + -- Comment regarding a change or something. + sComment TEXT DEFAULT NULL, + + PRIMARY KEY (idTestGroup, tsExpire) +); +CREATE INDEX TestGroups_id_index ON TestGroups (idTestGroup, tsExpire DESC, tsEffective ASC); + + +--- @table TestGroupMembers +-- The N:M relationship between test case configurations and test groups. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE TABLE TestGroupMembers ( + --- The group ID. + -- Non-unique foreign key: TestGroups(idTestGroup). + idTestGroup INTEGER NOT NULL, + --- The test case ID. + -- Non-unique foreign key: TestCases(idTestCase). + idTestCase INTEGER NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + --- Test case scheduling priority. + -- Higher number causes the test case to be run more frequently. + -- @sa SchedGroupMembers.iSchedPriority, TestBoxesInSchedGroups.iSchedPriority + -- @todo Not sure we want to keep this... + iSchedPriority INTEGER DEFAULT 16 CHECK (iSchedPriority >= 0 AND iSchedPriority < 32) NOT NULL, + + --- Limit the memberships to the given argument variations. + -- Non-unique foreign key: TestCaseArgs(idTestCase, idTestCaseArgs). + aidTestCaseArgs INTEGER ARRAY DEFAULT NULL, + + PRIMARY KEY (idTestGroup, idTestCase, tsExpire) +); + + +--- @table SchedGroups +-- Scheduling group (aka. testbox partitioning) configuration. +-- +-- A testbox is associated with exactly one scheduling group. This association +-- can be changed, of course. If we (want to) retire a group which still has +-- testboxes associated with it, these will be moved to the 'default' group. +-- +-- The TM web UI will make sure that a testbox is always in a group and that +-- the default group cannot be deleted. +-- +-- A scheduling group combines several things: +-- - A selection of builds to test (via idBuildSrc). +-- - A collection of test groups to test with (via SchedGroupMembers). +-- - A set of testboxes to test on (via TestBoxes.idSchedGroup). +-- +-- In additions there is an optional source of fresh test suite builds (think +-- VBoxTestSuite) as well as scheduling options. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE TYPE Scheduler_T AS ENUM ( + 'bestEffortContinousItegration', + 'reserved' +); +CREATE SEQUENCE SchedGroupIdSeq + START 2 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE SchedGroups ( + --- The fixed scheduling group ID. + -- This is assigned when the group is created and will never change. + idSchedGroup INTEGER DEFAULT NEXTVAL('SchedGroupIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + -- @note This is NULL for the default group. + uidAuthor INTEGER DEFAULT NULL, + + --- The name of the scheduling group. + sName TEXT NOT NULL, + --- Optional group description. + sDescription TEXT, + --- Indicates whether this group is currently enabled. + fEnabled boolean NOT NULL, + --- The scheduler to use. + -- This is for when we later desire different scheduling that the best + -- effort stuff provided by the initial implementation. + enmScheduler Scheduler_T DEFAULT 'bestEffortContinousItegration'::Scheduler_T NOT NULL, + --- The build source. + -- Non-unique foreign key: BuildSources(idBuildSrc) + idBuildSrc INTEGER DEFAULT NULL, + --- The Validation Kit build source (@VALIDATIONKIT_ZIP@). + -- Non-unique foreign key: BuildSources(idBuildSrc) + idBuildSrcTestSuite INTEGER DEFAULT NULL, + -- Comment regarding a change or something. + sComment TEXT DEFAULT NULL, + + PRIMARY KEY (idSchedGroup, tsExpire) +); + +-- Special default group. +INSERT INTO SchedGroups (idSchedGroup, tsEffective, tsExpire, sName, sDescription, fEnabled) + VALUES (1, TIMESTAMP WITH TIME ZONE 'epoch', TIMESTAMP WITH TIME ZONE 'infinity', 'default', 'default group', FALSE); + + +--- @table SchedGroupMembers +-- N:M relationship between scheduling groups and test groups. +-- +-- Several scheduling parameters are associated with this relationship. +-- +-- The test group dependency (idTestGroupPreReq) can be used in the same way as +-- TestCaseDeps.idTestCasePreReq, only here on test group level. This means it +-- affects the build selection. The builds needs to have passed all test runs +-- the prerequisite test group and done at least one argument variation of each +-- test case in it. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE TABLE SchedGroupMembers ( + --- Scheduling ID. + -- Non-unique foreign key: SchedGroups(idSchedGroup). + idSchedGroup INTEGER NOT NULL, + --- Testgroup ID. + -- Non-unique foreign key: TestGroups(idTestGroup). + idTestGroup INTEGER NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + --- The scheduling priority of the test group. + -- Higher number causes the test case to be run more frequently. + -- @sa TestGroupMembers.iSchedPriority, TestBoxesInSchedGroups.iSchedPriority + iSchedPriority INTEGER DEFAULT 16 CHECK (iSchedPriority >= 0 AND iSchedPriority < 32) NOT NULL, + --- When during the week this group is allowed to start running, NULL means + -- there are no constraints. + -- Each bit in the bitstring represents one hour, with bit 0 indicating the + -- midnight hour on a monday. + bmHourlySchedule bit(168) DEFAULT NULL, + --- Optional test group dependency. + -- Non-unique foreign key: TestGroups(idTestGroup). + -- This is for requiring that a build has been subject to smoke tests + -- before bothering to subject it to longer tests. + -- @todo Not entirely sure this should be here, but I'm not so keen on yet + -- another table as the only use case is smoketests. + idTestGroupPreReq INTEGER DEFAULT NULL, + + PRIMARY KEY (idSchedGroup, idTestGroup, tsExpire) +); + + +--- @table TestBoxStrTab +-- String table for the test boxes. +-- +-- 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 SUM(LENGTH(sReport)) was 993MB. There were really just 1066 distinct +-- sReport values, with a total length of 0x3 MB. +-- +-- Nothing is ever deleted from this table. +-- +-- @note Should use a stored procedure to query/insert a string. +-- +-- +-- TestBox stats prior to conversion: +-- SELECT COUNT(*) FROM TestBoxes: 400558 rows +-- SELECT pg_total_relation_size('TestBoxes'): 740794368 bytes (706 MB) +-- Average row cost: 740794368 / 400558 = 1849 bytes/row +-- +-- After conversion: +-- SELECT COUNT(*) FROM TestBoxes: 400558 rows +-- SELECT pg_total_relation_size('TestBoxes'): 144375808 bytes (138 MB) +-- SELECT COUNT(idStr) FROM TestBoxStrTab: 1292 rows +-- SELECT pg_total_relation_size('TestBoxStrTab'): 5709824 bytes (5.5 MB) +-- (144375808 + 5709824) / 740794368 = 20 % +-- Average row cost boxes: 144375808 / 400558 = 360 bytes/row +-- Average row cost strings: 5709824 / 1292 = 4420 bytes/row +-- +CREATE SEQUENCE TestBoxStrTabIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestBoxStrTab ( + --- The ID of this string. + idStr INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestBoxStrTabIdSeq'), + --- The string value. + sValue text NOT NULL, + --- Creation time stamp. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL +); +-- Note! Must use hash index as the sReport strings are too long for regular indexing. +CREATE INDEX TestBoxStrTabNameIdx ON TestBoxStrTab USING hash (sValue); + +--- Empty string with ID 0. +INSERT INTO TestBoxStrTab (idStr, sValue) VALUES (0, ''); + + +--- @type TestBoxCmd_T +-- Testbox commands. +CREATE TYPE TestBoxCmd_T AS ENUM ( + 'none', + 'abort', + 'reboot', --< This implies abort. Status changes when reaching 'idle'. + 'upgrade', --< This is only handled when asking for work. + 'upgrade-and-reboot', --< Ditto. + 'special' --< Similar to upgrade, reserved for the future. +); + + +--- @type LomKind_T +-- The kind of lights out management on a testbox. +CREATE TYPE LomKind_T AS ENUM ( + 'none', + 'ilom', + 'elom', + 'apple-xserve-lom' +); + + +--- @table TestBoxes +-- Testbox configurations. +-- +-- The testboxes are identified by IP and the system UUID if available. Should +-- the IP change, the testbox will be refused at sign on and the testbox +-- sheriff will have to update it's IP. +-- +-- @todo Implement the UUID stuff. Get it from DMI, UEFI or whereever. +-- Mismatching needs to be logged somewhere... +-- +-- To query the currently valid configuration: +-- SELECT ... WHERE id = idTestBox AND tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'; +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE SEQUENCE TestBoxIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE SEQUENCE TestBoxGenIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestBoxes ( + --- The fixed testbox ID. + -- This is assigned when the testbox is created and will never change. + idTestBox INTEGER DEFAULT NEXTVAL('TestBoxIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- When modified automatically by the testbox, NULL is used. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER DEFAULT NULL, + --- Generation ID for this row. + -- This is primarily for referencing by TestSets. + idGenTestBox INTEGER UNIQUE DEFAULT NEXTVAL('TestBoxGenIdSeq') NOT NULL, + + --- The testbox IP. + -- This is from the webserver point of view and automatically updated on + -- SIGNON. The test setup doesn't permit for IP addresses to change while + -- the testbox is operational, because this will break gang tests. + ip inet NOT NULL, + --- The system or firmware UUID. + -- This uniquely identifies the testbox when talking to the server. After + -- SIGNON though, the testbox will also provide idTestBox and ip to + -- establish its identity beyond doubt. + uuidSystem uuid NOT NULL, + --- The testbox name. + -- Usually similar to the DNS name. + sName text NOT NULL, + --- Optional testbox description. + -- Intended for describing the box as well as making other relevant notes. + idStrDescription INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + + --- Indicates whether this testbox is enabled. + -- A testbox gets disabled when we're doing maintenance, debugging a issue + -- that happens only on that testbox, or some similar stuff. This is an + -- alternative to deleting the testbox. + fEnabled BOOLEAN DEFAULT NULL, + + --- The kind of lights-out-management. + enmLomKind LomKind_T DEFAULT 'none'::LomKind_T NOT NULL, + --- The IP adress of the lights-out-management. + -- This can be NULL if enmLomKind is 'none', otherwise it must contain a valid address. + ipLom inet DEFAULT NULL, + + --- Timeout scale factor, given as a percent. + -- This is a crude adjustment of the test case timeout for slower hardware. + pctScaleTimeout smallint DEFAULT 100 NOT NULL CHECK (pctScaleTimeout > 10 AND pctScaleTimeout < 20000), + + --- Change comment or similar. + idStrComment INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + + --- @name Scheduling properties (reported by testbox script). + -- @{ + --- Same abbrieviations as kBuild, see KBUILD_OSES. + idStrOs INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- Informational, no fixed format. + idStrOsVersion INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- Same as CPUID reports (GenuineIntel, AuthenticAMD, CentaurHauls, ...). + idStrCpuVendor INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- Same as kBuild - x86, amd64, ... See KBUILD_ARCHES. + idStrCpuArch INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- The CPU name if available. + idStrCpuName INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- Number identifying the CPU family/model/stepping/whatever. + -- For x86 and AMD64 type CPUs, this will on the following format: + -- (EffFamily << 24) | (EffModel << 8) | Stepping. + lCpuRevision bigint DEFAULT NULL, + --- Number of CPUs, CPU cores and CPU threads. + cCpus smallint DEFAULT NULL CHECK (cCpus IS NULL OR cCpus > 0), + --- Set if capable of hardware virtualization. + fCpuHwVirt boolean DEFAULT NULL, + --- Set if capable of nested paging. + fCpuNestedPaging boolean DEFAULT NULL, + --- Set if CPU capable of 64-bit (VBox) guests. + fCpu64BitGuest boolean DEFAULT NULL, + --- Set if chipset with usable IOMMU (VT-d / AMD-Vi). + fChipsetIoMmu boolean DEFAULT NULL, + --- Set if the test box does raw-mode tests. + fRawMode boolean DEFAULT NULL, + --- The (approximate) memory size in megabytes (rounded down to nearest 4 MB). + cMbMemory bigint DEFAULT NULL CHECK (cMbMemory IS NULL OR cMbMemory > 0), + --- The amount of scratch space in megabytes (rounded down to nearest 64 MB). + cMbScratch bigint DEFAULT NULL CHECK (cMbScratch IS NULL OR cMbScratch >= 0), + --- Free form hardware and software report field. + idStrReport INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- @} + + --- The testbox script revision number, serves the purpose of a version number. + -- Probably good to have when scheduling upgrades as well for status purposes. + iTestBoxScriptRev INTEGER DEFAULT 0 NOT NULL, + --- The python sys.hexversion (layed out as of 2.7). + -- Good to know which python versions we need to support. + iPythonHexVersion INTEGER DEFAULT NULL, + + --- Pending command. + -- @note We put it here instead of in TestBoxStatuses to get history. + enmPendingCmd TestBoxCmd_T DEFAULT 'none'::TestBoxCmd_T NOT NULL, + + PRIMARY KEY (idTestBox, tsExpire), + + --- Nested paging requires hardware virtualization. + CHECK (fCpuNestedPaging IS NULL OR (fCpuNestedPaging <> TRUE OR fCpuHwVirt = TRUE)) +); +CREATE UNIQUE INDEX TestBoxesUuidIdx ON TestBoxes (uuidSystem, tsExpire DESC); +CREATE INDEX TestBoxesExpireEffectiveIdx ON TestBoxes (tsExpire DESC, tsEffective ASC); + + +-- +-- Create a view for TestBoxes where the strings are resolved. +-- +CREATE VIEW TestBoxesWithStrings AS + SELECT TestBoxes.*, + Str1.sValue AS sDescription, + Str2.sValue AS sComment, + Str3.sValue AS sOs, + Str4.sValue AS sOsVersion, + Str5.sValue AS sCpuVendor, + Str6.sValue AS sCpuArch, + Str7.sValue AS sCpuName, + Str8.sValue AS sReport + FROM TestBoxes + LEFT OUTER JOIN TestBoxStrTab Str1 ON idStrDescription = Str1.idStr + LEFT OUTER JOIN TestBoxStrTab Str2 ON idStrComment = Str2.idStr + LEFT OUTER JOIN TestBoxStrTab Str3 ON idStrOs = Str3.idStr + LEFT OUTER JOIN TestBoxStrTab Str4 ON idStrOsVersion = Str4.idStr + LEFT OUTER JOIN TestBoxStrTab Str5 ON idStrCpuVendor = Str5.idStr + LEFT OUTER JOIN TestBoxStrTab Str6 ON idStrCpuArch = Str6.idStr + LEFT OUTER JOIN TestBoxStrTab Str7 ON idStrCpuName = Str7.idStr + LEFT OUTER JOIN TestBoxStrTab Str8 ON idStrReport = Str8.idStr; + + +--- @table TestBoxesInSchedGroups +-- N:M relationship between test boxes and scheduling groups. +-- +-- We associate a priority with this relationship. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE TABLE TestBoxesInSchedGroups ( + --- TestBox ID. + -- Non-unique foreign key: TestBoxes(idTestBox). + idTestBox INTEGER NOT NULL, + --- Scheduling ID. + -- Non-unique foreign key: SchedGroups(idSchedGroup). + idSchedGroup INTEGER NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + --- The scheduling priority of the scheduling group for the test box. + -- Higher number causes the scheduling group to be serviced more frequently. + -- @sa TestGroupMembers.iSchedPriority, SchedGroups.iSchedPriority + iSchedPriority INTEGER DEFAULT 16 CHECK (iSchedPriority >= 0 AND iSchedPriority < 32) NOT NULL, + + PRIMARY KEY (idTestBox, idSchedGroup, tsExpire) +); + + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +-- +-- F a i l u r e T r a c k i n g +-- +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + + +--- @table FailureCategories +-- Failure categories. +-- +-- This is for organizing the failure reasons. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE SEQUENCE FailureCategoryIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE FailureCategories ( + --- The identifier of this failure category (once assigned, it will never change). + idFailureCategory INTEGER DEFAULT NEXTVAL('FailureCategoryIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + --- The short category description. + -- For combo boxes and other selection lists. + sShort text NOT NULL, + --- Full description + -- For cursor-over-poppups for instance. + sFull text NOT NULL, + + PRIMARY KEY (idFailureCategory, tsExpire) +); + + +--- @table FailureReasons +-- Failure reasons. +-- +-- When analysing a test failure, the testbox sheriff will try assign a fitting +-- reason for the failure. This table is here to help the sheriff in his/hers +-- job as well as developers looking checking if their changes affected the +-- test results in any way. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE SEQUENCE FailureReasonIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE FailureReasons ( + --- The identifier of this failure reason (once assigned, it will never change). + idFailureReason INTEGER DEFAULT NEXTVAL('FailureReasonIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + --- The failure category this reason belongs to. + -- Non-unique foreign key: FailureCategories(idFailureCategory) + idFailureCategory INTEGER NOT NULL, + --- The short failure description. + -- For combo boxes and other selection lists. + sShort text NOT NULL, + --- Full failure description. + sFull text NOT NULL, + --- Ticket number in the primary bugtracker. + iTicket INTEGER DEFAULT NULL, + --- Other URLs to reports or discussions of the observed symptoms. + asUrls text ARRAY DEFAULT NULL, + + PRIMARY KEY (idFailureReason, tsExpire) +); +CREATE INDEX FailureReasonsCategoryIdx ON FailureReasons (idFailureCategory, idFailureReason); + + + +--- @table TestResultFailures +-- This is for tracking/discussing test result failures. +-- +-- The rational for putting this is a separate table is that we need history on +-- this while TestResults does not. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE TABLE TestResultFailures ( + --- The test result we're disucssing. + -- @note The foreign key is declared after TestResults (further down). + idTestResult INTEGER NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + --- The testsest this result is a part of. + -- This is mainly an aid for bypassing the enormous TestResults table. + -- Note! This is a foreign key, but we have to add it after TestSets has + -- been created, see further down. + idTestSet INTEGER NOT NULL, + + --- The suggested failure reason. + -- Non-unique foreign key: FailureReasons(idFailureReason) + idFailureReason INTEGER NOT NULL, + --- Optional comment. + sComment text DEFAULT NULL, + + PRIMARY KEY (idTestResult, tsExpire) +); +CREATE INDEX TestResultFailureIdx ON TestResultFailures (idTestSet, tsExpire DESC, tsEffective ASC); +CREATE INDEX TestResultFailureIdx2 ON TestResultFailures (idTestResult, tsExpire DESC, tsEffective ASC); +CREATE INDEX TestResultFailureIdx3 ON TestResultFailures (idFailureReason, idTestResult, tsExpire DESC, tsEffective ASC); + + + + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +-- +-- T e s t I n p u t +-- +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + + +--- @table BuildBlacklist +-- Table used to blacklist sets of builds. +-- +-- The best usage example is a VMM developer realizing that a change causes the +-- host to panic, hang, or otherwise misbehave. To prevent the testbox sheriff +-- from repeatedly having to reboot testboxes, the builds gets blacklisted +-- until there is a working build again. This may mean adding an open ended +-- blacklist spec and then updating it with the final revision number once the +-- fix has been committed. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +-- @todo Would be nice if we could replace the text strings below with a set of +-- BuildCategories, or sore it in any other way which would enable us to +-- do a negative join with build category... The way it is specified +-- now, it looks like we have to open a cursor of prospecitve builds and +-- filter then thru this table one by one. +-- +-- Any better representation is welcome, but this is low prioirty for +-- now, as it's relatively easy to change this later one. +-- +CREATE SEQUENCE BuildBlacklistIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE BuildBlacklist ( + --- The blacklist entry id. + -- This stays constant over time. + idBlacklisting INTEGER DEFAULT NEXTVAL('BuildBlacklistIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + --- The reason for the blacklisting. + -- Non-unique foreign key: FailureReasons(idFailureReason) + idFailureReason INTEGER NOT NULL, + + --- Which product. + -- ASSUME that it is okay to limit a blacklisting to a single product. + sProduct text NOT NULL, + --- Which branch. + -- ASSUME that it is okay to limit a blacklisting to a branch. + sBranch text NOT NULL, + + --- Build types to include, all matches if NULL. + asTypes text ARRAY DEFAULT NULL, + --- Array of the 'sOs.sCpuArch' to match, all matches if NULL. + -- See KBUILD_OSES in kBuild for a list of standard target OSes, and + -- KBUILD_ARCHES for a list of standard architectures. + -- + -- @remarks See marks on 'os-agnostic' and 'noarch' in BuildCategories. + asOsArches text ARRAY DEFAULT NULL, + + --- The first subversion tree revision to blacklist. + iFirstRevision INTEGER NOT NULL, + --- The last subversion tree revision to blacklist, no upper limit if NULL. + iLastRevision INTEGER NOT NULL, + + PRIMARY KEY (idBlacklisting, tsExpire) +); +CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch, + tsExpire DESC, tsEffective ASC); + +--- @table BuildCategories +-- Build categories. +-- +-- The purpose of this table is saving space in the Builds table and hopefully +-- speed things up when selecting builds as well (compared to selecting on 4 +-- text fields in the much larger Builds table). +-- +-- Insert only table, no update, no delete. History is not needed. +-- +CREATE SEQUENCE BuildCategoryIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE BuildCategories ( + --- The build type identifier. + idBuildCategory INTEGER PRIMARY KEY DEFAULT NEXTVAL('BuildCategoryIdSeq') NOT NULL, + --- Product. + -- The product name. For instance 'VBox' or 'VBoxTestSuite'. + sProduct TEXT NOT NULL, + --- The version control repository name. + sRepository TEXT NOT NULL, + --- The branch name (in the version control system). + sBranch TEXT NOT NULL, + --- The build type. + -- See KBUILD_BLD_TYPES in kBuild for a list of standard build types. + sType TEXT NOT NULL, + --- Array of the 'sOs.sCpuArch' supported by the build. + -- See KBUILD_OSES in kBuild for a list of standard target OSes, and + -- KBUILD_ARCHES for a list of standard architectures. + -- + -- @remarks 'os-agnostic' is used if the build doesn't really target any + -- specific OS or if it targets all applicable OSes. + -- 'noarch' is used if the build is architecture independent or if + -- all applicable architectures are handled. + -- Thus, 'os-agnostic.noarch' will run on all build boxes. + -- + -- @note The array shall be sorted ascendingly to prevent unnecessary duplicates! + -- + asOsArches TEXT ARRAY NOT NULL, + + UNIQUE (sProduct, sRepository, sBranch, sType, asOsArches) +); + + +--- @table Builds +-- The builds table contains builds from the tinderboxes and oaccasionally from +-- developers. +-- +-- The tinderbox side could be fed by a batch job enumerating the build output +-- directories every so often, looking for new builds. Or we could query them +-- from the tinderbox database. Yet another alternative is making the +-- tinderbox server or client side software inform us about all new builds. +-- +-- The developer builds are entered manually thru the TM web UI. They are used +-- for subjecting new code to some larger scale testing before commiting, +-- enabling, or merging a private branch. +-- +-- The builds are being selected from this table by the via the build source +-- specification that SchedGroups.idBuildSrc and +-- SchedGroups.idBuildSrcTestSuite links to. +-- +-- @remarks This table stores history. Never update or delete anything. The +-- equivalent of deleting is done by setting the 'tsExpire' field to +-- current_timestamp. To select the currently valid entries use +-- tsExpire = TIMESTAMP WITH TIME ZONE 'infinity'. +-- +CREATE SEQUENCE BuildIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE Builds ( + --- The build identifier. + -- This remains unchanged + idBuild INTEGER DEFAULT NEXTVAL('BuildIdSeq') NOT NULL, + --- When this build was created or entered into the database. + -- This remains unchanged + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + -- @note This is NULL if added by a batch job / tinderbox. + uidAuthor INTEGER DEFAULT NULL, + --- The build category. + idBuildCategory INTEGER REFERENCES BuildCategories(idBuildCategory) NOT NULL, + --- The subversion tree revision of the build. + iRevision INTEGER NOT NULL, + --- The product version number (suitable for RTStrVersionCompare). + sVersion TEXT NOT NULL, + --- The link to the tinderbox log of this build. + sLogUrl TEXT, + --- Comma separated list of binaries. + -- The binaries have paths relative to the TESTBOX_PATH_BUILDS or full URLs. + sBinaries TEXT NOT NULL, + --- Set when the binaries gets deleted by the build quota script. + fBinariesDeleted BOOLEAN DEFAULT FALSE NOT NULL, + + UNIQUE (idBuild, tsExpire) +); +CREATE INDEX BuildsLookupIdx ON Builds (idBuildCategory, iRevision); + + +--- @table VcsRevisions +-- This table is for translating build revisions into commit details. +-- +-- For graphs and test results, it would be useful to translate revisions into +-- dates and maybe provide commit message and the committer. +-- +-- Data is entered exclusively thru one or more batch jobs, so no internal +-- authorship needed. Also, since we're mirroring data from external sources +-- here, the batch job is allowed to update/replace existing records. +-- +-- @todo We we could collect more info from the version control systems, if we +-- believe it's useful and can be presented in a reasonable manner. +-- Getting a list of affected files would be simple (requires +-- a separate table with a M:1 relationship to this table), or try +-- associate a commit to a branch. +-- +CREATE TABLE VcsRevisions ( + --- The version control tree name. + sRepository TEXT NOT NULL, + --- The version control tree revision number. + iRevision INTEGER NOT NULL, + --- When the revision was created (committed). + tsCreated TIMESTAMP WITH TIME ZONE NOT NULL, + --- The name of the committer. + -- @note Not to be confused with uidAuthor and test manager users. + sAuthor TEXT, + --- The commit message. + sMessage TEXT, + + UNIQUE (sRepository, iRevision) +); +CREATE INDEX VcsRevisionsByDate ON VcsRevisions (tsCreated DESC); + + +--- @table VcsBugReferences +-- This is for relating commits to a bug and vice versa. +-- +-- This feature isn't so much for the test manager as a cheap way of extending +-- bug trackers without VCS integration. We just need to parse the commit +-- messages when inserting them into the VcsRevisions table. +-- +-- Same input, updating and history considerations as VcsRevisions. +-- +CREATE TABLE VcsBugReferences ( + --- The version control tree name. + sRepository TEXT NOT NULL, + --- The version control tree revision number. + iRevision INTEGER NOT NULL, + --- The bug tracker identifier - see g_kdBugTrackers in config.py. + sBugTracker CHAR(4) NOT NULL, + --- The bug number in the bug tracker. + lBugNo BIGINT NOT NULL, + + UNIQUE (sRepository, iRevision, sBugTracker, lBugNo) +); +CREATE INDEX VcsBugReferencesLookupIdx ON VcsBugReferences (sBugTracker, lBugNo); + + + + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +-- +-- T e s t R e s u l t s +-- +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + + +--- @table TestResultStrTab +-- String table for the test results. +-- +-- This is a string cache for value names, test names and possible more, that +-- is frequently repated in the test results record for each test run. The +-- purpose is not only to save space, but to make datamining queries faster by +-- giving them integer fields to work on instead of text fields. There may +-- possibly be some benefits on INSERT as well as there are only integer +-- indexes. +-- +-- Nothing is ever deleted from this table. +-- +-- @note Should use a stored procedure to query/insert a string. +-- +CREATE SEQUENCE TestResultStrTabIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestResultStrTab ( + --- The ID of this string. + idStr INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestResultStrTabIdSeq'), + --- The string value. + sValue text NOT NULL, + --- Creation time stamp. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL +); +CREATE UNIQUE INDEX TestResultStrTabNameIdx ON TestResultStrTab (sValue); + +--- Empty string with ID 0. +INSERT INTO TestResultStrTab (idStr, sValue) VALUES (0, ''); + + +--- @type TestStatus_T +-- The status of a test (set / result). +-- +CREATE TYPE TestStatus_T AS ENUM ( + -- Initial status: + 'running', + -- Final statuses: + 'success', + -- Final status: Test didn't fail as such, it was something else. + 'skipped', + 'bad-testbox', + 'aborted', + -- Final status: Test failed. + 'failure', + 'timed-out', + 'rebooted' +); + + +--- @table TestResults +-- Test results - a recursive bundle of joy! +-- +-- A test case will be created when the testdriver calls reporter.testStart and +-- concluded with reporter.testDone. The testdriver (or it subordinates) can +-- use these methods to create nested test results. For IPRT based test cases, +-- RTTestCreate, RTTestInitAndCreate and RTTestSub will both create new test +-- result records, where as RTTestSubDone, RTTestSummaryAndDestroy and +-- RTTestDestroy will conclude records. +-- +-- By concluding is meant updating the status. When the test driver reports +-- success, we check it against reported results. (paranoia strikes again!) +-- +-- Nothing is ever deleted from this table. +-- +-- @note As seen below, several other tables associate data with a +-- test result, and the top most test result is referenced by the +-- test set. +-- +CREATE SEQUENCE TestResultIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestResults ( + --- The ID of this test result. + idTestResult INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestResultIdSeq'), + --- The parent test result. + -- This is NULL for the top test result. + idTestResultParent INTEGER REFERENCES TestResults(idTestResult), + --- The test set this result is a part of. + -- Note! This is a foreign key, but we have to add it after TestSets has + -- been created, see further down. + idTestSet INTEGER NOT NULL, + --- Creation time stamp. This may also be the timestamp of when the test started. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- The elapsed time for this test. + -- This is either reported by the directly (with some sanity checking) or + -- calculated (current_timestamp - created_ts). + -- @todo maybe use a nanosecond field here, check with what + tsElapsed interval DEFAULT NULL, + --- The test name. + idStrName INTEGER REFERENCES TestResultStrTab(idStr) NOT NULL, + --- The error count. + cErrors INTEGER DEFAULT 0 NOT NULL, + --- The test status. + enmStatus TestStatus_T DEFAULT 'running'::TestStatus_T NOT NULL, + --- Nesting depth. + iNestingDepth smallint NOT NULL CHECK (iNestingDepth >= 0 AND iNestingDepth < 16), + -- Make sure errors and status match up. + CONSTRAINT CheckStatusMatchesErrors + CHECK ( (cErrors > 0 AND enmStatus IN ('running'::TestStatus_T, + 'failure'::TestStatus_T, 'timed-out'::TestStatus_T, 'rebooted'::TestStatus_T )) + OR (cErrors = 0 AND enmStatus IN ('running'::TestStatus_T, 'success'::TestStatus_T, + 'skipped'::TestStatus_T, 'aborted'::TestStatus_T, 'bad-testbox'::TestStatus_T)) + ), + -- The following is for the TestResultFailures foreign key. + -- Note! This was added with the name TestResults_idTestResult_idTestSet_key in the tmdb-r16 update script. + UNIQUE (idTestResult, idTestSet) +); + +CREATE INDEX TestResultsSetIdx ON TestResults (idTestSet, idStrName, idTestResult); +CREATE INDEX TestResultsParentIdx ON TestResults (idTestResultParent); +-- The TestResultsNameIdx and TestResultsNameIdx2 are for speeding up the result graph & reporting code. +CREATE INDEX TestResultsNameIdx ON TestResults (idStrName, tsCreated DESC); +CREATE INDEX TestResultsNameIdx2 ON TestResults (idTestResult, idStrName); + +ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey + FOREIGN KEY (idTestResult, idTestSet) REFERENCES TestResults(idTestResult, idTestSet) MATCH FULL; + + +--- @table TestResultValues +-- Test result values. +-- +-- A testdriver or subordinate may report a test value via +-- reporter.testValue(), while IPRT based test will use RTTestValue and +-- associates. +-- +-- This is an insert only table, no deletes, no updates. +-- +CREATE SEQUENCE TestResultValueIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestResultValues ( + --- The ID of this value. + idTestResultValue INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestResultValueIdSeq'), + --- The test result it was reported within. + idTestResult INTEGER REFERENCES TestResults(idTestResult) NOT NULL, + --- The test set this value is a part of (for avoiding joining thru TestResults). + -- Note! This is a foreign key, but we have to add it after TestSets has + -- been created, see further down. + idTestSet INTEGER NOT NULL, + --- Creation time stamp. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- The name. + idStrName INTEGER REFERENCES TestResultStrTab(idStr) NOT NULL, + --- The value. + lValue bigint NOT NULL, + --- The unit. + -- @todo This is currently not defined properly. Will fix/correlate this + -- with the other places we use unit (IPRT/testdriver/VMMDev). + iUnit smallint NOT NULL CHECK (iUnit >= 0 AND iUnit < 1024) +); + +CREATE INDEX TestResultValuesIdx ON TestResultValues(idTestResult); +-- The TestResultValuesGraphIdx is for speeding up the result graph & reporting code. +CREATE INDEX TestResultValuesGraphIdx ON TestResultValues(idStrName, tsCreated); +-- The TestResultValuesLogIdx is for speeding up the log viewer. +CREATE INDEX TestResultValuesLogIdx ON TestResultValues(idTestSet, tsCreated); + + +--- @table TestResultFiles +-- Test result files. +-- +-- A testdriver or subordinate may report a file by using +-- reporter.addFile() or reporter.addLogFile(). +-- +-- The files stored here as well as the primary log file will be processed by a +-- batch job and compressed if considered compressable. Thus, TM will look for +-- files with a .gz/.bz2 suffix first and then without a suffix. +-- +-- This is an insert only table, no deletes, no updates. +-- +CREATE SEQUENCE TestResultFileId + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestResultFiles ( + --- The ID of this file. + idTestResultFile INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestResultFileId'), + --- The test result it was reported within. + idTestResult INTEGER REFERENCES TestResults(idTestResult) NOT NULL, + --- The test set this file is a part of (for avoiding joining thru TestResults). + -- Note! This is a foreign key, but we have to add it after TestSets has + -- been created, see further down. + idTestSet INTEGER NOT NULL, + --- Creation time stamp. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- The filename relative to TestSets(sBaseFilename) + '-'. + -- The set of valid filename characters should be very limited so that no + -- file system issues can occure either on the TM side or the user when + -- loading the files. Tests trying to use other characters will fail. + -- Valid character regular expession: '^[a-zA-Z0-9_-(){}#@+,.=]*$' + idStrFile INTEGER REFERENCES TestResultStrTab(idStr) NOT NULL, + --- The description. + idStrDescription INTEGER REFERENCES TestResultStrTab(idStr) NOT NULL, + --- The kind of file. + -- For instance: 'log/release/vm', + -- 'screenshot/failure', + -- 'screencapture/failure', + -- 'xmllog/somestuff' + idStrKind INTEGER REFERENCES TestResultStrTab(idStr) NOT NULL, + --- The mime type for the file. + -- For instance: 'text/plain', + -- 'image/png', + -- 'video/webm', + -- 'text/xml' + idStrMime INTEGER REFERENCES TestResultStrTab(idStr) NOT NULL +); + +CREATE INDEX TestResultFilesIdx ON TestResultFiles(idTestResult); +CREATE INDEX TestResultFilesIdx2 ON TestResultFiles(idTestSet, tsCreated DESC); + + +--- @table TestResultMsgs +-- Test result message. +-- +-- A testdriver or subordinate may report a message via the sDetails parameter +-- of the reporter.testFailure() method, while IPRT test cases will use +-- RTTestFailed, RTTestPrintf and their friends. For RTTestPrintf, we will +-- ignore the more verbose message levels since these can also be found in one +-- of the logs. +-- +-- This is an insert only table, no deletes, no updates. +-- +CREATE TYPE TestResultMsgLevel_T AS ENUM ( + 'failure', + 'info' +); +CREATE SEQUENCE TestResultMsgIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestResultMsgs ( + --- The ID of this file. + idTestResultMsg INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestResultMsgIdSeq'), + --- The test result it was reported within. + idTestResult INTEGER REFERENCES TestResults(idTestResult) NOT NULL, + --- The test set this file is a part of (for avoiding joining thru TestResults). + -- Note! This is a foreign key, but we have to add it after TestSets has + -- been created, see further down. + idTestSet INTEGER NOT NULL, + --- Creation time stamp. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- The message string. + idStrMsg INTEGER REFERENCES TestResultStrTab(idStr) NOT NULL, + --- The message level. + enmLevel TestResultMsgLevel_T NOT NULL +); + +CREATE INDEX TestResultMsgsIdx ON TestResultMsgs(idTestResult); +CREATE INDEX TestResultMsgsIdx2 ON TestResultMsgs(idTestSet, tsCreated DESC); + + +--- @table TestSets +-- Test sets / Test case runs. +-- +-- This is where we collect data about test runs. +-- +-- @todo Not entirely sure where the 'test set' term came from. Consider +-- finding something more appropriate. +-- +CREATE SEQUENCE TestSetIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestSets ( + --- The ID of this test set. + idTestSet INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestSetIdSeq') NOT NULL, + + --- The test config timestamp, used when reading test config. + tsConfig TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, + --- When this test set was scheduled. + -- idGenTestBox is valid at this point. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, + --- When this test completed, i.e. testing stopped. This should only be set once. + tsDone TIMESTAMP WITH TIME ZONE DEFAULT NULL, + --- The current status. + enmStatus TestStatus_T DEFAULT 'running'::TestStatus_T NOT NULL, + + --- The build we're testing. + -- Non-unique foreign key: Builds(idBuild) + 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 + -- the WHERE part of the selection. + idBuildCategory INTEGER REFERENCES BuildCategories(idBuildCategory) NOT NULL, + --- The test suite build we're using to do the testing. + -- This is NULL if the test suite zip wasn't referred or if a test suite + -- build source wasn't configured. + -- Non-unique foreign key: Builds(idBuild) + idBuildTestSuite INTEGER DEFAULT NULL, + + --- The exact testbox configuration. + idGenTestBox INTEGER REFERENCES TestBoxes(idGenTestBox) NOT NULL, + --- The testbox ID for joining with (valid: tsStarted). + -- Non-unique foreign key: TestBoxes(idTestBox) + idTestBox INTEGER NOT NULL, + --- The scheduling group ID the test was scheduled thru (valid: tsStarted). + -- Non-unique foreign key: SchedGroups(idSchedGroup) + idSchedGroup INTEGER NOT NULL, + + --- The testgroup (valid: tsConfig). + -- Non-unique foreign key: TestBoxes(idTestGroup) + -- Note! This also gives the member ship entry, since a testcase can only + -- have one membership per test group. + idTestGroup INTEGER NOT NULL, + + --- The exact test case config we executed in this test run. + idGenTestCase INTEGER REFERENCES TestCases(idGenTestCase) NOT NULL, + --- The test case ID for joining with (valid: tsConfig). + -- Non-unique foreign key: TestBoxes(idTestCase) + idTestCase INTEGER NOT NULL, + + --- The arguments (and requirements++) we executed this test case with. + idGenTestCaseArgs INTEGER REFERENCES TestCaseArgs(idGenTestCaseArgs) NOT NULL, + --- The argument variation ID (valid: tsConfig). + -- Non-unique foreign key: TestCaseArgs(idTestCaseArgs) + idTestCaseArgs INTEGER NOT NULL, + + --- The root of the test result tree. + -- @note This will only be NULL early in the transaction setting up the testset. + -- @note If the test reports more than one top level test result, we'll + -- fail the whole test run and let the test developer fix it. + idTestResult INTEGER REFERENCES TestResults(idTestResult) DEFAULT NULL, + + --- The base filename used for storing files related to this test set. + -- This is a path relative to wherever TM is dumping log files. In order + -- to not become a file system test case, we will try not to put too many + -- hundred thousand files in a directory. A simple first approach would + -- be to just use the current date (tsCreated) like this: + -- TM_FILE_DIR/year/month/day/TestSets.idTestSet + -- + -- The primary log file for the test is this name suffixed by '.log'. + -- + -- The files in the testresultfile table gets their full names like this: + -- TM_FILE_DIR/sBaseFilename-testresultfile.id-TestResultStrTab(testresultfile.idStrFilename) + -- + -- @remarks We store this explicitly in case we change the directly layout + -- at some later point. + sBaseFilename text UNIQUE NOT NULL, + + --- The gang member number number, 0 is the leader. + iGangMemberNo SMALLINT DEFAULT 0 NOT NULL CHECK (iGangMemberNo >= 0 AND iGangMemberNo < 1024), + --- The test set of the gang leader, NULL if no gang involved. + -- @note This is set by the gang leader as well, so that we can find all + -- gang members by WHERE idTestSetGangLeader = :id. + idTestSetGangLeader INTEGER REFERENCES TestSets(idTestSet) DEFAULT NULL + +); +CREATE INDEX TestSetsGangIdx ON TestSets (idTestSetGangLeader); +CREATE INDEX TestSetsBoxIdx ON TestSets (idTestBox, idTestResult); +CREATE INDEX TestSetsBuildIdx ON TestSets (idBuild, idTestResult); +CREATE INDEX TestSetsTestCaseIdx ON TestSets (idTestCase, idTestResult); +CREATE INDEX TestSetsTestVarIdx ON TestSets (idTestCaseArgs, idTestResult); +--- The TestSetsDoneCreatedBuildCatIdx is for testbox results, graph options and such. +CREATE INDEX TestSetsDoneCreatedBuildCatIdx ON TestSets (tsDone DESC NULLS FIRST, tsCreated ASC, idBuildCategory); +--- For graphs. +CREATE INDEX TestSetsGraphBoxIdx ON TestSets (idTestBox, tsCreated DESC, tsDone ASC NULLS LAST, idBuildCategory, idTestCase); + +ALTER TABLE TestResults ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResultValues ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResultFiles ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResultMsgs ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResultFailures ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; + + + + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +-- +-- T e s t M a n g e r P e r s i s t e n t S t o r a g e +-- +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +--- @type TestBoxState_T +-- TestBox state. +-- +-- @todo Consider drawing a state diagram for this. +-- +CREATE TYPE TestBoxState_T AS ENUM ( + --- Nothing to do. + -- Prev: testing, gang-cleanup, rebooting, upgrading, + -- upgrading-and-rebooting, doing-special-cmd. + -- Next: testing, gang-gathering, rebooting, upgrading, + -- upgrading-and-rebooting, doing-special-cmd. + 'idle', + --- Executing a test. + -- Prev: idle + -- Next: idle + 'testing', + + -- Gang scheduling statuses: + --- The gathering of a gang. + -- Prev: idle + -- Next: gang-gathering-timedout, gang-testing + 'gang-gathering', + --- The gathering timed out, the testbox needs to cleanup and move on. + -- Prev: gang-gathering + -- Next: idle + -- This is set on all gathered members by the testbox who triggers the + -- timeout. + 'gang-gathering-timedout', + --- The gang scheduling equivalent of 'testing'. + -- Prev: gang-gathering + -- Next: gang-cleanup + 'gang-testing', + --- Waiting for the other gang members to stop testing so that cleanups + -- can be performed and members safely rescheduled. + -- Prev: gang-testing + -- Next: idle + -- + -- There are two resource clean up issues being targeted here: + -- 1. Global resources will be allocated by the leader when he enters the + -- 'gang-gathering' state. If the leader quits and frees the resource + -- while someone is still using it, bad things will happen. Imagine a + -- global resource without any access checks and relies exclusivly on + -- the TM doing its job. + -- 2. TestBox resource accessed by other gang members may also be used in + -- other tests. Should a gang member leave early and embark on a + -- testcase using the same resources, bad things will happen. Example: + -- Live migration. One partner leaves early because it detected some + -- fatal failure, the other one is still trying to connect to him. + -- The testbox is scheduled again on the same live migration testcase, + -- only with different arguments (VM config), it will try migrate using + -- the same TCP ports. Confusion ensues. + -- + -- To figure out whether to remain in this status because someone is + -- still testing: + -- SELECT COUNT(*) FROM TestBoxStatuses, TestSets + -- WHERE TestSets.idTestSetGangLeader = :idGangLeader + -- AND TestSets.idTestBox = TestBoxStatuses.idTestBox + -- AND TestSets.idTestSet = TestBoxStatuses.idTestSet + -- AND TestBoxStatuses.enmState = 'gang-testing'::TestBoxState_T; + 'gang-cleanup', + + -- Command related statuses (all command status changes comes from 'idle' + -- and goes back to 'idle'): + 'rebooting', + 'upgrading', + 'upgrading-and-rebooting', + 'doing-special-cmd' +); + +--- @table TestBoxStatuses +-- Testbox status table. +-- +-- History is not planned on this table. +-- +CREATE TABLE TestBoxStatuses ( + --- The testbox. + idTestBox INTEGER PRIMARY KEY NOT NULL, + --- The testbox generation ID. + idGenTestBox INTEGER REFERENCES TestBoxes(idGenTestBox) NOT NULL, + --- When this status was last updated. + -- This is updated everytime the testbox talks to the test manager, thus it + -- can easily be used to find testboxes which has stopped responding. + -- + -- This is used for timeout calculation during gang-gathering, so in that + -- scenario it won't be updated until the gang is gathered or we time out. + tsUpdated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- The current state. + enmState TestBoxState_T DEFAULT 'idle'::TestBoxState_T NOT NULL, + --- Reference to the test set + idTestSet INTEGER REFERENCES TestSets(idTestSet), + --- Interal work item number. + -- This is used to pick and prioritize between multiple scheduling groups. + iWorkItem INTEGER DEFAULT 0 NOT NULL +); + + +--- @table GlobalResourceStatuses +-- Global resource status, tracks which test set resources are allocated by. +-- +-- History is not planned on this table. +-- +CREATE TABLE GlobalResourceStatuses ( + --- The resource ID. + -- Non-unique foreign key: GlobalResources(idGlobalRsrc). + idGlobalRsrc INTEGER PRIMARY KEY NOT NULL, + --- The resource owner. + -- @note This is going thru testboxstatus to be able to use the testbox ID + -- as a foreign key. + idTestBox INTEGER REFERENCES TestBoxStatuses(idTestBox) NOT NULL, + --- When the allocation took place. + tsAllocated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL +); + + +--- @table SchedQueues +-- Scheduler queue. +-- +-- The queues are currently associated with a scheduling group, it could +-- alternative be changed to hook on to a testbox instead. It depends on what +-- kind of scheduling method we prefer. The former method aims at test case +-- thruput, making sacrifices in the hardware distribution area. The latter is +-- more like the old buildbox style testing, making sure that each test case is +-- executed on each testbox. +-- +-- When there are configuration changes, TM will regenerate the scheduling +-- queue for the affected scheduling groups. We do not concern ourselves with +-- trying to continue at the approximately same queue position, we simply take +-- it from the top. +-- +-- When a testbox ask for work, we will open a cursor on the queue and take the +-- first test in the queue that can be executed on that testbox. The test will +-- be moved to the end of the queue (getting a new item_id). +-- +-- If a test is manually changed to the head of the queue, the item will get a +-- item_id which is 1 lower than the head of the queue. Unless someone does +-- this a couple of billion times, we shouldn't have any trouble running out of +-- number space. :-) +-- +-- Manually moving a test to the end of the queue is easy, just get a new +-- 'item_id'. +-- +-- History is not planned on this table. +-- +CREATE SEQUENCE SchedQueueItemIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE SchedQueues ( + --- The scheduling queue (one queue per scheduling group). + -- Non-unique foreign key: SchedGroups(idSchedGroup) + idSchedGroup INTEGER NOT NULL, + --- The scheduler queue entry ID. + -- Lower numbers means early queue position. + idItem INTEGER DEFAULT NEXTVAL('SchedQueueItemIdSeq') NOT NULL, + --- The queue offset. + -- This is used for repositining the queue when recreating it. It can also + -- be used to figure out how jumbled the queue gets after real life has had + -- it's effect on it. + offQueue INTEGER NOT NULL, + --- The test case argument variation to execute. + idGenTestCaseArgs INTEGER REFERENCES TestCaseArgs(idGenTestCaseArgs) NOT NULL, + --- The relevant testgroup. + -- Non-unique foreign key: TestGroups(idTestGroup). + idTestGroup INTEGER NOT NULL, + --- Aggregated test group dependencies (NULL if none). + -- Non-unique foreign key: TestGroups(idTestGroup). + -- See also comments on SchedGroupMembers.idTestGroupPreReq. + aidTestGroupPreReqs INTEGER ARRAY DEFAULT NULL, + --- The scheduling time constraints (see SchedGroupMembers.bmHourlySchedule). + bmHourlySchedule bit(168) DEFAULT NULL, + --- When the queue entry was created and for which config is valid. + -- This is the timestamp that should be used when reading config info. + tsConfig TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, + --- When this status was last scheduled. + -- This is set to current_timestamp when moving the entry to the end of the + -- queue. It's initial value is unix-epoch. Not entirely sure if it's + -- useful beyond introspection and non-unique foreign key hacking. + tsLastScheduled TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'epoch' NOT NULL, + + --- This is used in gang scheduling. + idTestSetGangLeader INTEGER REFERENCES TestSets(idTestSet) DEFAULT NULL UNIQUE, + --- The number of gang members still missing. + -- + -- This saves calculating the number of missing members via selects like: + -- SELECT COUNT(*) FROM TestSets WHERE idTestSetGangLeader = :idGang; + -- and + -- SELECT cGangMembers FROM TestCaseArgs WHERE idGenTestCaseArgs = :idTest; + -- to figure out whether to remain in 'gather-gang'::TestBoxState_T. + -- + cMissingGangMembers smallint DEFAULT 1 NOT NULL, + + --- @todo + --- The number of times this has been considered for scheduling. + -- cConsidered SMALLINT DEFAULT 0 NOT NULL, + + PRIMARY KEY (idSchedGroup, idItem) +); +CREATE INDEX SchedQueuesItemIdx ON SchedQueues(idItem); +CREATE INDEX SchedQueuesSchedGroupIdx ON SchedQueues(idSchedGroup); + diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseMap.png b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseMap.png new file mode 100644 index 00000000..861a407d Binary files /dev/null and b/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseMap.png differ diff --git a/src/VBox/ValidationKit/testmanager/db/TestManagerVBoxPilot-1.pgsql b/src/VBox/ValidationKit/testmanager/db/TestManagerVBoxPilot-1.pgsql new file mode 100644 index 00000000..3e7a36b3 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/TestManagerVBoxPilot-1.pgsql @@ -0,0 +1,101 @@ +-- $Id: TestManagerVBoxPilot-1.pgsql $ +--- @file +-- VBox Test Manager - Setup for the 1st VBox Pilot. +-- + +-- +-- Copyright (C) 2012-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + + +\set ON_ERROR_STOP 1 +\connect testmanager; + +BEGIN WORK; + +-- +-- The user we assign all the changes too. +-- +INSERT INTO Users (sUsername, sEmail, sFullName, sLoginName) + VALUES ('vbox-pilot-config', 'pilot1@example.org', 'VBox Pilot Configurator', 'vbox-pilot-config'); +\set idUserQuery '(SELECT uid FROM Users WHERE sUsername = \'vbox-pilot-config\')' + +-- +-- Configure a scheduling group with build sources. +-- +INSERT INTO BuildSources (uidAuthor, sName, sProduct, sBranch, asTypes, asOsArches) + VALUES (:idUserQuery, 'VBox trunk builds', 'VirtualBox', 'trunk', ARRAY['release', 'strict'], NULL); + +INSERT INTO BuildSources (uidAuthor, sName, sProduct, sBranch, asTypes, asOsArches) + VALUES (:idUserQuery, 'VBox TestSuite trunk builds', 'VBox TestSuite', 'trunk', ARRAY['release'], NULL); + +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 TestSuite trunk builds') ); +\set idSchedGroupQuery '(SELECT idSchedGroup FROM SchedGroups WHERE sName = \'VirtualBox Trunk\')' + +-- +-- Configure three test groups. +-- +INSERT INTO TestGroups (uidAuthor, sName) + VALUES (:idUserQuery, 'VBox smoketests'); +\set idGrpSmokeQuery '(SELECT idTestGroup FROM TestGroups WHERE sName = \'VBox smoketests\')' +INSERT INTO SchedGroupMembers (idSchedGroup, idTestGroup, uidAuthor, idTestGroupPreReq) + VALUES (:idSchedGroupQuery, :idGrpSmokeQuery, :idUserQuery, NULL); + +INSERT INTO TestGroups (uidAuthor, sName) + VALUES (:idUserQuery, 'VBox general'); +\set idGrpGeneralQuery '(SELECT idTestGroup FROM TestGroups WHERE sName = \'VBox general\')' +INSERT INTO SchedGroupMembers (idSchedGroup, idTestGroup, uidAuthor, idTestGroupPreReq) + VALUES (:idSchedGroupQuery, :idGrpGeneralQuery, :idUserQuery, :idGrpSmokeQuery); + +INSERT INTO TestGroups (uidAuthor, sName) + VALUES (:idUserQuery, 'VBox benchmarks'); +\set idGrpBenchmarksQuery '(SELECT idTestGroup FROM TestGroups WHERE sName = \'VBox benchmarks\')' +INSERT INTO SchedGroupMembers (idSchedGroup, idTestGroup, uidAuthor, idTestGroupPreReq) + VALUES (:idSchedGroupQuery, :idGrpBenchmarksQuery, :idUserQuery, :idGrpGeneralQuery); + + +-- +-- Testcases +-- +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@', + '@VALIDATIONKIT_ZIP@'); +INSERT INTO TestCaseArgs (idTestCase, uidAuthor, sArgs) + VALUES ((SELECT idTestCase FROM TestCases WHERE sName = 'VBox install'), :idUserQuery, ''); +INSERT INTO TestGroupMembers (idTestGroup, idTestCase, uidAuthor) + VALUES (:idGrpSmokeQuery, (SELECT idTestCase FROM TestCases WHERE sName = 'VBox install'), :idUserQuery); + +COMMIT WORK; + diff --git a/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py b/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py new file mode 100755 index 00000000..51e76368 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py @@ -0,0 +1,236 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# $Id: gen-sql-comments.py $ + +""" +Converts doxygen style comments in SQL script to COMMENT ON statements. +""" + +__copyright__ = \ +""" +Copyright (C) 2012-2022 Oracle and/or its affiliates. + +This file is part of VirtualBox base platform packages, as +available from https://www.virtualbox.org. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, in version 3 of the +License. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see . + +The contents of this file may alternatively be used under the terms +of the Common Development and Distribution License Version 1.0 +(CDDL), a copy of it is provided in the "COPYING.CDDL" file included +in the VirtualBox 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. + +SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +""" + +import sys; +import re; + + +def errorMsg(sMsg): + sys.stderr.write('error: %s\n' % (sMsg,)); + return 1; + +class SqlDox(object): + """ + Class for parsing relevant comments out of a pgsql file + and emit COMMENT ON statements from it. + """ + + def __init__(self, oFile, sFilename): + self.oFile = oFile; + self.sFilename = sFilename; + self.iLine = 0; # The current input line number. + self.sComment = None; # The current comment. + self.fCommentComplete = False; # Indicates that the comment has ended. + self.sCommentSqlObj = None; # SQL object indicated by the comment (@table). + self.sOuterSqlObj = None; # Like 'table yyyy' or 'type zzzz'. + self.sPrevSqlObj = None; # Like 'table xxxx'. + + + def error(self, sMsg): + return errorMsg('%s(%d): %s' % (self.sFilename, self.iLine, sMsg,)); + + def dprint(self, sMsg): + sys.stderr.write('debug: %s\n' % (sMsg,)); + return True; + + def resetComment(self): + self.sComment = None; + self.fCommentComplete = False; + self.sCommentSqlObj = None; + + def quoteSqlString(self, s): + return s.replace("'", "''"); + + def commitComment2(self, sSqlObj): + if self.sComment is not None and sSqlObj is not None: + print("COMMENT ON %s IS\n '%s';\n" % (sSqlObj, self.quoteSqlString(self.sComment.strip()))); + self.resetComment(); + return True; + + def commitComment(self): + return self.commitComment2(self.sCommentSqlObj); + + def process(self): + for sLine in self.oFile: + self.iLine += 1; + + sLine = sLine.strip(); + self.dprint('line %d: %s\n' % (self.iLine, sLine)); + if sLine.startswith('--'): + if sLine.startswith('--- '): + # + # New comment. + # The first list may have a @table, @type or similar that we're interested in. + # + self.commitComment(); + + sLine = sLine.lstrip('- '); + if sLine.startswith('@table '): + self.sCommentSqlObj = 'TABLE ' + (sLine[7:]).rstrip(); + self.sComment = ''; + elif sLine.startswith('@type '): + self.sCommentSqlObj = 'TYPE ' + (sLine[6:]).rstrip(); + self.sComment = ''; + elif sLine.startswith('@todo') \ + or sLine.startswith('@file') \ + or sLine.startswith('@page') \ + or sLine.startswith('@name') \ + or sLine.startswith('@{') \ + or sLine.startswith('@}'): + # Ignore. + pass; + elif sLine.startswith('@'): + return self.error('Unknown tag: %s' % (sLine,)); + else: + self.sComment = sLine; + + elif (sLine.startswith('-- ') or sLine == '--') \ + and self.sComment is not None and self.fCommentComplete is False: + # + # Append line to comment. + # + if sLine == '--': + sLine = ''; + else: + sLine = (sLine[3:]); + if self.sComment == '': + self.sComment = sLine; + else: + self.sComment += "\n" + sLine; + + elif sLine.startswith('--< '): + # + # Comment that starts on the same line as the object it describes. + # + sLine = (sLine[4:]).rstrip(); + # => Later/never. + else: + # + # Not a comment that interests us. So, complete any open + # comment and commit it if we know which SQL object it + # applies to. + # + self.fCommentComplete = True; + if self.sCommentSqlObj is not None: + self.commitComment(); + else: + # + # Not a comment. As above, we complete and optionally commit + # any open comment. + # + self.fCommentComplete = True; + if self.sCommentSqlObj is not None: + self.commitComment(); + + # + # Check for SQL (very fuzzy and bad). + # + asWords = sLine.split(' '); + if len(asWords) >= 3 \ + and asWords[0] == 'CREATE': + # CREATE statement. + sType = asWords[1]; + sName = asWords[2]; + if sType == 'UNIQUE' and sName == 'INDEX' and len(asWords) >= 4: + sType = asWords[2]; + sName = asWords[3]; + if sType in ('TABLE', 'TYPE', 'INDEX', 'VIEW'): + self.sOuterSqlObj = sType + ' ' + sName; + self.sPrevSqlObj = self.sOuterSqlObj; + self.dprint('%s' % (self.sOuterSqlObj,)); + self.commitComment2(self.sOuterSqlObj); + elif len(asWords) >= 1 \ + and self.sOuterSqlObj is not None \ + and self.sOuterSqlObj.startswith('TABLE ') \ + and re.search("^(as|al|bm|c|enm|f|i|l|s|ts|uid|uuid)[A-Z][a-zA-Z0-9]*$", asWords[0]) is not None: + # Possibly a column name. + self.sPrevSqlObj = 'COLUMN ' + self.sOuterSqlObj[6:] + '.' + asWords[0]; + self.dprint('column? %s' % (self.sPrevSqlObj)); + self.commitComment2(self.sPrevSqlObj); + + # + # Check for semicolon. + # + if sLine.find(");") >= 0: + self.sOuterSqlObj = None; + + return 0; + + +def usage(): + sys.stderr.write('usage: gen-sql-comments.py \n' + '\n' + 'The output goes to stdout.\n'); + return 0; + + +def main(asArgs): + # Parse the argument. :-) + sInput = None; + if (len(asArgs) != 2): + sys.stderr.write('syntax error: expected exactly 1 argument, a psql file\n'); + usage(); + return 2; + sInput = asArgs[1]; + + # Do the job, outputting to standard output. + try: + oFile = open(sInput, 'r'); + 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'): + if len(sLine) > 0: + print("-- %s" % (sLine,)); + else: + print("--"); + print(""); + print(""); + me = SqlDox(oFile, sInput); + return me.process(); + +sys.exit(main(sys.argv)); + diff --git a/src/VBox/ValidationKit/testmanager/db/partial-db-dump.py b/src/VBox/ValidationKit/testmanager/db/partial-db-dump.py new file mode 100755 index 00000000..73d745db --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/partial-db-dump.py @@ -0,0 +1,392 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# $Id: partial-db-dump.py $ +# pylint: disable=line-too-long + +""" +Utility for dumping the last X days of data. +""" + +__copyright__ = \ +""" +Copyright (C) 2012-2022 Oracle and/or its affiliates. + +This file is part of VirtualBox base platform packages, as +available from https://www.virtualbox.org. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, in version 3 of the +License. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see . + +The contents of this file may alternatively be used under the terms +of the Common Development and Distribution License Version 1.0 +(CDDL), a copy of it is provided in the "COPYING.CDDL" file included +in the VirtualBox 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. + +SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +""" +__version__ = "$Revision: 154084 $" + +# Standard python imports +import sys; +import os; +import zipfile; +from optparse import OptionParser; +import xml.etree.ElementTree as ET; + +# Add Test Manager's modules path +g_ksTestManagerDir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))); +sys.path.append(g_ksTestManagerDir); + +# Test Manager imports +from testmanager.core.db import TMDatabaseConnection; +from common import utils; + + +class PartialDbDump(object): # pylint: disable=too-few-public-methods + """ + Dumps or loads the last X days of database data. + + This is a useful tool when hacking on the test manager locally. You can get + a small sample from the last few days from the production test manager server + without spending hours dumping, downloading, and loading the whole database + (because it is gigantic). + + """ + + def __init__(self): + """ + Parse command line. + """ + + oParser = OptionParser() + oParser.add_option('-q', '--quiet', dest = 'fQuiet', action = 'store_true', + help = 'Quiet execution'); + oParser.add_option('-f', '--filename', dest = 'sFilename', metavar = '', + default = 'partial-db-dump.zip', help = 'The name of the partial database zip file to write/load.'); + + oParser.add_option('-t', '--tmp-file', dest = 'sTempFile', metavar = '', + default = '/tmp/tm-partial-db-dump.pgtxt', + help = 'Name of temporary file for duping tables. Must be absolute'); + oParser.add_option('--days-to-dump', dest = 'cDays', metavar = '', type = 'int', default = 14, + help = 'How many days to dump (counting backward from current date).'); + oParser.add_option('--load-dump-into-database', dest = 'fLoadDumpIntoDatabase', action = 'store_true', + default = False, help = 'For loading instead of dumping.'); + oParser.add_option('--store', dest = 'fStore', action = 'store_true', + default = False, help = 'Do not compress the zip file.'); + + (self.oConfig, _) = oParser.parse_args(); + + + ## + # Tables dumped in full because they're either needed in full or they normally + # aren't large enough to bother reducing. + kasTablesToDumpInFull = [ + 'Users', + 'BuildBlacklist', + 'BuildCategories', + 'BuildSources', + 'FailureCategories', + 'FailureReasons', + 'GlobalResources', + 'Testcases', + 'TestcaseArgs', + 'TestcaseDeps', + 'TestcaseGlobalRsrcDeps', + 'TestGroups', + 'TestGroupMembers', + 'SchedGroups', + 'SchedGroupMembers', # ? + 'TestBoxesInSchedGroups', # ? + 'SchedQueues', + 'TestResultStrTab', # 36K rows, never mind complicated then. + ]; + + ## + # Tables where we only dump partial info (the TestResult* tables are rather + # gigantic). + kasTablesToPartiallyDump = [ + 'TestBoxes', # 2016-05-25: ca. 641 MB + 'TestSets', # 2016-05-25: ca. 525 MB + 'TestResults', # 2016-05-25: ca. 13 GB + 'TestResultFiles', # 2016-05-25: ca. 87 MB + 'TestResultMsgs', # 2016-05-25: ca. 29 MB + 'TestResultValues', # 2016-05-25: ca. 3728 MB + 'TestResultFailures', + 'Builds', + 'TestBoxStrTab', + 'SystemLog', + 'VcsRevisions', + ]; + + def _doCopyTo(self, sTable, oZipFile, oDb, sSql, aoArgs = None): + """ Does one COPY TO job. """ + print('Dumping %s...' % (sTable,)); + + if aoArgs is not None: + sSql = oDb.formatBindArgs(sSql, aoArgs); + + oFile = open(self.oConfig.sTempFile, 'w'); + oDb.copyExpert(sSql, oFile); + cRows = oDb.getRowCount(); + oFile.close(); + print('... %s rows.' % (cRows,)); + + oZipFile.write(self.oConfig.sTempFile, sTable); + return True; + + def _doDump(self, oDb): + """ Does the dumping of the database. """ + + enmCompression = zipfile.ZIP_DEFLATED; + if self.oConfig.fStore: + enmCompression = zipfile.ZIP_STORED; + oZipFile = zipfile.ZipFile(self.oConfig.sFilename, 'w', enmCompression); + + oDb.begin(); + + # Dumping full tables is simple. + for sTable in self.kasTablesToDumpInFull: + self._doCopyTo(sTable, oZipFile, oDb, 'COPY ' + sTable + ' TO STDOUT WITH (FORMAT TEXT)'); + + # Figure out how far back we need to go. + oDb.execute('SELECT CURRENT_TIMESTAMP - INTERVAL \'%s days\'' % (self.oConfig.cDays,)); + tsEffective = oDb.fetchOne()[0]; + oDb.execute('SELECT CURRENT_TIMESTAMP - INTERVAL \'%s days\'' % (self.oConfig.cDays + 2,)); + tsEffectiveSafe = oDb.fetchOne()[0]; + print('Going back to: %s (safe: %s)' % (tsEffective, tsEffectiveSafe)); + + # We dump test boxes back to the safe timestamp because the test sets may + # use slightly dated test box references and we don't wish to have dangling + # references when loading. + for sTable in [ 'TestBoxes', ]: + self._doCopyTo(sTable, oZipFile, oDb, + 'COPY (SELECT * FROM ' + sTable + ' WHERE tsExpire >= %s) TO STDOUT WITH (FORMAT TEXT)', + (tsEffectiveSafe,)); + + # The test results needs to start with test sets and then dump everything + # releated to them. So, figure the lowest (oldest) test set ID we'll be + # dumping first. + oDb.execute('SELECT idTestSet FROM TestSets WHERE tsCreated >= %s', (tsEffective, )); + idFirstTestSet = 0; + if oDb.getRowCount() > 0: + idFirstTestSet = oDb.fetchOne()[0]; + print('First test set ID: %s' % (idFirstTestSet,)); + + oDb.execute('SELECT MAX(idTestSet) FROM TestSets WHERE tsCreated >= %s', (tsEffective, )); + idLastTestSet = 0; + if oDb.getRowCount() > 0: + idLastTestSet = oDb.fetchOne()[0]; + print('Last test set ID: %s' % (idLastTestSet,)); + + oDb.execute('SELECT MAX(idTestResult) FROM TestResults WHERE tsCreated >= %s', (tsEffective, )); + idLastTestResult = 0; + if oDb.getRowCount() > 0: + idLastTestResult = oDb.fetchOne()[0]; + print('Last test result ID: %s' % (idLastTestResult,)); + + # Tables with idTestSet member. + for sTable in [ 'TestSets', 'TestResults', 'TestResultValues' ]: + self._doCopyTo(sTable, oZipFile, oDb, + 'COPY (SELECT *\n' + ' FROM ' + sTable + '\n' + ' WHERE idTestSet >= %s\n' + ' AND idTestSet <= %s\n' + ' AND idTestResult <= %s\n' + ') TO STDOUT WITH (FORMAT TEXT)' + , ( idFirstTestSet, idLastTestSet, idLastTestResult,)); + + # Tables where we have to go via TestResult. + for sTable in [ 'TestResultFiles', 'TestResultMsgs', 'TestResultFailures' ]: + self._doCopyTo(sTable, oZipFile, oDb, + 'COPY (SELECT it.*\n' + ' FROM ' + sTable + ' it, TestResults tr\n' + ' WHERE tr.idTestSet >= %s\n' + ' AND tr.idTestSet <= %s\n' + ' AND tr.idTestResult <= %s\n' + ' AND tr.tsCreated >= %s\n' # performance hack. + ' AND it.idTestResult = tr.idTestResult\n' + ') TO STDOUT WITH (FORMAT TEXT)' + , ( idFirstTestSet, idLastTestSet, idLastTestResult, tsEffective,)); + + # Tables which goes exclusively by tsCreated using tsEffectiveSafe. + for sTable in [ 'SystemLog', 'VcsRevisions' ]: + self._doCopyTo(sTable, oZipFile, oDb, + 'COPY (SELECT * FROM ' + sTable + ' WHERE tsCreated >= %s) TO STDOUT WITH (FORMAT TEXT)', + (tsEffectiveSafe,)); + + # The builds table. + oDb.execute('SELECT MIN(idBuild), MIN(idBuildTestSuite) FROM TestSets WHERE idTestSet >= %s', (idFirstTestSet,)); + idFirstBuild = 0; + if oDb.getRowCount() > 0: + idFirstBuild = min(oDb.fetchOne()); + print('First build ID: %s' % (idFirstBuild,)); + for sTable in [ 'Builds', ]: + self._doCopyTo(sTable, oZipFile, oDb, + 'COPY (SELECT * FROM ' + sTable + ' WHERE idBuild >= %s) TO STDOUT WITH (FORMAT TEXT)', + (idFirstBuild,)); + + # The test box string table. + self._doCopyTo('TestBoxStrTab', oZipFile, oDb, ''' +COPY (SELECT * FROM TestBoxStrTab WHERE idStr IN ( + ( SELECT 0 + ) UNION ( SELECT idStrComment FROM TestBoxes WHERE tsExpire >= %s + ) UNION ( SELECT idStrCpuArch FROM TestBoxes WHERE tsExpire >= %s + ) UNION ( SELECT idStrCpuName FROM TestBoxes WHERE tsExpire >= %s + ) UNION ( SELECT idStrCpuVendor FROM TestBoxes WHERE tsExpire >= %s + ) UNION ( SELECT idStrDescription FROM TestBoxes WHERE tsExpire >= %s + ) UNION ( SELECT idStrOS FROM TestBoxes WHERE tsExpire >= %s + ) UNION ( SELECT idStrOsVersion FROM TestBoxes WHERE tsExpire >= %s + ) UNION ( SELECT idStrReport FROM TestBoxes WHERE tsExpire >= %s + ) ) ) TO STDOUT WITH (FORMAT TEXT) +''', (tsEffectiveSafe, tsEffectiveSafe, tsEffectiveSafe, tsEffectiveSafe, + tsEffectiveSafe, tsEffectiveSafe, tsEffectiveSafe, tsEffectiveSafe,)); + + oZipFile.close(); + print('Done!'); + return 0; + + def _doLoad(self, oDb): + """ Does the loading of the dumped data into the database. """ + + try: + oZipFile = zipfile.ZipFile(self.oConfig.sFilename, 'r'); + except: + print('error: Dump file "%s" cannot be opened! Use "-f " to specify a file.' % (self.oConfig.sFilename,)); + return 1; + + asTablesInLoadOrder = [ + 'Users', + 'BuildBlacklist', + 'BuildCategories', + 'BuildSources', + 'FailureCategories', + 'FailureReasons', + 'GlobalResources', + 'Testcases', + 'TestcaseArgs', + 'TestcaseDeps', + 'TestcaseGlobalRsrcDeps', + 'TestGroups', + 'TestGroupMembers', + 'SchedGroups', + 'TestBoxStrTab', + 'TestBoxes', + 'SchedGroupMembers', + 'TestBoxesInSchedGroups', + 'SchedQueues', + 'Builds', + 'SystemLog', + 'VcsRevisions', + 'TestResultStrTab', + 'TestSets', + 'TestResults', + 'TestResultFiles', + 'TestResultMsgs', + 'TestResultValues', + 'TestResultFailures', + ]; + assert len(asTablesInLoadOrder) == len(self.kasTablesToDumpInFull) + len(self.kasTablesToPartiallyDump); + + oDb.begin(); + oDb.execute('SET CONSTRAINTS ALL DEFERRED;'); + + print('Checking if the database looks empty...\n'); + for sTable in asTablesInLoadOrder + [ 'TestBoxStatuses', 'GlobalResourceStatuses' ]: + oDb.execute('SELECT COUNT(*) FROM ' + sTable); + cRows = oDb.fetchOne()[0]; + cMaxRows = 0; + if sTable in [ 'SchedGroups', 'TestBoxStrTab', 'TestResultStrTab', 'Users' ]: cMaxRows = 1; + if cRows > cMaxRows: + print('error: Table %s has %u rows which is more than %u - refusing to delete and load.' + % (sTable, cRows, cMaxRows,)); + print('info: Please drop and recreate the database before loading!'); + return 1; + + print('Dropping default table content...\n'); + for sTable in [ 'SchedGroups', 'TestBoxStrTab', 'TestResultStrTab', 'Users']: + oDb.execute('DELETE FROM ' + sTable); + + oDb.execute('ALTER TABLE TestSets DROP CONSTRAINT IF EXISTS TestSets_idTestResult_fkey'); + + for sTable in asTablesInLoadOrder: + print('Loading %s...' % (sTable,)); + oFile = oZipFile.open(sTable); + oDb.copyExpert('COPY ' + sTable + ' FROM STDIN WITH (FORMAT TEXT)', oFile); + cRows = oDb.getRowCount(); + print('... %s rows.' % (cRows,)); + + oDb.execute('ALTER TABLE TestSets ADD FOREIGN KEY (idTestResult) REFERENCES TestResults(idTestResult)'); + oDb.commit(); + + # Correct sequences. + atSequences = [ + ( 'UserIdSeq', 'Users', 'uid' ), + ( 'GlobalResourceIdSeq', 'GlobalResources', 'idGlobalRsrc' ), + ( 'BuildSourceIdSeq', 'BuildSources', 'idBuildSrc' ), + ( 'TestCaseIdSeq', 'TestCases', 'idTestCase' ), + ( 'TestCaseGenIdSeq', 'TestCases', 'idGenTestCase' ), + ( 'TestCaseArgsIdSeq', 'TestCaseArgs', 'idTestCaseArgs' ), + ( 'TestCaseArgsGenIdSeq', 'TestCaseArgs', 'idGenTestCaseArgs' ), + ( 'TestGroupIdSeq', 'TestGroups', 'idTestGroup' ), + ( 'SchedGroupIdSeq', 'SchedGroups', 'idSchedGroup' ), + ( 'TestBoxStrTabIdSeq', 'TestBoxStrTab', 'idStr' ), + ( 'TestBoxIdSeq', 'TestBoxes', 'idTestBox' ), + ( 'TestBoxGenIdSeq', 'TestBoxes', 'idGenTestBox' ), + ( 'FailureCategoryIdSeq', 'FailureCategories', 'idFailureCategory' ), + ( 'FailureReasonIdSeq', 'FailureReasons', 'idFailureReason' ), + ( 'BuildBlacklistIdSeq', 'BuildBlacklist', 'idBlacklisting' ), + ( 'BuildCategoryIdSeq', 'BuildCategories', 'idBuildCategory' ), + ( 'BuildIdSeq', 'Builds', 'idBuild' ), + ( 'TestResultStrTabIdSeq', 'TestResultStrTab', 'idStr' ), + ( 'TestResultIdSeq', 'TestResults', 'idTestResult' ), + ( 'TestResultValueIdSeq', 'TestResultValues', 'idTestResultValue' ), + ( 'TestResultFileId', 'TestResultFiles', 'idTestResultFile' ), + ( 'TestResultMsgIdSeq', 'TestResultMsgs', 'idTestResultMsg' ), + ( 'TestSetIdSeq', 'TestSets', 'idTestSet' ), + ( 'SchedQueueItemIdSeq', 'SchedQueues', 'idItem' ), + ]; + for (sSeq, sTab, sCol) in atSequences: + oDb.execute('SELECT MAX(%s) FROM %s' % (sCol, sTab,)); + idMax = oDb.fetchOne()[0]; + print('%s: idMax=%s' % (sSeq, idMax)); + if idMax is not None: + oDb.execute('SELECT setval(\'%s\', %s)' % (sSeq, idMax)); + + # Last step. + print('Analyzing...'); + oDb.execute('ANALYZE'); + oDb.commit(); + + print('Done!'); + return 0; + + def main(self): + """ + Main function. + """ + oDb = TMDatabaseConnection(); + + if self.oConfig.fLoadDumpIntoDatabase is not True: + rc = self._doDump(oDb); + else: + rc = self._doLoad(oDb); + + oDb.close(); + return 0; + +if __name__ == '__main__': + sys.exit(PartialDbDump().main()); diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r01-builds-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r01-builds-1.pgsql new file mode 100644 index 00000000..721d05d8 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r01-builds-1.pgsql @@ -0,0 +1,91 @@ +-- $Id: tmdb-r01-builds-1.pgsql $ +--- @file +-- VBox Test Manager Database - Changed Builds to be historized. +-- + +-- +-- Copyright (C) 2012-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +DROP TABLE OldBuilds; +DROP TABLE NewBuilds; +DROP INDEX BuildsLookupIdx; + +\set ON_ERROR_STOP 1 + +-- +-- idBuild won't be unique, so it cannot be used directly as a foreign key +-- by TestSets. +-- +ALTER TABLE TestSets + DROP CONSTRAINT TestSets_idBuild_fkey; +ALTER TABLE TestSets + DROP CONSTRAINT TestSets_idBuildTestSuite_fkey; + + +-- +-- Create the table, filling it with the current Builds content. +-- +CREATE TABLE NewBuilds ( + idBuild INTEGER DEFAULT NEXTVAL('BuildIdSeq') NOT NULL, + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + uidAuthor INTEGER DEFAULT NULL, + idBuildCategory INTEGER REFERENCES BuildCategories(idBuildCategory) NOT NULL, + iRevision INTEGER NOT NULL, + sVersion TEXT NOT NULL, + sLogUrl TEXT, + sBinaries TEXT NOT NULL, + fBinariesDeleted BOOLEAN DEFAULT FALSE NOT NULL, + UNIQUE (idBuild, tsExpire) +); + +INSERT INTO NewBuilds (idBuild, tsCreated, tsEffective, uidAuthor, idBuildCategory, iRevision, sVersion, sLogUrl, sBinaries) + SELECT idBuild, tsCreated, tsCreated, uidAuthor, idBuildCategory, iRevision, sVersion, sLogUrl, sBinaries + FROM Builds; +COMMIT; + +-- Switch the tables. +ALTER TABLE Builds RENAME TO OldBuilds; +ALTER TABLE NewBuilds RENAME TO Builds; +COMMIT; + +-- Finally index the table. +CREATE INDEX BuildsLookupIdx ON Builds (idBuildCategory, iRevision); +COMMIT; + +DROP TABLE OldBuilds; +COMMIT; + +-- Fix implicit index name. +ALTER INDEX newbuilds_idbuild_tsexpire_key RENAME TO builds_idbuild_tsexpire_key; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r02-testboxes-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r02-testboxes-1.pgsql new file mode 100644 index 00000000..447a671a --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r02-testboxes-1.pgsql @@ -0,0 +1,194 @@ +-- $Id: tmdb-r02-testboxes-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds fCpu64BitGuest to TestBoxes +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +DROP TABLE OldTestBoxes; +DROP TABLE NewTestBoxes; + +\d TestBoxes; + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +LOCK TABLE TestBoxStatuses IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestSets IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestBoxes IN ACCESS EXCLUSIVE MODE; + +DROP INDEX TestBoxesUuidIdx; + +-- +-- Rename the original table, drop constrains and foreign key references so we +-- get the right name automatic when creating the new one. +-- +ALTER TABLE TestBoxes RENAME TO OldTestBoxes; + +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_ccpus_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_cmbmemory_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_cmbscratch_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_pctscaletimeout_check; + +ALTER TABLE TestBoxStatuses DROP CONSTRAINT TestBoxStatuses_idGenTestBox_fkey; +ALTER TABLE TestSets DROP CONSTRAINT TestSets_idGenTestBox_fkey; + +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_pkey; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_idgentestbox_key; + +-- +-- Create the new table, filling it with the current TestBoxes content. +-- +CREATE TABLE TestBoxes ( + --- The fixed testbox ID. + -- This is assigned when the testbox is created and will never change. + idTestBox INTEGER DEFAULT NEXTVAL('TestBoxIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- When modified automatically by the testbox, NULL is used. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER DEFAULT NULL, + --- Generation ID for this row. + -- This is primarily for referencing by TestSets. + idGenTestBox INTEGER UNIQUE DEFAULT NEXTVAL('TestBoxGenIdSeq') NOT NULL, + + --- The testbox IP. + -- This is from the webserver point of view and automatically updated on + -- SIGNON. The test setup doesn't permit for IP addresses to change while + -- the testbox is operational, because this will break gang tests. + ip inet NOT NULL, + --- The system or firmware UUID. + -- This uniquely identifies the testbox when talking to the server. After + -- SIGNON though, the testbox will also provide idTestBox and ip to + -- establish its identity beyond doubt. + uuidSystem uuid NOT NULL, + --- The testbox name. + -- Usually similar to the DNS name. + sName text NOT NULL, + --- Optional testbox description. + -- Intended for describing the box as well as making other relevant notes. + sDescription text DEFAULT NULL, + + --- Reference to the scheduling group that this testbox is a member of. + -- Non-unique foreign key: SchedGroups(idSchedGroup) + -- A testbox is always part of a group, the default one nothing else. + idSchedGroup INTEGER DEFAULT 1 NOT NULL, + + --- Indicates whether this testbox is enabled. + -- A testbox gets disabled when we're doing maintenance, debugging a issue + -- that happens only on that testbox, or some similar stuff. This is an + -- alternative to deleting the testbox. + fEnabled BOOLEAN DEFAULT NULL, + + --- The kind of lights-out-management. + enmLomKind LomKind_T DEFAULT 'none'::LomKind_T NOT NULL, + --- The IP adress of the lights-out-management. + -- This can be NULL if enmLomKind is 'none', otherwise it must contain a valid address. + ipLom inet DEFAULT NULL, + + --- Timeout scale factor, given as a percent. + -- This is a crude adjustment of the test case timeout for slower hardware. + pctScaleTimeout smallint DEFAULT 100 NOT NULL CHECK (pctScaleTimeout > 10 AND pctScaleTimeout < 20000), + + --- @name Scheduling properties (reported by testbox script). + -- @{ + --- Same abbrieviations as kBuild, see KBUILD_OSES. + sOs text DEFAULT NULL, + --- Informational, no fixed format. + sOsVersion text DEFAULT NULL, + --- Same as CPUID reports (GenuineIntel, AuthenticAMD, CentaurHauls, ...). + sCpuVendor text DEFAULT NULL, + --- Same as kBuild - x86, amd64, ... See KBUILD_ARCHES. + sCpuArch text DEFAULT NULL, + --- Number of CPUs, CPU cores and CPU threads. + cCpus smallint DEFAULT NULL CHECK (cCpus IS NULL OR cCpus > 0), + --- Set if capable of hardware virtualization. + fCpuHwVirt boolean DEFAULT NULL, + --- Set if capable of nested paging. + fCpuNestedPaging boolean DEFAULT NULL, + --- Set if CPU capable of 64-bit (VBox) guests. + fCpu64BitGuest boolean DEFAULT NULL, + --- Set if chipset with usable IOMMU (VT-d / AMD-Vi). + fChipsetIoMmu boolean DEFAULT NULL, + --- The (approximate) memory size in megabytes (rounded down to nearest 4 MB). + cMbMemory bigint DEFAULT NULL CHECK (cMbMemory IS NULL OR cMbMemory > 0), + --- The amount of scratch space in megabytes (rounded down to nearest 64 MB). + cMbScratch bigint DEFAULT NULL CHECK (cMbScratch IS NULL OR cMbScratch >= 0), + --- @} + + --- The testbox script revision number, serves the purpose of a version number. + -- Probably good to have when scheduling upgrades as well for status purposes. + iTestBoxScriptRev INTEGER DEFAULT 0 NOT NULL, + --- The python sys.hexversion (layed out as of 2.7). + -- Good to know which python versions we need to support. + iPythonHexVersion INTEGER DEFAULT NULL, + + --- Pending command. + -- @note We put it here instead of in TestBoxStatuses to get history. + enmPendingCmd TestBoxCmd_T DEFAULT 'none'::TestBoxCmd_T NOT NULL, + + PRIMARY KEY (idTestBox, tsExpire), + + --- Nested paging requires hardware virtualization. + CHECK (fCpuNestedPaging IS NULL OR (fCpuNestedPaging <> TRUE OR fCpuHwVirt = TRUE)) +); + + +INSERT INTO TestBoxes ( idTestBox, tsEffective, tsExpire, uidAuthor, idGenTestBox, ip, uuidSystem, sName, sDescription, + idSchedGroup, fEnabled, enmLomKind, ipLom, pctScaleTimeout, sOs, sOsVersion, sCpuVendor, sCpuArch, cCpus, fCpuHwVirt, + fCpuNestedPaging, fCpu64BitGuest, fChipsetIoMmu, cMbMemory, cMbScratch, iTestBoxScriptRev, iPythonHexVersion, + enmPendingCmd ) + SELECT idTestBox, tsEffective, tsExpire, uidAuthor, idGenTestBox, ip, uuidSystem, sName, sDescription, + idSchedGroup, fEnabled, enmLomKind, ipLom, pctScaleTimeout, sOs, sOsVersion, sCpuVendor, sCpuArch, cCpus, fCpuHwVirt, + fCpuNestedPaging, TRUE, fChipsetIoMmu, cMbMemory, cMbScratch, iTestBoxScriptRev, iPythonHexVersion, + enmPendingCmd + FROM OldTestBoxes; + +-- Add index. +CREATE UNIQUE INDEX TestBoxesUuidIdx ON TestBoxes (uuidSystem, tsExpire); + +-- Restore foreign key references to the table. +ALTER TABLE TestBoxStatuses ADD CONSTRAINT TestBoxStatuses_idGenTestBox_fkey FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox); +ALTER TABLE TestSets ADD CONSTRAINT TestSets_idGenTestBox_fkey FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox); + +-- Drop the old table. +DROP TABLE OldTestBoxes; + +COMMIT; + +\d TestBoxes; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r03-teststatus-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r03-teststatus-1.pgsql new file mode 100644 index 00000000..760666e3 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r03-teststatus-1.pgsql @@ -0,0 +1,48 @@ +-- $Id: tmdb-r03-teststatus-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds 'bad-testbox', 'aborted', and 'timeout' to TestStatus_T. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 1 + +\dT+ TestStatus_T + +ALTER TYPE TestStatus_T ADD VALUE 'bad-testbox' BEFORE 'failure'; +ALTER TYPE TestStatus_T ADD VALUE 'aborted' BEFORE 'failure'; +ALTER TYPE TestStatus_T ADD VALUE 'timed-out' AFTER 'failure'; + +\dT+ TestStatus_T + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r04-teststatus-2.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r04-teststatus-2.pgsql new file mode 100644 index 00000000..91aa9c73 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r04-teststatus-2.pgsql @@ -0,0 +1,46 @@ +-- $Id: tmdb-r04-teststatus-2.pgsql $ +--- @file +-- VBox Test Manager Database - Adds 'rebooted' to TestStatus_T. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 1 + +\dT+ TestStatus_T + +ALTER TYPE TestStatus_T ADD VALUE 'rebooted' AFTER 'timed-out'; + +\dT+ TestStatus_T + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r05-teststatus-3.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r05-teststatus-3.pgsql new file mode 100644 index 00000000..02b57df7 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r05-teststatus-3.pgsql @@ -0,0 +1,54 @@ +-- $Id: tmdb-r05-teststatus-3.pgsql $ +--- @file +-- VBox Test Manager Database - Adds 'rebooted' to TestStatus_T. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +\d+ TestResults + +ALTER TABLE TestResults + DROP CONSTRAINT CheckStatusMatchesErrors; +ALTER TABLE TestResults + ADD CONSTRAINT CheckStatusMatchesErrors + CHECK ( (cErrors > 0 AND enmStatus IN ('running'::TestStatus_T, + 'failure'::TestStatus_T, 'timed-out'::TestStatus_T, 'rebooted'::TestStatus_T )) + OR (cErrors = 0 AND enmStatus IN ('running'::TestStatus_T, 'success'::TestStatus_T, + 'skipped'::TestStatus_T, 'aborted'::TestStatus_T, 'bad-testbox'::TestStatus_T)) + ); +COMMIT; +\d+ TestResults + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r06-buildsources-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r06-buildsources-1.pgsql new file mode 100644 index 00000000..9db6350a --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r06-buildsources-1.pgsql @@ -0,0 +1,46 @@ +-- $Id: tmdb-r06-buildsources-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds cMaxSecondsOld to BuildSources. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 1 + +\d+ buildsources + +ALTER TABLE BuildSources ADD COLUMN cSecMaxAge INTEGER DEFAULT NULL; + +\d+ buildsources + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r07-testresults-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r07-testresults-1.pgsql new file mode 100644 index 00000000..9194be88 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r07-testresults-1.pgsql @@ -0,0 +1,47 @@ +-- $Id: tmdb-r07-testresults-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds an index to TestResults. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +\d+ TestResults + +CREATE INDEX TestResultsNameIdx ON TestResults (idStrName, idTestResult, tsCreated); +COMMIT; + +\d+ TestResults + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r08-testresultvalues-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r08-testresultvalues-1.pgsql new file mode 100644 index 00000000..c24d030d --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r08-testresultvalues-1.pgsql @@ -0,0 +1,47 @@ +-- $Id: tmdb-r08-testresultvalues-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds an index to TestResultValues. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +\d+ TestResultValues + +CREATE INDEX TestResultValuesNameIdx ON TestResultValues (idStrName, tsCreated); +COMMIT; + +\d+ TestResultValues + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r09-testsets-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r09-testsets-1.pgsql new file mode 100644 index 00000000..cd4f06e0 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r09-testsets-1.pgsql @@ -0,0 +1,48 @@ +-- $Id: tmdb-r09-testsets-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds two indexes to TestSets. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +\d+ TestSets + +CREATE INDEX TestSetsCreated ON TestSets (tsCreated); +CREATE INDEX TestSetsDone ON TestSets (tsDone); +COMMIT; + +\d+ TestSets + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r10-testresultvalues-2.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r10-testresultvalues-2.pgsql new file mode 100644 index 00000000..b18b02b9 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r10-testresultvalues-2.pgsql @@ -0,0 +1,111 @@ +-- $Id: tmdb-r10-testresultvalues-2.pgsql $ +--- @file +-- VBox Test Manager Database - Adds an idTestSet to TestResultValues. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Cleanup after failed runs. +-- +DROP TABLE NewTestResultValues; + +-- +-- Drop all indexes (might already be dropped). +-- +DROP INDEX TestResultValuesIdx; +DROP INDEX TestResultValuesNameIdx; + +-- Die on error from now on. +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +\d+ TestResultValues; + +-- +-- Create the new version of the table and filling with the content of the old. +-- +CREATE TABLE NewTestResultValues ( + --- The ID of this value. + idTestResultValue INTEGER DEFAULT NEXTVAL('TestResultValueIdSeq'), -- PRIMARY KEY + --- The test result it was reported within. + idTestResult INTEGER NOT NULL, -- REFERENCES TestResults(idTestResult) NOT NULL, + --- The test result it was reported within. + idTestSet INTEGER NOT NULL, -- REFERENCES TestSets(idTestSet) NOT NULL, + --- Creation time stamp. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- The name. + idStrName INTEGER NOT NULL, -- REFERENCES TestResultStrTab(idStr) NOT NULL, + --- The value. + lValue bigint NOT NULL, + --- The unit. + -- @todo This is currently not defined properly. Will fix/correlate this + -- with the other places we use unit (IPRT/testdriver/VMMDev). + iUnit smallint NOT NULL --CHECK (iUnit >= 0 AND iUnit < 1024) +); +COMMIT; +\d+ NewTestResultValues + +-- Note! Using left out join here to speed up things (no hashing). +SELECT COUNT(*) FROM TestResultValues a LEFT OUTER JOIN TestResults b ON (a.idTestResult = b.idTestResult); +SELECT COUNT(*) FROM TestResultValues; + +INSERT INTO NewTestResultValues (idTestResultValue, idTestResult, idTestSet, tsCreated, idStrName, lValue, iUnit) + SELECT a.idTestResultValue, a.idTestResult, b.idTestSet, a.tsCreated, a.idStrName, a.lValue, a.iUnit + FROM TestResultValues a LEFT OUTER JOIN TestResults b ON (a.idTestResult = b.idTestResult); +COMMIT; +SELECT COUNT(*) FROM NewTestResultValues; + +-- Switch the tables. +ALTER TABLE TestResultValues RENAME TO OldTestResultValues; +ALTER TABLE NewTestResultValues RENAME TO TestResultValues; +COMMIT; + +-- Index the table. +CREATE INDEX TestResultValuesIdx ON TestResultValues(idTestResult); +CREATE INDEX TestResultValuesNameIdx ON TestResultValues(idStrName, tsCreated); +COMMIT; + +-- Drop the old table. +DROP TABLE OldTestResultValues; +COMMIT; + +-- Add the constraints constraint. +ALTER TABLE TestResultValues ADD CONSTRAINT TestResultValues_iUnit_Check CHECK (iUnit >= 0 AND iUnit < 1024); +ALTER TABLE TestResultValues ADD PRIMARY KEY (idTestResultValue); +ALTER TABLE TestResultValues ADD FOREIGN KEY (idStrName) REFERENCES TestResultstrtab(idStr); +ALTER TABLE TestResultValues ADD FOREIGN KEY (idTestResult) REFERENCES TestResults(idTestResult); +ALTER TABLE TestResultValues ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet); +COMMIT; + +\d+ TestResultValues; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r11-testsets-2.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r11-testsets-2.pgsql new file mode 100644 index 00000000..4c6e7b6d --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r11-testsets-2.pgsql @@ -0,0 +1,214 @@ +-- $Id: tmdb-r11-testsets-2.pgsql $ +--- @file +-- VBox Test Manager Database - Adds an idBuildCategories to TestSets. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Drop all indexes (might already be dropped). +-- +DROP INDEX TestSetsGangIdx; +DROP INDEX TestSetsBoxIdx; +DROP INDEX TestSetsBuildIdx; +DROP INDEX TestSetsTestCaseIdx; +DROP INDEX TestSetsTestVarIdx; +DROP INDEX TestSetsCreated; +DROP INDEX TestSetsDone; + +-- +-- Drop foreign keys on this table. +-- +ALTER TABLE SchedQueues DROP CONSTRAINT SchedQueues_idTestSetGangLeader_fkey; +ALTER TABLE TestBoxStatuses DROP CONSTRAINT TestBoxStatuses_idTestSet_fkey; +ALTER TABLE TestResults DROP CONSTRAINT idTestSetFk; -- old name +ALTER TABLE TestResults DROP CONSTRAINT TestResults_idTestSet_fkey; +ALTER TABLE TestResultValues DROP CONSTRAINT TestResultValues_idTestSet_fkey; + +-- +-- Cleanup after failed runs. +-- +DROP TABLE NewTestSets; +DROP TABLE OldTestSets; + +-- Die on error from now on. +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +\d+ TestSets; + +-- +-- Create the new version of the table and filling with the content of the old. +-- +CREATE TABLE NewTestSets ( + --- The ID of this test set. + idTestSet INTEGER DEFAULT NEXTVAL('TestSetIdSeq') NOT NULL, -- PRIMARY KEY + + --- The test config timestamp, used when reading test config. + tsConfig TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, + --- When this test set was scheduled. + -- idGenTestBox is valid at this point. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, + --- When this test completed, i.e. testing stopped. This should only be set once. + tsDone TIMESTAMP WITH TIME ZONE DEFAULT NULL, + --- The current status. + enmStatus TestStatus_T DEFAULT 'running'::TestStatus_T NOT NULL, + + --- The build we're testing. + -- Non-unique foreign key: Builds(idBuild) + 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 + -- the WHERE part of the selection. + idBuildCategory INTEGER , -- NOT NULL REFERENCES BuildCategories(idBuildCategory) + --- The test suite build we're using to do the testing. + -- This is NULL if the test suite zip wasn't referred or if a test suite + -- build source wasn't configured. + -- Non-unique foreign key: Builds(idBuild) + idBuildTestSuite INTEGER DEFAULT NULL, + + --- The exact testbox configuration. + idGenTestBox INTEGER NOT NULL, -- REFERENCES TestBoxes(idGenTestBox) + --- The testbox ID for joining with (valid: tsStarted). + -- Non-unique foreign key: TestBoxes(idTestBox) + idTestBox INTEGER NOT NULL, + + --- The testgroup (valid: tsConfig). + -- Non-unique foreign key: TestBoxes(idTestGroup) + -- Note! This also gives the member ship entry, since a testcase can only + -- have one membership per test group. + idTestGroup INTEGER NOT NULL, + + --- The exact test case config we executed in this test run. + idGenTestCase INTEGER NOT NULL, -- REFERENCES TestCases(idGenTestCase) + --- The test case ID for joining with (valid: tsConfig). + -- Non-unique foreign key: TestBoxes(idTestCase) + idTestCase INTEGER NOT NULL, + + --- The arguments (and requirements++) we executed this test case with. + idGenTestCaseArgs INTEGER NOT NULL, -- REFERENCES TestCaseArgs(idGenTestCaseArgs) + --- The argument variation ID (valid: tsConfig). + -- Non-unique foreign key: TestCaseArgs(idTestCaseArgs) + idTestCaseArgs INTEGER NOT NULL, + + --- The root of the test result tree. + -- @note This will only be NULL early in the transaction setting up the testset. + -- @note If the test reports more than one top level test result, we'll + -- fail the whole test run and let the test developer fix it. + idTestResult INTEGER DEFAULT NULL, -- REFERENCES TestResults(idTestResult) + + --- The base filename used for storing files related to this test set. + -- This is a path relative to wherever TM is dumping log files. In order + -- to not become a file system test case, we will try not to put too many + -- hundred thousand files in a directory. A simple first approach would + -- be to just use the current date (tsCreated) like this: + -- TM_FILE_DIR/year/month/day/TestSets.idTestSet + -- + -- The primary log file for the test is this name suffixed by '.log'. + -- + -- The files in the testresultfile table gets their full names like this: + -- TM_FILE_DIR/sBaseFilename-testresultfile.id-TestResultStrTab(testresultfile.idStrFilename) + -- + -- @remarks We store this explicitly in case we change the directly layout + -- at some later point. + sBaseFilename text UNIQUE NOT NULL, + + --- The gang member number number, 0 is the leader. + iGangMemberNo SMALLINT DEFAULT 0 NOT NULL, --CHECK (iGangMemberNo >= 0 AND iGangMemberNo < 1024), + --- The test set of the gang leader, NULL if no gang involved. + -- @note This is set by the gang leader as well, so that we can find all + -- gang members by WHERE idTestSetGangLeader = :id. + idTestSetGangLeader INTEGER DEFAULT NULL -- REFERENCES TestSets(idTestSet) + +); +COMMIT; +\d+ NewTestSets + +-- Note! Using left out join here to speed up things (no hashing). +SELECT COUNT(*) FROM TestSets a LEFT OUTER JOIN Builds b ON (a.idBuild = b.idBuild AND b.tsExpire = 'infinity'::TIMESTAMP); +SELECT COUNT(*) FROM TestSets; + +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, + 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); +COMMIT; +SELECT COUNT(*) FROM NewTestSets; + +-- Note! 2-3 builds are missing from the Builds table, so fudge it. +UPDATE NewTestSets + SET idBuildCategory = 1 + WHERE idBuildCategory IS NULL; + +-- Switch the tables. +ALTER TABLE TestSets RENAME TO OldTestSets; +ALTER TABLE NewTestSets RENAME TO TestSets; +COMMIT; + +-- Index the table. +CREATE INDEX TestSetsGangIdx ON TestSets (idTestSetGangLeader); +CREATE INDEX TestSetsBoxIdx ON TestSets (idTestBox, idTestResult); +CREATE INDEX TestSetsBuildIdx ON TestSets (idBuild, idTestResult); +CREATE INDEX TestSetsTestCaseIdx ON TestSets (idTestCase, idTestResult); +CREATE INDEX TestSetsTestVarIdx ON TestSets (idTestCaseArgs, idTestResult); +CREATE INDEX TestSetsCreated ON TestSets (tsCreated); +CREATE INDEX TestSetsDone ON TestSets (tsDone); +COMMIT; + +-- Drop the old table. +DROP TABLE OldTestSets; +COMMIT; + +-- Add the constraints constraint. +ALTER TABLE TestSets ADD CONSTRAINT TestSets_iGangMemberNo_Check CHECK (iGangMemberNo >= 0 AND iGangMemberNo < 1024); +ALTER TABLE TestSets ADD PRIMARY KEY (idTestSet); +ALTER TABLE TestSets ADD FOREIGN KEY (idBuildCategory) REFERENCES BuildCategories(idBuildCategory); +ALTER TABLE TestSets ADD FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox); +ALTER TABLE TestSets ADD FOREIGN KEY (idGenTestCase) REFERENCES TestCases(idGenTestCase); +ALTER TABLE TestSets ADD FOREIGN KEY (idGenTestCaseArgs) REFERENCES TestCaseArgs(idGenTestCaseArgs); +ALTER TABLE TestSets ADD FOREIGN KEY (idTestResult) REFERENCES TestResults(idTestResult); +ALTER TABLE TestSets ADD FOREIGN KEY (idTestSetGangLeader) REFERENCES TestSets(idTestSet); +COMMIT; + +-- Restore foreign keys. +LOCK TABLE SchedQueues, TestBoxStatuses, TestResults, TestResultValues IN EXCLUSIVE MODE; +ALTER TABLE SchedQueues ADD FOREIGN KEY (idTestSetGangLeader) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestBoxStatuses ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResults ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResultValues ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +COMMIT; + +\d+ TestSets; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r12-testresultvalues-3-testsets-3.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r12-testresultvalues-3-testsets-3.pgsql new file mode 100644 index 00000000..ef375340 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r12-testresultvalues-3-testsets-3.pgsql @@ -0,0 +1,58 @@ +-- $Id: tmdb-r12-testresultvalues-3-testsets-3.pgsql $ +--- @file +-- VBox Test Manager Database - Graph related optimizations for TestResultValues and TestSets. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +\d+ TestResultValues + +-- Rename index to better show it's purpose. +ALTER INDEX TestResultValuesNameIdx RENAME TO TestResultValuesGraphIdx; +COMMIT; + +-- Combine the tsCreated and tsDone indexes. +DROP INDEX TestSetsCreated; +DROP INDEX TestSetsDone; +CREATE INDEX TestSetsCreatedDoneIdx ON TestSets (tsCreated, tsDone); +COMMIT; + +-- Create index for graph. +CREATE INDEX TestSetsGraphBoxIdx ON TestSets (idTestBox, tsCreated, tsDone, idBuildCategory, idTestCase); +COMMIT; + +\d+ TestResultValues + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r13-buildcategories-1-vcsrevisions-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r13-buildcategories-1-vcsrevisions-1.pgsql new file mode 100644 index 00000000..e00c548a --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r13-buildcategories-1-vcsrevisions-1.pgsql @@ -0,0 +1,134 @@ +-- $Id: tmdb-r13-buildcategories-1-vcsrevisions-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds an sRepository to Builds and creates a new VcsRepositories table. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Cleanup after failed runs. +-- +DROP TABLE NewBuildCategories; +DROP TABLE OldBuildCategories; + +-- +-- Drop foreign keys on this table. +-- +ALTER TABLE Builds DROP CONSTRAINT NewBuilds_idBuildCategory_fkey; +ALTER TABLE Builds DROP CONSTRAINT Builds_idBuildCategory_fkey; +ALTER TABLE TestSets DROP CONSTRAINT TestSets_idBuildCategory_fkey; + +-- Die on error from now on. +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +\d+ BuildCategories; + +-- +-- Create the new version of the table and filling with the content of the old. +-- +CREATE TABLE NewBuildCategories ( + --- The build type identifier. + idBuildCategory INTEGER PRIMARY KEY DEFAULT NEXTVAL('BuildCategoryIdSeq') NOT NULL, + --- Product. + -- The product name. For instance 'VBox' or 'VBoxTestSuite'. + sProduct TEXT NOT NULL, + --- The version control repository name. + sRepository TEXT NOT NULL, + --- The branch name (in the version control system). + sBranch TEXT NOT NULL, + --- The build type. + -- See KBUILD_BLD_TYPES in kBuild for a list of standard build types. + sType TEXT NOT NULL, + --- Array of the 'sOs.sCpuArch' supported by the build. + -- See KBUILD_OSES in kBuild for a list of standard target OSes, and + -- KBUILD_ARCHES for a list of standard architectures. + -- + -- @remarks 'os-agnostic' is used if the build doesn't really target any + -- specific OS or if it targets all applicable OSes. + -- 'noarch' is used if the build is architecture independent or if + -- all applicable architectures are handled. + -- Thus, 'os-agnostic.noarch' will run on all build boxes. + -- + -- @note The array shall be sorted ascendingly to prevent unnecessary duplicates! + -- + asOsArches TEXT ARRAY NOT NULL, + + UNIQUE (sProduct, sRepository, sBranch, sType, asOsArches) +); +COMMIT; +\d+ NewBuildCategories + +INSERT INTO NewBuildCategories (idBuildCategory, sProduct, sRepository, sBranch, sType, asOsArches) + SELECT idBuildCategory, sProduct, 'vbox', sBranch, sType, asOsArches + FROM BuildCategories +COMMIT; + +-- Switch the tables. +ALTER TABLE BuildCategories RENAME TO OldBuildCategories; +ALTER TABLE NewBuildCategories RENAME TO BuildCategories; +COMMIT; + +-- Drop the old table. +DROP TABLE OldBuildCategories; +COMMIT; + +-- Restore foreign keys. +LOCK TABLE Builds, TestSets; +ALTER TABLE Builds ADD FOREIGN KEY (idBuildCategory) REFERENCES BuildCategories(idBuildCategory); +ALTER TABLE TestSets ADD FOREIGN KEY (idBuildCategory) REFERENCES BuildCategories(idBuildCategory); +COMMIT; + +\d+ BuildCategories; + + +-- +-- Create the new VcsRevisions table. +-- +CREATE TABLE VcsRevisions ( + --- The version control tree name. + sRepository TEXT NOT NULL, + --- The version control tree revision number. + iRevision INTEGER NOT NULL, + --- When the revision was created (committed). + tsCreated TIMESTAMP WITH TIME ZONE NOT NULL, + --- The name of the committer. + -- @note Not to be confused with uidAuthor and test manager users. + sAuthor TEXT, + --- The commit message. + sMessage TEXT, + + UNIQUE (sRepository, iRevision) +); +COMMIT; +\d+ VcsRevisions; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r14-testboxes-2.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r14-testboxes-2.pgsql new file mode 100644 index 00000000..26a05b66 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r14-testboxes-2.pgsql @@ -0,0 +1,201 @@ +-- $Id: tmdb-r14-testboxes-2.pgsql $ +--- @file +-- VBox Test Manager Database - Adds sCpuName, lCpuRevision and sReport to TestBoxes. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +DROP TABLE OldTestBoxes; +DROP TABLE NewTestBoxes; + +\d TestBoxes; + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +LOCK TABLE TestBoxStatuses IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestSets IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestBoxes IN ACCESS EXCLUSIVE MODE; + +DROP INDEX TestBoxesUuidIdx; + +-- +-- Rename the original table, drop constrains and foreign key references so we +-- get the right name automatic when creating the new one. +-- +ALTER TABLE TestBoxes RENAME TO OldTestBoxes; + +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_ccpus_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_cmbmemory_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_cmbscratch_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_pctscaletimeout_check; + +ALTER TABLE TestBoxStatuses DROP CONSTRAINT TestBoxStatuses_idGenTestBox_fkey; +ALTER TABLE TestSets DROP CONSTRAINT TestSets_idGenTestBox_fkey; + +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_pkey; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_idgentestbox_key; + +-- +-- Create the new table, filling it with the current TestBoxes content. +-- +CREATE TABLE TestBoxes ( + --- The fixed testbox ID. + -- This is assigned when the testbox is created and will never change. + idTestBox INTEGER DEFAULT NEXTVAL('TestBoxIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- When modified automatically by the testbox, NULL is used. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER DEFAULT NULL, + --- Generation ID for this row. + -- This is primarily for referencing by TestSets. + idGenTestBox INTEGER UNIQUE DEFAULT NEXTVAL('TestBoxGenIdSeq') NOT NULL, + + --- The testbox IP. + -- This is from the webserver point of view and automatically updated on + -- SIGNON. The test setup doesn't permit for IP addresses to change while + -- the testbox is operational, because this will break gang tests. + ip inet NOT NULL, + --- The system or firmware UUID. + -- This uniquely identifies the testbox when talking to the server. After + -- SIGNON though, the testbox will also provide idTestBox and ip to + -- establish its identity beyond doubt. + uuidSystem uuid NOT NULL, + --- The testbox name. + -- Usually similar to the DNS name. + sName text NOT NULL, + --- Optional testbox description. + -- Intended for describing the box as well as making other relevant notes. + sDescription text DEFAULT NULL, + + --- Reference to the scheduling group that this testbox is a member of. + -- Non-unique foreign key: SchedGroups(idSchedGroup) + -- A testbox is always part of a group, the default one nothing else. + idSchedGroup INTEGER DEFAULT 1 NOT NULL, + + --- Indicates whether this testbox is enabled. + -- A testbox gets disabled when we're doing maintenance, debugging a issue + -- that happens only on that testbox, or some similar stuff. This is an + -- alternative to deleting the testbox. + fEnabled BOOLEAN DEFAULT NULL, + + --- The kind of lights-out-management. + enmLomKind LomKind_T DEFAULT 'none'::LomKind_T NOT NULL, + --- The IP adress of the lights-out-management. + -- This can be NULL if enmLomKind is 'none', otherwise it must contain a valid address. + ipLom inet DEFAULT NULL, + + --- Timeout scale factor, given as a percent. + -- This is a crude adjustment of the test case timeout for slower hardware. + pctScaleTimeout smallint DEFAULT 100 NOT NULL CHECK (pctScaleTimeout > 10 AND pctScaleTimeout < 20000), + + --- @name Scheduling properties (reported by testbox script). + -- @{ + --- Same abbrieviations as kBuild, see KBUILD_OSES. + sOs text DEFAULT NULL, + --- Informational, no fixed format. + sOsVersion text DEFAULT NULL, + --- Same as CPUID reports (GenuineIntel, AuthenticAMD, CentaurHauls, ...). + sCpuVendor text DEFAULT NULL, + --- Same as kBuild - x86, amd64, ... See KBUILD_ARCHES. + sCpuArch text DEFAULT NULL, + --- The CPU name if available. + sCpuName text DEFAULT NULL, + --- Number identifying the CPU family/model/stepping/whatever. + -- For x86 and AMD64 type CPUs, this will on the following format: + -- (EffFamily << 24) | (EffModel << 8) | Stepping. + lCpuRevision bigint DEFAULT NULL, + --- Number of CPUs, CPU cores and CPU threads. + cCpus smallint DEFAULT NULL CHECK (cCpus IS NULL OR cCpus > 0), + --- Set if capable of hardware virtualization. + fCpuHwVirt boolean DEFAULT NULL, + --- Set if capable of nested paging. + fCpuNestedPaging boolean DEFAULT NULL, + --- Set if CPU capable of 64-bit (VBox) guests. + fCpu64BitGuest boolean DEFAULT NULL, + --- Set if chipset with usable IOMMU (VT-d / AMD-Vi). + fChipsetIoMmu boolean DEFAULT NULL, + --- The (approximate) memory size in megabytes (rounded down to nearest 4 MB). + cMbMemory bigint DEFAULT NULL CHECK (cMbMemory IS NULL OR cMbMemory > 0), + --- The amount of scratch space in megabytes (rounded down to nearest 64 MB). + cMbScratch bigint DEFAULT NULL CHECK (cMbScratch IS NULL OR cMbScratch >= 0), + --- Free form hardware and software report field. + sReport text DEFAULT NULL, + --- @} + + --- The testbox script revision number, serves the purpose of a version number. + -- Probably good to have when scheduling upgrades as well for status purposes. + iTestBoxScriptRev INTEGER DEFAULT 0 NOT NULL, + --- The python sys.hexversion (layed out as of 2.7). + -- Good to know which python versions we need to support. + iPythonHexVersion INTEGER DEFAULT NULL, + + --- Pending command. + -- @note We put it here instead of in TestBoxStatuses to get history. + enmPendingCmd TestBoxCmd_T DEFAULT 'none'::TestBoxCmd_T NOT NULL, + + PRIMARY KEY (idTestBox, tsExpire), + + --- Nested paging requires hardware virtualization. + CHECK (fCpuNestedPaging IS NULL OR (fCpuNestedPaging <> TRUE OR fCpuHwVirt = TRUE)) +); + +INSERT INTO TestBoxes ( idTestBox, tsEffective, tsExpire, uidAuthor, idGenTestBox, ip, uuidSystem, sName, sDescription, + idSchedGroup, fEnabled, enmLomKind, ipLom, pctScaleTimeout, sOs, sOsVersion, sCpuVendor, sCpuArch, sCpuName, + lCpuRevision, cCpus, fCpuHwVirt, fCpuNestedPaging, fCpu64BitGuest, fChipsetIoMmu, cMbMemory, cMbScratch, sReport, + iTestBoxScriptRev, iPythonHexVersion, enmPendingCmd ) + SELECT idTestBox, tsEffective, tsExpire, uidAuthor, idGenTestBox, ip, uuidSystem, sName, sDescription, + idSchedGroup, fEnabled, enmLomKind, ipLom, pctScaleTimeout, sOs, sOsVersion, sCpuVendor, sCpuArch, NULL, + NULL, cCpus, fCpuHwVirt, fCpuNestedPaging, fCpu64BitGuest, fChipsetIoMmu, cMbMemory, cMbScratch, NULL, + iTestBoxScriptRev, iPythonHexVersion, enmPendingCmd + FROM OldTestBoxes; + +-- Add index. +CREATE UNIQUE INDEX TestBoxesUuidIdx ON TestBoxes (uuidSystem, tsExpire); + +-- Restore foreign key references to the table. +ALTER TABLE TestBoxStatuses ADD CONSTRAINT TestBoxStatuses_idGenTestBox_fkey FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox); +ALTER TABLE TestSets ADD CONSTRAINT TestSets_idGenTestBox_fkey FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox); + +-- Drop the old table. +DROP TABLE OldTestBoxes; + +COMMIT; + +\d TestBoxes; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r15-index-sorting.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r15-index-sorting.pgsql new file mode 100644 index 00000000..e182d648 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r15-index-sorting.pgsql @@ -0,0 +1,108 @@ +-- $Id: tmdb-r15-index-sorting.pgsql $ +--- @file +-- VBox Test Manager Database - Index tuning effort. +-- + +-- +-- Copyright (C) 2015-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +-- +-- Reordered, modified and new indexes. +-- +\d UsersLoginNameIdx; +DROP INDEX UsersLoginNameIdx; +CREATE INDEX UsersLoginNameIdx ON Users (sLoginName, tsExpire DESC); +\d UsersLoginNameIdx; +ANALYZE VERBOSE Users; + + +\d TestCaseArgsLookupIdx; +DROP INDEX TestCaseArgsLookupIdx; +CREATE INDEX TestCaseArgsLookupIdx ON TestCaseArgs (idTestCase, tsExpire DESC, tsEffective ASC); +\d TestCaseArgsLookupIdx; +ANALYZE VERBOSE TestCaseArgs; + + +\d TestGroups_id_index; +DROP INDEX TestGroups_id_index; +CREATE INDEX TestGroups_id_index ON TestGroups (idTestGroup, tsExpire DESC, tsEffective ASC); +\d TestGroups_id_index; +ANALYZE VERBOSE TestGroups; + + +\d TestBoxesUuidIdx; +DROP INDEX TestBoxesUuidIdx; +CREATE UNIQUE INDEX TestBoxesUuidIdx ON TestBoxes (uuidSystem, tsExpire DESC); +\d TestBoxesUuidIdx; +DROP INDEX IF EXISTS TestBoxesExpireEffectiveIdx; +CREATE INDEX TestBoxesExpireEffectiveIdx ON TestBoxes (tsExpire DESC, tsEffective ASC); +\d TestBoxesExpireEffectiveIdx; +ANALYZE VERBOSE TestBoxes; + + +DROP INDEX IF EXISTS BuildBlacklistIdx; +CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch, + tsExpire DESC, tsEffective ASC); +\d BuildBlacklist; +ANALYZE VERBOSE BuildBlacklist; + + +\d TestResultsNameIdx; +DROP INDEX TestResultsNameIdx; +CREATE INDEX TestResultsNameIdx ON TestResults (idStrName, tsCreated DESC); +\d TestResultsNameIdx; +DROP INDEX IF EXISTS TestResultsNameIdx2; +CREATE INDEX TestResultsNameIdx2 ON TestResults (idTestResult, idStrName); +\d TestResultsNameIdx2; +ANALYZE VERBOSE TestResults; + + +\d TestSetsCreatedDoneIdx; +DROP INDEX TestSetsCreatedDoneIdx; +DROP INDEX IF EXISTS TestSetsDoneCreatedBuildCatIdx; +CREATE INDEX TestSetsDoneCreatedBuildCatIdx ON TestSets (tsDone DESC NULLS FIRST, tsCreated ASC, idBuildCategory); +\d TestSetsDoneCreatedBuildCatIdx; +\d TestSetsGraphBoxIdx; +DROP INDEX TestSetsGraphBoxIdx; +CREATE INDEX TestSetsGraphBoxIdx ON TestSets (idTestBox, tsCreated DESC, tsDone ASC NULLS LAST, idBuildCategory, idTestCase); +\d TestSetsGraphBoxIdx; +ANALYZE VERBOSE TestSets; + + +DROP INDEX IF EXISTS SchedQueuesItemIdx; +CREATE INDEX SchedQueuesItemIdx ON SchedQueues(idItem); +\d SchedQueuesItemIdx; +DROP INDEX IF EXISTS SchedQueuesSchedGroupIdx; +CREATE INDEX SchedQueuesSchedGroupIdx ON SchedQueues(idSchedGroup); +\d SchedQueuesSchedGroupIdx; +ANALYZE VERBOSE SchedQueues; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql new file mode 100644 index 00000000..cc00d8db --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql @@ -0,0 +1,122 @@ +-- $Id: tmdb-r16-testcaseargs-1-testresultfailures-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds sName to TestCaseArgs, idTestSet +-- to TestResultFailures and add some indexes to the latter as well. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +DROP TABLE OldTestCaseArgs; +DROP TABLE NewTestCaseArgs; + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +LOCK TABLE TestBoxStatuses IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestSets IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestCaseArgs IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestResultFailures IN ACCESS EXCLUSIVE MODE; + +-- +-- TestCaseArgs is simple and we can use ALTER TABLE for a change. +-- +\d TestCaseArgs; +ALTER TABLE TestCaseArgs ADD COLUMN sSubName text DEFAULT NULL; +\d TestCaseArgs; + + +-- +-- Rename the original table, drop constrains and foreign key references so we +-- get the right name automatic when creating the new one. +-- +\d TestResultFailures; +ALTER TABLE TestResultFailures DROP CONSTRAINT idTestResultFk; +ALTER TABLE TestResultFailures RENAME TO OldTestResultFailures; + +DROP INDEX IF EXISTS TestResultFailureIdx; +DROP INDEX IF EXISTS TestResultFailureIdx2; +DROP INDEX IF EXISTS TestResultFailureIdx3; + + +CREATE TABLE TestResultFailures ( + --- The test result we're disucssing. + -- @note The foreign key is declared after TestResults (further down). + idTestResult INTEGER NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + --- The testsest this result is a part of. + -- This is mainly an aid for bypassing the enormous TestResults table. + -- Note! This is a foreign key, but we have to add it after TestSets has + -- been created, see further down. + idTestSet INTEGER NOT NULL, + + --- The suggested failure reason. + -- Non-unique foreign key: FailureReasons(idFailureReason) + idFailureReason INTEGER NOT NULL, + --- Optional comment. + sComment text DEFAULT NULL, + + PRIMARY KEY (idTestResult, tsExpire) +); + +INSERT INTO TestResultFailures ( idTestResult, tsEffective, tsExpire, uidAuthor, idTestSet, idFailureReason, sComment ) + SELECT o.idTestResult, o.tsEffective, o.tsExpire, o.uidAuthor, tr.idTestSet, o.idFailureReason, sComment + FROM OldTestResultFailures o, + 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 + FOREIGN KEY (idTestResult, idTestSet) REFERENCES TestResults(idTestResult, idTestSet) MATCH FULL; + +-- Add new indexes. +CREATE INDEX TestResultFailureIdx ON TestResultFailures (idTestSet, tsExpire DESC, tsEffective ASC); +CREATE INDEX TestResultFailureIdx2 ON TestResultFailures (idTestResult, tsExpire DESC, tsEffective ASC); +CREATE INDEX TestResultFailureIdx3 ON TestResultFailures (idFailureReason, idTestResult, tsExpire DESC, tsEffective ASC); + +-- Drop the old table. +DROP TABLE OldTestResultFailures; + +COMMIT; + +\d TestResultFailures; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r17-testresultvalues-4.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r17-testresultvalues-4.pgsql new file mode 100644 index 00000000..fbe40a5c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r17-testresultvalues-4.pgsql @@ -0,0 +1,48 @@ +-- $Id: tmdb-r17-testresultvalues-4.pgsql $ +--- @file +-- VBox Test Manager Database - Log viewer related optimizations for TestResultValues. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +\d+ TestResultValues + +-- Create index for the log viewer +CREATE INDEX TestResultValuesLogIdx ON TestResultValues(idTestSet, tsCreated); +COMMIT; + +\d+ TestResultValues + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql new file mode 100644 index 00000000..9adb15d0 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql @@ -0,0 +1,171 @@ +-- $Id: tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds an idTestSet to TestResultFiles and TestResultMsgs. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Cleanup after failed runs. +-- +DROP TABLE IF EXISTS NewTestResultFiles; +DROP TABLE IF EXISTS OldTestResultFiles; +DROP TABLE IF EXISTS NewTestResultMsgs; +DROP TABLE IF EXISTS OldTestResultMsgs; + +-- Die on error from now on. +\set ON_ERROR_STOP 1 +\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. +-- +\d+ TestResultFiles; +ALTER TABLE TestResultFiles RENAME TO OldTestResultFiles; + +DROP INDEX IF EXISTS TestResultFilesIdx; +DROP INDEX IF EXISTS TestResultFilesIdx2; + +-- +-- Create the new version of the table and filling with the content of the old. +-- +CREATE TABLE TestResultFiles ( + --- The ID of this file. + idTestResultFile INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestResultFileId'), + --- The test result it was reported within. + idTestResult INTEGER NOT NULL, + --- The test set this file is a part of (for avoiding joining thru TestResults). + idTestSet INTEGER NOT NULL, + --- Creation time stamp. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- The filename relative to TestSets(sBaseFilename) + '-'. + -- The set of valid filename characters should be very limited so that no + -- file system issues can occure either on the TM side or the user when + -- loading the files. Tests trying to use other characters will fail. + -- Valid character regular expession: '^[a-zA-Z0-9_-(){}#@+,.=]*$' + idStrFile INTEGER NOT NULL, + --- The description. + idStrDescription INTEGER NOT NULL, + --- The kind of file. + -- For instance: 'log/release/vm', + -- 'screenshot/failure', + -- 'screencapture/failure', + -- 'xmllog/somestuff' + idStrKind INTEGER NOT NULL, + --- The mime type for the file. + -- For instance: 'text/plain', + -- 'image/png', + -- 'video/webm', + -- 'text/xml' + idStrMime INTEGER NOT NULL +); + +INSERT INTO TestResultFiles ( idTestResultFile, idTestResult, idTestSet, tsCreated, idStrFile, idStrDescription, + idStrKind, idStrMime) + 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); +CREATE INDEX TestResultFilesIdx2 ON TestResultFiles(idTestSet, tsCreated DESC); + +-- Restore foreign keys. +ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idTestResult_fkey FOREIGN KEY(idTestResult) REFERENCES TestResults(idTestResult); +ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idTestSet_fkey FOREIGN KEY(idTestSet) REFERENCES TestSets(idTestSet); +ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idStrFile_fkey FOREIGN KEY(idStrFile) REFERENCES TestResultStrTab(idStr); +ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idStrDescription_fkey FOREIGN KEY(idStrDescription) REFERENCES TestResultStrTab(idStr); +ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idStrKind_fkey FOREIGN KEY(idStrKind) REFERENCES TestResultStrTab(idStr); +ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idStrMime_fkey FOREIGN KEY(idStrMime) REFERENCES TestResultStrTab(idStr); + +\d TestResultFiles; + + +-- +-- 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; + +DROP INDEX IF EXISTS TestResultMsgsIdx; +DROP INDEX IF EXISTS TestResultMsgsIdx2; + +-- +-- Create the new version of the table and filling with the content of the old. +-- +CREATE TABLE TestResultMsgs ( + --- The ID of this file. + idTestResultMsg INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestResultMsgIdSeq'), + --- The test result it was reported within. + idTestResult INTEGER NOT NULL, + --- The test set this file is a part of (for avoiding joining thru TestResults). + idTestSet INTEGER NOT NULL, + --- Creation time stamp. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- The message string. + idStrMsg INTEGER NOT NULL, + --- The message level. + enmLevel TestResultMsgLevel_T NOT NULL +); + +INSERT INTO TestResultMsgs ( idTestResultMsg, idTestResult, idTestSet, tsCreated, idStrMsg, 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); +CREATE INDEX TestResultMsgsIdx2 ON TestResultMsgs(idTestSet, tsCreated DESC); + +-- Restore foreign keys. +ALTER TABLE TestResultMsgs ADD CONSTRAINT TestResultMsgs_idTestResult_fkey FOREIGN KEY(idTestResult) REFERENCES TestResults(idTestResult); +ALTER TABLE TestResultMsgs ADD CONSTRAINT TestResultMsgs_idTestSet_fkey FOREIGN KEY(idTestSet) REFERENCES TestSets(idTestSet); +ALTER TABLE TestResultMsgs ADD CONSTRAINT TestResultMsgs_idStrMsg_fkey FOREIGN KEY(idStrMsg) REFERENCES TestResultStrTab(idStr); + + +\d TestResultMsgs; + + +-- +-- Drop the old tables and commit. +-- +DROP TABLE OldTestResultFiles; +DROP TABLE OldTestResultMsgs; + +COMMIT; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r19-testboxes-3.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r19-testboxes-3.pgsql new file mode 100644 index 00000000..3d3cfd8e --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r19-testboxes-3.pgsql @@ -0,0 +1,356 @@ +-- $Id: tmdb-r19-testboxes-3.pgsql $ +--- @file +-- VBox Test Manager Database - Adds sComment and fRawMode to TestBoxes and +-- moves the strings to separate table. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Cleanup after failed runs. +-- +DROP TABLE IF EXISTS OldTestBoxes; + +-- Die on error from now on. +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +-- Sanity check that we haven't already run this script. +SELECT 'done conversion already?', COUNT(sReport) FROM TestBoxes WHERE tsExpire = 'infinity'::TIMESTAMP; + +-- Total grid lock. +LOCK TABLE TestBoxStatuses IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestSets IN ACCESS EXCLUSIVE MODE; +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 +-- 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. +-- +ALTER TABLE TestBoxes RENAME TO OldTestBoxes; + +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_ccpus_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_cmbmemory_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_cmbscratch_check; +ALTER TABLE OldTestBoxes DROP CONSTRAINT testboxes_pctscaletimeout_check; + +ALTER TABLE TestBoxStatuses DROP CONSTRAINT TestBoxStatuses_idGenTestBox_fkey; +ALTER TABLE TestSets DROP CONSTRAINT TestSets_idGenTestBox_fkey; + +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 +-- on converting strings just to find a typo in the TestBoxes create table syntax). +-- +CREATE SEQUENCE TestBoxStrTabIdSeq + START 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; +CREATE TABLE TestBoxStrTab ( + --- The ID of this string. + idStr INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestBoxStrTabIdSeq'), + --- The string value. + sValue text NOT NULL, + --- Creation time stamp. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL +); + +CREATE TABLE TestBoxes ( + --- The fixed testbox ID. + -- This is assigned when the testbox is created and will never change. + idTestBox INTEGER DEFAULT NEXTVAL('TestBoxIdSeq') NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- When modified automatically by the testbox, NULL is used. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER DEFAULT NULL, + --- Generation ID for this row. + -- This is primarily for referencing by TestSets. + idGenTestBox INTEGER UNIQUE DEFAULT NEXTVAL('TestBoxGenIdSeq') NOT NULL, + + --- The testbox IP. + -- This is from the webserver point of view and automatically updated on + -- SIGNON. The test setup doesn't permit for IP addresses to change while + -- the testbox is operational, because this will break gang tests. + ip inet NOT NULL, + --- The system or firmware UUID. + -- This uniquely identifies the testbox when talking to the server. After + -- SIGNON though, the testbox will also provide idTestBox and ip to + -- establish its identity beyond doubt. + uuidSystem uuid NOT NULL, + --- The testbox name. + -- Usually similar to the DNS name. + sName text NOT NULL, + --- Optional testbox description. + -- Intended for describing the box as well as making other relevant notes. + idStrDescription INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + + --- Reference to the scheduling group that this testbox is a member of. + -- Non-unique foreign key: SchedGroups(idSchedGroup) + -- A testbox is always part of a group, the default one nothing else. + idSchedGroup INTEGER DEFAULT 1 NOT NULL, + + --- Indicates whether this testbox is enabled. + -- A testbox gets disabled when we're doing maintenance, debugging a issue + -- that happens only on that testbox, or some similar stuff. This is an + -- alternative to deleting the testbox. + fEnabled BOOLEAN DEFAULT NULL, + + --- The kind of lights-out-management. + enmLomKind LomKind_T DEFAULT 'none'::LomKind_T NOT NULL, + --- The IP adress of the lights-out-management. + -- This can be NULL if enmLomKind is 'none', otherwise it must contain a valid address. + ipLom inet DEFAULT NULL, + + --- Timeout scale factor, given as a percent. + -- This is a crude adjustment of the test case timeout for slower hardware. + pctScaleTimeout smallint DEFAULT 100 NOT NULL CHECK (pctScaleTimeout > 10 AND pctScaleTimeout < 20000), + + --- Change comment or similar. + idStrComment INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + + --- @name Scheduling properties (reported by testbox script). + -- @{ + --- Same abbrieviations as kBuild, see KBUILD_OSES. + idStrOs INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- Informational, no fixed format. + idStrOsVersion INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- Same as CPUID reports (GenuineIntel, AuthenticAMD, CentaurHauls, ...). + idStrCpuVendor INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- Same as kBuild - x86, amd64, ... See KBUILD_ARCHES. + idStrCpuArch INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- The CPU name if available. + idStrCpuName INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- Number identifying the CPU family/model/stepping/whatever. + -- For x86 and AMD64 type CPUs, this will on the following format: + -- (EffFamily << 24) | (EffModel << 8) | Stepping. + lCpuRevision bigint DEFAULT NULL, + --- Number of CPUs, CPU cores and CPU threads. + cCpus smallint DEFAULT NULL CHECK (cCpus IS NULL OR cCpus > 0), + --- Set if capable of hardware virtualization. + fCpuHwVirt boolean DEFAULT NULL, + --- Set if capable of nested paging. + fCpuNestedPaging boolean DEFAULT NULL, + --- Set if CPU capable of 64-bit (VBox) guests. + fCpu64BitGuest boolean DEFAULT NULL, + --- Set if chipset with usable IOMMU (VT-d / AMD-Vi). + fChipsetIoMmu boolean DEFAULT NULL, + --- Set if the test box does raw-mode tests. + fRawMode boolean DEFAULT NULL, + --- The (approximate) memory size in megabytes (rounded down to nearest 4 MB). + cMbMemory bigint DEFAULT NULL CHECK (cMbMemory IS NULL OR cMbMemory > 0), + --- The amount of scratch space in megabytes (rounded down to nearest 64 MB). + cMbScratch bigint DEFAULT NULL CHECK (cMbScratch IS NULL OR cMbScratch >= 0), + --- Free form hardware and software report field. + idStrReport INTEGER REFERENCES TestBoxStrTab(idStr) DEFAULT NULL, + --- @} + + --- The testbox script revision number, serves the purpose of a version number. + -- Probably good to have when scheduling upgrades as well for status purposes. + iTestBoxScriptRev INTEGER DEFAULT 0 NOT NULL, + --- The python sys.hexversion (layed out as of 2.7). + -- Good to know which python versions we need to support. + iPythonHexVersion INTEGER DEFAULT NULL, + + --- Pending command. + -- @note We put it here instead of in TestBoxStatuses to get history. + enmPendingCmd TestBoxCmd_T DEFAULT 'none'::TestBoxCmd_T NOT NULL, + + PRIMARY KEY (idTestBox, tsExpire), + + --- Nested paging requires hardware virtualization. + CHECK (fCpuNestedPaging IS NULL OR (fCpuNestedPaging <> TRUE OR fCpuHwVirt = TRUE)) +); + +-- Convenience view that simplifies querying a lot. +CREATE VIEW TestBoxesWithStrings AS + SELECT TestBoxes.*, + Str1.sValue AS sDescription, + Str2.sValue AS sComment, + Str3.sValue AS sOs, + Str4.sValue AS sOsVersion, + Str5.sValue AS sCpuVendor, + Str6.sValue AS sCpuArch, + Str7.sValue AS sCpuName, + Str8.sValue AS sReport + FROM TestBoxes + LEFT OUTER JOIN TestBoxStrTab Str1 ON idStrDescription = Str1.idStr + LEFT OUTER JOIN TestBoxStrTab Str2 ON idStrComment = Str2.idStr + LEFT OUTER JOIN TestBoxStrTab Str3 ON idStrOs = Str3.idStr + LEFT OUTER JOIN TestBoxStrTab Str4 ON idStrOsVersion = Str4.idStr + LEFT OUTER JOIN TestBoxStrTab Str5 ON idStrCpuVendor = Str5.idStr + LEFT OUTER JOIN TestBoxStrTab Str6 ON idStrCpuArch = Str6.idStr + LEFT OUTER JOIN TestBoxStrTab Str7 ON idStrCpuName = Str7.idStr + LEFT OUTER JOIN TestBoxStrTab Str8 ON idStrReport = Str8.idStr; + + +-- +-- Populate the string table. +-- + +--- Empty string with ID 0. +INSERT INTO TestBoxStrTab (idStr, sValue) VALUES (0, ''); + +INSERT INTO TestBoxStrTab (sValue) +( SELECT DISTINCT sDescription FROM OldTestBoxes WHERE sDescription IS NOT NULL +) UNION ( SELECT DISTINCT sOs FROM OldTestBoxes WHERE sOs IS NOT NULL +) UNION ( SELECT DISTINCT sOsVersion FROM OldTestBoxes WHERE sOsVersion IS NOT NULL +) UNION ( SELECT DISTINCT sCpuVendor FROM OldTestBoxes WHERE sCpuVendor IS NOT NULL +) UNION ( SELECT DISTINCT sCpuArch FROM OldTestBoxes WHERE sCpuArch IS NOT NULL +) UNION ( SELECT DISTINCT sCpuName FROM OldTestBoxes WHERE sCpuName IS NOT NULL +) UNION ( SELECT DISTINCT sReport FROM OldTestBoxes WHERE sReport IS NOT NULL ); + +-- Index and analyze the string table as we'll be using it a lot below already. +CREATE INDEX TestBoxStrTabNameIdx ON TestBoxStrTab USING hash (sValue); +ANALYZE VERBOSE TestBoxStrTab; + +SELECT MAX(idStr) FROM TestBoxStrTab; +SELECT pg_total_relation_size('TestBoxStrTab'); + + +-- +-- Populate the test box table. +-- + +INSERT INTO TestBoxes ( + idTestBox, -- 0 + tsEffective, -- 1 + tsExpire, -- 2 + uidAuthor, -- 3 + idGenTestBox, -- 4 + ip, -- 5 + uuidSystem, -- 6 + sName, -- 7 + idStrDescription, -- 8 + idSchedGroup, -- 9 + fEnabled, -- 10 + enmLomKind, -- 11 + ipLom, -- 12 + pctScaleTimeout, -- 13 + idStrComment, -- 14 + idStrOs, -- 15 + idStrOsVersion, -- 16 + idStrCpuVendor, -- 17 + idStrCpuArch, -- 18 + idStrCpuName, -- 19 + lCpuRevision, -- 20 + cCpus, -- 21 + fCpuHwVirt, -- 22 + fCpuNestedPaging, -- 23 + fCpu64BitGuest, -- 24 + fChipsetIoMmu, -- 25 + 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, + NULL, + st2.idStr, + st3.idStr, + st4.idStr, + st5.idStr, + st6.idStr, + lCpuRevision, + cCpus, + fCpuHwVirt, + fCpuNestedPaging, + fCpu64BitGuest, + fChipsetIoMmu, + NULL, + cMbMemory, + cMbScratch, + st7.idStr, + iTestBoxScriptRev, + iPythonHexVersion, + enmPendingCmd +FROM OldTestBoxes + LEFT OUTER JOIN TestBoxStrTab st1 ON sDescription = st1.sValue + LEFT OUTER JOIN TestBoxStrTab st2 ON sOs = st2.sValue + LEFT OUTER JOIN TestBoxStrTab st3 ON sOsVersion = st3.sValue + LEFT OUTER JOIN TestBoxStrTab st4 ON sCpuVendor = st4.sValue + LEFT OUTER JOIN TestBoxStrTab st5 ON sCpuArch = st5.sValue + LEFT OUTER JOIN TestBoxStrTab st6 ON sCpuName = st6.sValue + LEFT OUTER JOIN TestBoxStrTab st7 ON sReport = st7.sValue; + +-- Restore indexes. +CREATE UNIQUE INDEX TestBoxesUuidIdx ON TestBoxes (uuidSystem, tsExpire DESC); +CREATE INDEX TestBoxesExpireEffectiveIdx ON TestBoxes (tsExpire DESC, tsEffective ASC); + +-- Restore foreign key references to the table. +ALTER TABLE TestBoxStatuses ADD CONSTRAINT TestBoxStatuses_idGenTestBox_fkey + FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox); +ALTER TABLE TestSets ADD CONSTRAINT TestSets_idGenTestBox_fkey + FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox); + +-- Drop the old table. +DROP TABLE OldTestBoxes; + +COMMIT; + +\d TestBoxes; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r20-testcases-1-testgroups-1-schedgroups-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r20-testcases-1-testgroups-1-schedgroups-1.pgsql new file mode 100644 index 00000000..fcda544c --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r20-testcases-1-testgroups-1-schedgroups-1.pgsql @@ -0,0 +1,67 @@ +-- $Id: tmdb-r20-testcases-1-testgroups-1-schedgroups-1.pgsql $ +--- @file +-- VBox Test Manager Database - Adds sComment to TestCases, TestGroups +-- and SchedGroups. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + + + +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +LOCK TABLE TestBoxes IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestBoxStatuses IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestCases IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestGroups IN ACCESS EXCLUSIVE MODE; +LOCK TABLE SchedGroups IN ACCESS EXCLUSIVE MODE; + +-- +-- All the changes are rather simple and we'll just add the sComment column last. +-- +\d TestCases; +\d TestGroups; +\d SchedGroups; + +ALTER TABLE TestCases ADD COLUMN sComment TEXT DEFAULT NULL; +ALTER TABLE TestGroups ADD COLUMN sComment TEXT DEFAULT NULL; +ALTER TABLE SchedGroups ADD COLUMN sComment TEXT DEFAULT NULL; + +\d TestCases; +\d TestGroups; +\d SchedGroups; + +\prompt "Update python files while everything is locked. Hurry!" dummy + +COMMIT; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r21-testsets-4.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r21-testsets-4.pgsql new file mode 100644 index 00000000..ec280e77 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r21-testsets-4.pgsql @@ -0,0 +1,290 @@ +-- $Id: tmdb-r21-testsets-4.pgsql $ +--- @file +-- VBox Test Manager Database - Adds an idSchedGroup to TestSets in +-- preparation for testboxes belonging to multiple scheduling queues. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Cleanup after failed runs. +-- +DROP TABLE IF EXISTS OldTestSets; + +-- +-- Die on error from now on. +-- +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + + +-- Total grid lock (don't want to deadlock below). +LOCK TABLE TestBoxStatuses IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestSets IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestBoxes IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestResults IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestResultFailures IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestResultFiles IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestResultMsgs IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestResultValues IN ACCESS EXCLUSIVE MODE; +LOCK TABLE SchedGroups IN ACCESS EXCLUSIVE MODE; +LOCK TABLE SchedQueues IN ACCESS EXCLUSIVE MODE; +LOCK TABLE SchedGroupMembers IN ACCESS EXCLUSIVE MODE; + +\d+ TestSets; + +-- +-- 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. +-- +ALTER TABLE TestSets RENAME TO OldTestSets; + +ALTER TABLE TestResultFailures DROP CONSTRAINT IF EXISTS idtestsetfk; +ALTER TABLE TestResultFailures DROP CONSTRAINT IF EXISTS TestResultFailures_idTestSet_fkey; +ALTER TABLE SchedQueues DROP CONSTRAINT IF EXISTS SchedQueues_idTestSetGangLeader_fkey; +ALTER TABLE TestBoxStatuses DROP CONSTRAINT IF EXISTS TestBoxStatuses_idTestSet_fkey; +ALTER TABLE TestResultFiles DROP CONSTRAINT IF EXISTS TestResultFiles_idTestSet_fkey; +ALTER TABLE TestResultMsgs DROP CONSTRAINT IF EXISTS TestResultMsgs_idTestSet_fkey; +ALTER TABLE TestResults DROP CONSTRAINT IF EXISTS TestResults_idTestSet_fkey; +ALTER TABLE TestResultValues DROP CONSTRAINT IF EXISTS TestResultValues_idTestSet_fkey; +ALTER TABLE TestResultValues DROP CONSTRAINT IF EXISTS TestResultValues_idTestSet_fkey1; + +ALTER TABLE OldTestSets DROP CONSTRAINT testsets_igangmemberno_check; + +ALTER TABLE OldTestSets DROP CONSTRAINT TestSets_idBuildCategory_fkey; +ALTER TABLE OldTestSets DROP CONSTRAINT TestSets_idGenTestBox_fkey; +ALTER TABLE OldTestSets DROP CONSTRAINT TestSets_idGenTestCase_fkey; +ALTER TABLE OldTestSets DROP CONSTRAINT TestSets_idGenTestCaseArgs_fkey; +ALTER TABLE OldTestSets DROP CONSTRAINT TestSets_idTestResult_fkey; +ALTER TABLE OldTestSets DROP CONSTRAINT TestSets_idTestSetGangLeader_fkey; + +ALTER TABLE OldTestSets DROP CONSTRAINT IF EXISTS TestSets_sBaseFilename_key; +ALTER TABLE OldTestSets DROP CONSTRAINT IF EXISTS NewTestSets_sBaseFilename_key; +ALTER TABLE OldTestSets DROP CONSTRAINT TestSets_pkey; + +DROP INDEX IF EXISTS TestSetsGangIdx; +DROP INDEX IF EXISTS TestSetsBoxIdx; +DROP INDEX IF EXISTS TestSetsBuildIdx; +DROP INDEX IF EXISTS TestSetsTestCaseIdx; +DROP INDEX IF EXISTS TestSetsTestVarIdx; +DROP INDEX IF EXISTS TestSetsDoneCreatedBuildCatIdx; +DROP INDEX IF EXISTS TestSetsGraphBoxIdx; + + +-- This output should be free of indexes, constraints and references from other tables. +\d+ OldTestSets; + +\prompt "Is the above table completely free of indexes, constraints and references? Ctrl-C if not." dummy + +-- +-- Create the new table (no foreign keys). +-- +CREATE TABLE TestSets ( + --- The ID of this test set. + idTestSet INTEGER DEFAULT NEXTVAL('TestSetIdSeq') NOT NULL, + + --- The test config timestamp, used when reading test config. + tsConfig TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, + --- When this test set was scheduled. + -- idGenTestBox is valid at this point. + tsCreated TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, + --- When this test completed, i.e. testing stopped. This should only be set once. + tsDone TIMESTAMP WITH TIME ZONE DEFAULT NULL, + --- The current status. + enmStatus TestStatus_T DEFAULT 'running'::TestStatus_T NOT NULL, + + --- The build we're testing. + -- Non-unique foreign key: Builds(idBuild) + 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 + -- the WHERE part of the selection. + idBuildCategory INTEGER NOT NULL, + --- The test suite build we're using to do the testing. + -- This is NULL if the test suite zip wasn't referred or if a test suite + -- build source wasn't configured. + -- Non-unique foreign key: Builds(idBuild) + idBuildTestSuite INTEGER DEFAULT NULL, + + --- The exact testbox configuration. + idGenTestBox INTEGER NOT NULL, + --- The testbox ID for joining with (valid: tsStarted). + -- Non-unique foreign key: TestBoxes(idTestBox) + idTestBox INTEGER NOT NULL, + --- The scheduling group ID the test was scheduled thru (valid: tsStarted). + -- Non-unique foreign key: SchedGroups(idSchedGroup) + idSchedGroup INTEGER NOT NULL, + + --- The testgroup (valid: tsConfig). + -- Non-unique foreign key: TestBoxes(idTestGroup) + -- Note! This also gives the member ship entry, since a testcase can only + -- have one membership per test group. + idTestGroup INTEGER NOT NULL, + + --- The exact test case config we executed in this test run. + idGenTestCase INTEGER NOT NULL, + --- The test case ID for joining with (valid: tsConfig). + -- Non-unique foreign key: TestBoxes(idTestCase) + idTestCase INTEGER NOT NULL, + + --- The arguments (and requirements++) we executed this test case with. + idGenTestCaseArgs INTEGER NOT NULL, + --- The argument variation ID (valid: tsConfig). + -- Non-unique foreign key: TestCaseArgs(idTestCaseArgs) + idTestCaseArgs INTEGER NOT NULL, + + --- The root of the test result tree. + -- @note This will only be NULL early in the transaction setting up the testset. + -- @note If the test reports more than one top level test result, we'll + -- fail the whole test run and let the test developer fix it. + idTestResult INTEGER DEFAULT NULL, + + --- The base filename used for storing files related to this test set. + -- This is a path relative to wherever TM is dumping log files. In order + -- to not become a file system test case, we will try not to put too many + -- hundred thousand files in a directory. A simple first approach would + -- be to just use the current date (tsCreated) like this: + -- TM_FILE_DIR/year/month/day/TestSets.idTestSet + -- + -- The primary log file for the test is this name suffixed by '.log'. + -- + -- The files in the testresultfile table gets their full names like this: + -- TM_FILE_DIR/sBaseFilename-testresultfile.id-TestResultStrTab(testresultfile.idStrFilename) + -- + -- @remarks We store this explicitly in case we change the directly layout + -- at some later point. + sBaseFilename text NOT NULL, + + --- The gang member number number, 0 is the leader. + iGangMemberNo SMALLINT DEFAULT 0 NOT NULL, -- CHECK (iGangMemberNo >= 0 AND iGangMemberNo < 1024), + --- The test set of the gang leader, NULL if no gang involved. + -- @note This is set by the gang leader as well, so that we can find all + -- gang members by WHERE idTestSetGangLeader = :id. + idTestSetGangLeader INTEGER DEFAULT NULL + +); + +-- Convert the data. +INSERT INTO TestSets ( + idTestSet, + tsConfig, + tsCreated, + tsDone, + enmStatus, + idBuild, + idBuildCategory, + idBuildTestSuite, + idGenTestBox, + idTestBox, + idSchedGroup, + idTestGroup, + idGenTestCase, + idTestCase, + idGenTestCaseArgs, + idTestCaseArgs, + idTestResult, + sBaseFilename, + iGangMemberNo, + idTestSetGangLeader + ) +SELECT OldTestSets.idTestSet, + OldTestSets.tsConfig, + OldTestSets.tsCreated, + OldTestSets.tsDone, + OldTestSets.enmStatus, + OldTestSets.idBuild, + OldTestSets.idBuildCategory, + OldTestSets.idBuildTestSuite, + OldTestSets.idGenTestBox, + OldTestSets.idTestBox, + TestBoxes.idSchedGroup, + OldTestSets.idTestGroup, + OldTestSets.idGenTestCase, + OldTestSets.idTestCase, + OldTestSets.idGenTestCaseArgs, + OldTestSets.idTestCaseArgs, + OldTestSets.idTestResult, + OldTestSets.sBaseFilename, + OldTestSets.iGangMemberNo, + OldTestSets.idTestSetGangLeader +FROM OldTestSets + INNER JOIN TestBoxes + ON OldTestSets.idGenTestBox = TestBoxes.idGenTestBox; + +-- Restore the primary key and unique constraints. +ALTER TABLE TestSets ADD PRIMARY KEY (idTestSet); +ALTER TABLE TestSets ADD UNIQUE (sBaseFilename); + +-- Restore check constraints. +ALTER TABLE TestSets ADD CONSTRAINT TestSets_iGangMemberNo_Check CHECK (iGangMemberNo >= 0 AND iGangMemberNo < 1024); + +-- Restore foreign keys in the table. +ALTER TABLE TestSets ADD FOREIGN KEY (idBuildCategory) REFERENCES BuildCategories(idBuildCategory); +ALTER TABLE TestSets ADD FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox); +ALTER TABLE TestSets ADD FOREIGN KEY (idGenTestCase) REFERENCES TestCases(idGenTestCase); +ALTER TABLE TestSets ADD FOREIGN KEY (idGenTestCaseArgs) REFERENCES TestCaseArgs(idGenTestCaseArgs); +ALTER TABLE TestSets ADD FOREIGN KEY (idTestResult) REFERENCES TestResults(idTestResult); +ALTER TABLE TestSets ADD FOREIGN KEY (idTestSetGangLeader) REFERENCES TestSets(idTestSet); + +-- Restore indexes. +CREATE INDEX TestSetsGangIdx ON TestSets (idTestSetGangLeader); +CREATE INDEX TestSetsBoxIdx ON TestSets (idTestBox, idTestResult); +CREATE INDEX TestSetsBuildIdx ON TestSets (idBuild, idTestResult); +CREATE INDEX TestSetsTestCaseIdx ON TestSets (idTestCase, idTestResult); +CREATE INDEX TestSetsTestVarIdx ON TestSets (idTestCaseArgs, idTestResult); +CREATE INDEX TestSetsDoneCreatedBuildCatIdx ON TestSets (tsDone DESC NULLS FIRST, tsCreated ASC, idBuildCategory); +CREATE INDEX TestSetsGraphBoxIdx ON TestSets (idTestBox, tsCreated DESC, tsDone ASC NULLS LAST, idBuildCategory, idTestCase); + +-- Restore foreign key references to the table. +ALTER TABLE TestResults ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResultValues ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResultFiles ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResultMsgs ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE TestResultFailures ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; + +ALTER TABLE TestBoxStatuses ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; +ALTER TABLE SchedQueues ADD FOREIGN KEY (idTestSetGangLeader) REFERENCES TestSets(idTestSet) MATCH FULL; + +-- Drop the old table. +DROP TABLE OldTestSets; + +\prompt "Update python files while everything is locked. Hurry!" dummy + +-- Grant access to the new table. +GRANT ALL PRIVILEGES ON TABLE TestSets TO testmanager; + +COMMIT; + +\d TestSets; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r22-testboxes-3-teststatus-4-testboxinschedgroups-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r22-testboxes-3-teststatus-4-testboxinschedgroups-1.pgsql new file mode 100644 index 00000000..199aa29b --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r22-testboxes-3-teststatus-4-testboxinschedgroups-1.pgsql @@ -0,0 +1,181 @@ +-- $Id: tmdb-r22-testboxes-3-teststatus-4-testboxinschedgroups-1.pgsql $ +--- @file +-- VBox Test Manager Database - Turns idSchedGroup column in TestBoxes +-- into an N:M relationship with a priority via the new table +-- TestBoxesInSchedGroups. Adds an internal scheduling table index to +-- TestBoxStatuses to implement testboxes switching between groups. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Cleanup after failed runs. +-- +DROP TABLE IF EXISTS OldTestBoxes; + +-- +-- Die on error from now on. +-- +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + + +-- Total grid lock. +LOCK TABLE TestBoxStatuses IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestSets IN ACCESS EXCLUSIVE MODE; +LOCK TABLE TestBoxes IN ACCESS EXCLUSIVE MODE; +LOCK TABLE SchedGroups IN ACCESS EXCLUSIVE MODE; +LOCK TABLE SchedGroupMembers IN ACCESS EXCLUSIVE MODE; + +\d+ TestBoxes; + +-- +-- We'll only be doing simple alterations so, no need to drop constraints +-- and stuff like we usually do first. +-- + +-- +-- Create the new table and populate it. +-- + +CREATE TABLE TestBoxesInSchedGroups ( + --- TestBox ID. + -- Non-unique foreign key: TestBoxes(idTestBox). + idTestBox INTEGER NOT NULL, + --- Scheduling ID. + -- Non-unique foreign key: SchedGroups(idSchedGroup). + idSchedGroup INTEGER NOT NULL, + --- When this row starts taking effect (inclusive). + tsEffective TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, + --- When this row stops being tsEffective (exclusive). + tsExpire TIMESTAMP WITH TIME ZONE DEFAULT TIMESTAMP WITH TIME ZONE 'infinity' NOT NULL, + --- The user id of the one who created/modified this entry. + -- Non-unique foreign key: Users(uid) + uidAuthor INTEGER NOT NULL, + + --- The scheduling priority of the scheduling group for the test box. + -- Higher number causes the scheduling group to be serviced more frequently. + -- @sa TestGroupMembers.iSchedPriority, SchedGroups.iSchedPriority + iSchedPriority INTEGER DEFAULT 16 CHECK (iSchedPriority >= 0 AND iSchedPriority < 32) NOT NULL, + + PRIMARY KEY (idTestBox, idSchedGroup, tsExpire) +); + +GRANT ALL PRIVILEGES ON TABLE TestBoxesInSchedGroups TO testmanager; + +CREATE OR REPLACE FUNCTION TestBoxesInSchedGroups_ConvertedOneBox(a_idTestBox INTEGER) + RETURNS VOID AS $$ + DECLARE + v_Row RECORD; + v_idSchedGroup INTEGER; + v_uidAuthor INTEGER; + v_tsEffective TIMESTAMP WITH TIME ZONE; + v_tsExpire TIMESTAMP WITH TIME ZONE; + BEGIN + FOR v_Row IN + SELECT idTestBox, + idSchedGroup, + tsEffective, + tsExpire, + uidAuthor + FROM TestBoxes + WHERE idTestBox = a_idTestBox + ORDER BY tsEffective, tsExpire + LOOP + IF v_idSchedGroup IS NOT NULL THEN + IF (v_idSchedGroup != v_Row.idSchedGroup) OR (v_Row.tsEffective <> v_tsExpire) THEN + INSERT INTO TestBoxesInSchedGroups (idTestBox, idSchedGroup, tsEffective, tsExpire, uidAuthor) + VALUES (a_idTestBox, v_idSchedGroup, v_tsEffective, v_tsExpire, v_uidAuthor); + v_idSchedGroup := NULL; + END IF; + END IF; + + IF v_idSchedGroup IS NULL THEN + v_idSchedGroup := v_Row.idSchedGroup; + v_tsEffective := v_Row.tsEffective; + END IF; + IF v_Row.uidAuthor IS NOT NULL THEN + v_uidAuthor := v_Row.uidAuthor; + END IF; + v_tsExpire := v_Row.tsExpire; + END LOOP; + + IF v_idSchedGroup != -1 THEN + INSERT INTO TestBoxesInSchedGroups (idTestBox, idSchedGroup, tsEffective, tsExpire, uidAuthor) + VALUES (a_idTestBox, v_idSchedGroup, v_tsEffective, v_tsExpire, v_uidAuthor); + END IF; + END; +$$ LANGUAGE plpgsql; + +SELECT TestBoxesInSchedGroups_ConvertedOneBox(TestBoxIDs.idTestBox) +FROM ( SELECT DISTINCT idTestBox FROM TestBoxes ) AS TestBoxIDs; + +DROP FUNCTION TestBoxesInSchedGroups_ConvertedOneBox(INTEGER); + +-- +-- Do the other two modifications. +-- +ALTER TABLE TestBoxStatuses ADD COLUMN iWorkItem INTEGER DEFAULT 0 NOT NULL; + +DROP VIEW TestBoxesWithStrings; +ALTER TABLE TestBoxes DROP COLUMN idSchedGroup; +CREATE VIEW TestBoxesWithStrings AS + SELECT TestBoxes.*, + Str1.sValue AS sDescription, + Str2.sValue AS sComment, + Str3.sValue AS sOs, + Str4.sValue AS sOsVersion, + Str5.sValue AS sCpuVendor, + Str6.sValue AS sCpuArch, + Str7.sValue AS sCpuName, + Str8.sValue AS sReport + FROM TestBoxes + LEFT OUTER JOIN TestBoxStrTab Str1 ON idStrDescription = Str1.idStr + LEFT OUTER JOIN TestBoxStrTab Str2 ON idStrComment = Str2.idStr + LEFT OUTER JOIN TestBoxStrTab Str3 ON idStrOs = Str3.idStr + LEFT OUTER JOIN TestBoxStrTab Str4 ON idStrOsVersion = Str4.idStr + LEFT OUTER JOIN TestBoxStrTab Str5 ON idStrCpuVendor = Str5.idStr + LEFT OUTER JOIN TestBoxStrTab Str6 ON idStrCpuArch = Str6.idStr + LEFT OUTER JOIN TestBoxStrTab Str7 ON idStrCpuName = Str7.idStr + LEFT OUTER JOIN TestBoxStrTab Str8 ON idStrReport = Str8.idStr; + +GRANT ALL PRIVILEGES ON TABLE TestBoxesWithStrings TO testmanager; + +\prompt "Update python files while everything is locked. Hurry!" dummy + +COMMIT; + +\d TestBoxesInSchedGroups; +\d TestBoxStatuses; +\d TestBoxes; +ANALYZE VERBOSE TestBoxesInSchedGroups; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r23-users-2.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r23-users-2.pgsql new file mode 100644 index 00000000..cbc3d1bd --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r23-users-2.pgsql @@ -0,0 +1,60 @@ +-- $Id: tmdb-r23-users-2.pgsql $ +--- @file +-- VBox Test Manager Database - Adds fReadOnly column to Users. +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Cleanup after failed runs. +-- +DROP TABLE IF EXISTS OldTestBoxes; + +-- +-- Die on error from now on. +-- +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + + + +-- This change can be implemented using ALTER TABLE. Yeah! +\d+ Users; + +ALTER TABLE Users + ADD COLUMN fReadOnly BOOLEAN NOT NULL DEFAULT FALSE; + +COMMIT; + +\d Users; +ANALYZE VERBOSE Users; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r24-vcsbugreferences-1.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r24-vcsbugreferences-1.pgsql new file mode 100644 index 00000000..8a6947cd --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r24-vcsbugreferences-1.pgsql @@ -0,0 +1,59 @@ +-- $Id: tmdb-r24-vcsbugreferences-1.pgsql $ +--- @file +-- VBox Test Manager Database - Creates a new VcsBugReferences table. +-- + +-- +-- Copyright (C) 2020-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- Die on error from now on. +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 0 + +-- +-- Create the new VcsBugReferences table. +-- +CREATE TABLE VcsBugReferences ( + --- The version control tree name. + sRepository TEXT NOT NULL, + --- The version control tree revision number. + iRevision INTEGER NOT NULL, + --- The bug tracker identifier - see g_kdBugTrackers in config.py. + sBugTracker CHAR(4) NOT NULL, + --- The bug number in the bug tracker. + lBugNo BIGINT NOT NULL, + + UNIQUE (sRepository, iRevision, sBugTracker, lBugNo) +); +CREATE INDEX VcsBugReferencesLookupIdx ON VcsBugReferences (sBugTracker, lBugNo); +COMMIT; +\d+ VcsBugReferences; + diff --git a/src/VBox/ValidationKit/testmanager/db/tmdb-r25-vcsrevisions-2.pgsql b/src/VBox/ValidationKit/testmanager/db/tmdb-r25-vcsrevisions-2.pgsql new file mode 100644 index 00000000..f4370472 --- /dev/null +++ b/src/VBox/ValidationKit/testmanager/db/tmdb-r25-vcsrevisions-2.pgsql @@ -0,0 +1,45 @@ +-- $Id: tmdb-r25-vcsrevisions-2.pgsql $ +--- @file +-- VBox Test Manager Database - Creates a new index on VcsRevisions +-- + +-- +-- Copyright (C) 2013-2022 Oracle and/or its affiliates. +-- +-- This file is part of VirtualBox base platform packages, as +-- available from https://www.virtualbox.org. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation, in version 3 of the +-- License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, see . +-- +-- The contents of this file may alternatively be used under the terms +-- of the Common Development and Distribution License Version 1.0 +-- (CDDL), a copy of it is provided in the "COPYING.CDDL" file included +-- in the VirtualBox 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. +-- +-- SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +-- + +-- +-- Die on error from now on. +-- +\set ON_ERROR_STOP 1 +\set AUTOCOMMIT 1 + + +CREATE INDEX VcsRevisionsByDate ON VcsRevisions (tsCreated DESC); + -- cgit v1.2.3