Commit c7df52c5 by Christine Lytwynec

enable sharding of bok-choy tests

parent 54d60fc1
......@@ -20,6 +20,7 @@ __test__ = False # do not collect
@cmdopts([
('test_spec=', 't', 'Specific test to run'),
('fasttest', 'a', 'Skip some setup'),
('extra_args=', 'e', 'adds as extra args to the test command'),
make_option("--verbose", action="store_const", const=2, dest="verbosity"),
make_option("-q", "--quiet", action="store_const", const=0, dest="verbosity"),
make_option("-v", "--verbosity", action="count", dest="verbosity"),
......@@ -39,7 +40,8 @@ def test_bokchoy(options):
opts = {
'test_spec': getattr(options, 'test_spec', None),
'fasttest': getattr(options, 'fasttest', False),
'verbosity': getattr(options, 'verbosity', 2)
'verbosity': getattr(options, 'verbosity', 2),
'extra_args': getattr(options, 'extra_args', ''),
}
test_suite = BokChoyTestSuite('bok-choy', **opts)
......
......@@ -29,6 +29,7 @@ class BokChoyTestSuite(TestSuite):
self.fasttest = kwargs.get('fasttest', False)
self.test_spec = kwargs.get('test_spec', None)
self.verbosity = kwargs.get('verbosity', 2)
self.extra_args = kwargs.get('extra_args', '')
def __enter__(self):
super(BokChoyTestSuite, self).__enter__()
......@@ -97,6 +98,7 @@ class BokChoyTestSuite(TestSuite):
"--with-flaky",
"--xunit-file={}".format(self.xunit_report),
"--verbosity={}".format(self.verbosity),
self.extra_args,
]
cmd = (" ").join(cmd)
......
......@@ -114,7 +114,15 @@ END
;;
"bok-choy")
rake test:bok_choy
case "$SHARD" in
"1")
rake test:bok_choy["-a shard_1"]
;;
"2")
rake test:bok_choy["-a '!shard_1'"]
;;
esac
rake test:bok_choy:coverage
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment