process.mtrlogobserver.MTR class is a subclass of
(Test). It is used to run test suites using the mysql-test-run program,
as used in MySQL, Drizzle, MariaDB, and MySQL storage engine plugins.
The shell command to run the test suite is specified in the same way as for the Test class. The MTR class will parse the output of running the test suite, and use the count of tests executed so far to provide more accurate completion time estimates. Any test failures that occur during the test are summarized on the Waterfall Display.
Server error logs are added as additional log files, useful to debug test failures.
Optionally, data about the test run and any test failures can be inserted into
a database for further analysis and report generation. To use this facility,
create an instance of
connections to the database. The necessary tables can be created automatically
True, or manually using the SQL
found in the mtrlogobserver.py source file.
One problem with specifying a database is that each reload of the
configuration will get a new instance of
ConnectionPool (even if the
connection parameters are the same). To avoid that Buildbot thinks the builder
configuration has changed because of this, use the
process.mtrlogobserver.EqConnectionPool subclass of
ConnectionPool, which implements an equiality operation that avoids
from buildbot.process.mtrlogobserver import MTR, EqConnectionPool myPool = EqConnectionPool("MySQLdb", "host", "buildbot", "password", "db") myFactory.addStep(MTR(workdir="mysql-test", dbpool=myPool, command=["perl", "mysql-test-run.pl", "--force"]))
--paralleloption used for mysql-test-run.pl (number of processes used to run the test suite in parallel). Defaults to 4. This is used to determine the number of server error log files to download from the slave. Specifying a too high value does not hurt (as nonexisting error logs will be ignored), however if using
--parallelvalue greater than the default it needs to be specified, or some server error logs will be missing.
dbpoolis specified), the necessary database tables will be created automatically if they do not exist already. Alternatively, the tables can be created manually from the SQL statements found in the mtrlogobserver.py source file.