VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/testmanager/config.py@ 97673

Last change on this file since 97673 was 97673, checked in by vboxsync, 2 years ago

Validation Kit: Fixed lots of warnings, based on pylint 2.12.2.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.7 KB
Line 
1# -*- coding: utf-8 -*-
2# $Id: config.py 97673 2022-11-24 11:46:15Z vboxsync $
3
4"""
5Test Manager Configuration.
6"""
7
8__copyright__ = \
9"""
10Copyright (C) 2012-2022 Oracle and/or its affiliates.
11
12This file is part of VirtualBox base platform packages, as
13available from https://www.virtualbox.org.
14
15This program is free software; you can redistribute it and/or
16modify it under the terms of the GNU General Public License
17as published by the Free Software Foundation, in version 3 of the
18License.
19
20This program is distributed in the hope that it will be useful, but
21WITHOUT ANY WARRANTY; without even the implied warranty of
22MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23General Public License for more details.
24
25You should have received a copy of the GNU General Public License
26along with this program; if not, see <https://www.gnu.org/licenses>.
27
28The contents of this file may alternatively be used under the terms
29of the Common Development and Distribution License Version 1.0
30(CDDL), a copy of it is provided in the "COPYING.CDDL" file included
31in the VirtualBox distribution, in which case the provisions of the
32CDDL are applicable instead of those of the GPL.
33
34You may elect to license modified versions of this file under the
35terms and conditions of either the GPL or the CDDL or both.
36
37SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
38"""
39__version__ = "$Revision: 97673 $"
40
41import os;
42
43## Test Manager version string.
44g_ksVersion = 'v0.1.0';
45## Test Manager revision string.
46g_ksRevision = ('$Revision: 97673 $')[11:-2];
47
48## Enable VBox specific stuff.
49g_kfVBoxSpecific = True;
50
51
52## @name Used by the TMDatabaseConnection class.
53# @{
54g_ksDatabaseName = 'testmanager';
55g_ksDatabaseAddress = 'localhost';
56g_ksDatabasePort = 5432;
57g_ksDatabaseUser = 'postgres';
58g_ksDatabasePassword = 'password';
59## @}
60
61
62## @name User handling.
63## @{
64
65## Whether login names are case insensitive (True) or case sensitive (False).
66## @note Implemented by inserting lower case names into DB and lower case
67## bind variables in WHERE clauses.
68g_kfLoginNameCaseInsensitive = True;
69
70## @}
71
72
73## @name File locations
74## @{
75
76## The TestManager directory.
77g_ksTestManagerDir = os.path.dirname(os.path.abspath(__file__));
78## The Validation Kit directory.
79g_ksValidationKitDir = os.path.dirname(g_ksTestManagerDir);
80## The TestManager htdoc directory.
81g_ksTmHtDocDir = os.path.join(g_ksTestManagerDir, 'htdocs');
82## The TestManager download directory (under htdoc somewhere), for validationkit zips.
83g_ksTmDownloadDir = os.path.join(g_ksTmHtDocDir, 'download');
84## The base URL relative path of the TM download directory (g_ksTmDownloadDir).
85g_ksTmDownloadBaseUrlRel = 'htdocs/downloads';
86## The root of the file area (referred to as TM_FILE_DIR in database docs).
87g_ksFileAreaRootDir = '/tmp/testmanager'
88## The root of the file area with the zip files (best put on a big storage server).
89g_ksZipFileAreaRootDir = '/tmp/testmanager2'
90## URL prefix for trac log viewer.
91g_ksTracLogUrlPrefix = 'https://linserv.de.oracle.com/vbox/log/'
92## URL prefix for trac log viewer.
93g_ksTracChangsetUrlFmt = 'https://linserv.de.oracle.com/%(sRepository)s/changeset/%(iRevision)s'
94## URL prefix for unprefixed build logs.
95g_ksBuildLogUrlPrefix = ''
96## URL prefix for unprefixed build binaries.
97g_ksBuildBinUrlPrefix = '/builds/'
98## The local path prefix for unprefixed build binaries. (Host file system, not web server.)
99g_ksBuildBinRootDir = '/mnt/builds/'
100## File on the build binary share that can be used to check that it's mounted.
101g_ksBuildBinRootFile = 'builds.txt'
102## Template for paratial database dump output files. One argument: UID
103g_ksTmDbDumpOutFileTmpl = '/var/tmp/tm-partial-db-dump-for-%u.zip'
104## Template for paratial database dump temporary files. One argument: UID
105g_ksTmDbDumpTmpFileTmpl = '/var/tmp/tm-partial-db-dump-for-%u.pgtxt'
106## @}
107
108
109## @name Scheduling parameters
110## @{
111
112## The time to wait for a gang to gather (in seconds).
113g_kcSecGangGathering = 600;
114## The max time allowed to spend looking for a new task (in seconds).
115g_kcSecMaxNewTask = 60;
116## Minimum time since last task started.
117g_kcSecMinSinceLastTask = 120; # (2 min)
118## Minimum time since last failed task.
119g_kcSecMinSinceLastFailedTask = 180; # (3 min)
120
121## @}
122
123
124
125## @name Test result limits.
126## In general, we will fail the test when reached and stop accepting further results.
127## @{
128
129## The max number of test results per test set.
130g_kcMaxTestResultsPerTS = 4096;
131## The max number of test results (children) per test result.
132g_kcMaxTestResultsPerTR = 512;
133## The max number of test result values per test set.
134g_kcMaxTestValuesPerTS = 4096;
135## The max number of test result values per test result.
136g_kcMaxTestValuesPerTR = 256;
137## The max number of test result message per test result.
138g_kcMaxTestMsgsPerTR = 4;
139## The max test result nesting depth.
140g_kcMaxTestResultDepth = 10;
141
142## The max length of a test result name.
143g_kcchMaxTestResultName = 64;
144## The max length of a test result value name.
145g_kcchMaxTestValueName = 56;
146## The max length of a test result message.
147g_kcchMaxTestMsg = 128;
148
149## The max size of the main log file.
150g_kcMbMaxMainLog = 32;
151## The max size of an uploaded file (individual).
152g_kcMbMaxUploadSingle = 150;
153## The max size of all uploaded file.
154g_kcMbMaxUploadTotal = 200;
155## The max number of files that can be uploaded.
156g_kcMaxUploads = 256;
157## @}
158
159
160## @name Bug Trackers and VCS reference tags.
161## @{
162class BugTrackerConfig(object):
163 """ Bug tracker config """
164 def __init__(self, sDbId, sName, sBugUrl, asCommitTags):
165 assert len(sDbId) == 4;
166 self.sDbId = sDbId;
167 self.sName = sName;
168 self.sBugUrl = sBugUrl;
169 self.asCommitTags = asCommitTags;
170
171## The key is the database table
172g_kdBugTrackers = {
173 'xtrk': BugTrackerConfig('xtrk', 'xTracker', 'https://linserv.de.oracle.com/vbox/xTracker/index.php?bug=',
174 ['bugref:', '@bugref{', 'bugef:', 'bugrf:', ], ),
175 'bgdb': BugTrackerConfig('bgdb', 'BugDB', 'https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=',
176 ['bugdbref:', '@bugdbref{', 'bugdb:', ], ),
177 'vorg': BugTrackerConfig('vorg', 'External Trac', 'https://www.virtualbox.org/ticket/',
178 ['ticketref:', '@ticketref{', 'ticket:', ], ),
179};
180## @}
181
182
183
184## @name Virtual Sheriff email alerts
185## @{
186
187## SMTP server host name.
188g_ksSmtpHost = 'internal-mail-router.oracle.com';
189## SMTP server port number.
190g_kcSmtpPort = 25;
191## Default email 'From' for email alert.
192g_ksAlertFrom = '[email protected]';
193## Subject for email alert.
194g_ksAlertSubject = 'Virtual Test Sheriff Alert';
195## List of users to send alerts.
196g_asAlertList = ['alertuser1', 'alertuser2'];
197## iLOM password.
198g_ksLomPassword = 'put_your_ILOM_password_here_if_applicable';
199
200## @}
201
202
203## @name Partial Database Dump
204## @{
205
206## Minimum number of day. Set higher than g_kcTmDbDumpMaxDays to disable.
207g_kcTmDbDumpMinDays = 1;
208## Maximum number of day. Keep low - consider space and runtime.
209g_kcTmDbDumpMaxDays = 31;
210## The default number of days.
211g_kcTmDbDumpDefaultDays = 14;
212## @}
213
214
215## @name Debug Features
216## @{
217
218## Enables extra DB exception information.
219g_kfDebugDbXcpt = True;
220
221## Where to write the glue debug.
222# None indicates apache error log, string indicates a file.
223#g_ksSrvGlueDebugLogDst = '/tmp/testmanager-srv-glue.log';
224g_ksSrvGlueDebugLogDst = None;
225## Whether to enable CGI trace back in the server glue.
226g_kfSrvGlueCgiTb = False;
227## Enables glue debug output.
228g_kfSrvGlueDebug = False;
229## Timestamp and pid prefix the glue debug output.
230g_kfSrvGlueDebugTS = True;
231## Whether to dumping CGI environment variables.
232g_kfSrvGlueCgiDumpEnv = False;
233## Whether to dumping CGI script arguments.
234g_kfSrvGlueCgiDumpArgs = False;
235## Enables task scheduler debug output to g_ksSrvGlueDebugLogDst.
236g_kfSrvGlueDebugScheduler = False;
237
238## Enables the SQL trace back.
239g_kfWebUiSqlTrace = False;
240## Enables the explain in the SQL trace back.
241g_kfWebUiSqlTraceExplain = False;
242## Whether the postgresql version supports the TIMING option on EXPLAIN (>= 9.2).
243g_kfWebUiSqlTraceExplainTiming = False;
244## Display time spent processing the page.
245g_kfWebUiProcessedIn = True;
246## Enables WebUI debug output.
247g_kfWebUiDebug = False;
248## Enables WebUI SQL debug output print() calls (requires g_kfWebUiDebug).
249g_kfWebUiSqlDebug = False;
250## Enables the debug panel at the bottom of the page.
251g_kfWebUiDebugPanel = True;
252
253## Profile cgi/admin.py.
254g_kfProfileAdmin = False;
255## Profile cgi/index.py.
256g_kfProfileIndex = False;
257
258## When not None,
259g_ksTestBoxDispXpctLog = '/tmp/testmanager-testboxdisp-xcpt.log'
260## @}
Note: See TracBrowser for help on using the repository browser.

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