Commit Graph

9 Commits

Author SHA1 Message Date
James E. Blair ef23bd4862 Revert "Revert "Switch to stestr""
This reverts commit e56801f2e8.

Change-Id: Icbea5ddd744d1fa65a397fb613731315687f9803
2018-05-17 08:33:40 -07:00
James E. Blair e56801f2e8 Revert "Switch to stestr"
There are several differences between this and testr which we
need to discuss.  Let's wait until after the v3 release so we
don't delay it further.

This reverts commit 68e02466ce.

Change-Id: I873145c15fd88fe752cb987d0892c146c35041d8
2018-03-21 07:50:08 -07:00
Monty Taylor 68e02466ce
Switch to stestr
stestr is actively maintained. OpenStack is migrating to stestr,
go ahead and follow suit.

As part of this, shift the default values for STDOUT capture into the
tox.ini file. This preserves the current behavior of tox doing
capture and running tests directly not capturing.

Remove the depend on python-subunit... stestr takes care of that for us.

Change-Id: I90ae343a5db966f74e888bb98aab0bf39dcdd2cb
2018-03-18 10:41:40 -05:00
James E. Blair 1c236dfe93 Tests: store debug logs on error
Rather than using the FakeLogger fixture, which always attaches
the log stream as a detail, use standard loggers that output to
a stringio, and then, only if a test fails, attach the full
log as a detail.

This allows us to report full debug-level logs for failing tests
in the gate (which normally has a limit on how large subunit files
can be).

Change-Id: I9e6509b7b69838d29582b040ef22f1d66010d45e
2017-02-06 10:10:48 -08:00
James E. Blair 2a8e0fa5f1 Move tests into test/unit
This makes room for a sibling directory for nodepool functional tests.

Change-Id: Iace94d313edb04192ac23a533ed967f076410980
2017-01-24 10:18:38 -08:00
James E. Blair 79e94b6bdd Default test log level to DEBUG except for testr
When running under testr, default the test log level to INFO,
but otherwise, default it to DEBUG.  This way when a developer
runs a test in the foreground it logs at DEBUG without any
further configuration needed.

Change-Id: Ie7388ebf25669807a8c430b6908f9d18115b5dc6
2016-10-18 08:29:11 -07:00
Morgan Fainberg d34e0b4dc7 Reduce Log Size
To reduce the testrepository.subunit output, eliminate debugging logs
from gear.Server and gear.Client.

This is handled via an ENV defined in the tox.ini called `OS_LOG_DEFAULTS`.
Any module can be specified in the typicall python logging format (e.g.
"gear.Server=INFO"). Each entry should be comma separated. For each valid
entry, a fake logger is created with the log level set to that level.

An invalid format will be skipped (expected: `<module name str>=<level_str>`).

An invalid logging level will default to logging.DEBUG.

Specifying OS_LOG_DEFAULT as an ENV var prior to running tox will override
the default values defined in tox.ini.

Change-Id: I893418435c538bfcedb803d12b57832c8111f06f
2016-06-10 10:15:50 -07:00
Monty Taylor e6a6c403db Add ability to skip log capture.
Change-Id: I8f3ac5c469e9d530d1ac7776c7488d0c42cdf1ad
Reviewed-on: https://review.openstack.org/35329
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-07-02 17:47:23 +00:00
Monty Taylor bc7588343f Migrate to testrepository.
Needed to move some directory creation around to be contained within the
testcase, but with parallel testing, we shave 48 seconds off the run
time and go from around 60s to around 11. We're also now compatible with
future subunit-based fast-fail semantics when we grow them.

Change-Id: I6c7148c29d1edb5d9469a8c2afe4b31b2b340009
Reviewed-on: https://review.openstack.org/33352
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-06-27 01:49:59 +00:00