import contextlib
import logging
import os
+import tempfile
from cStringIO import StringIO
from teuthology.orchestra import run
scratch_dev: 'scratch_dev'
fs_type: 'xfs'
tests: 'generic/100 xfs/003 xfs/005 xfs/006 generic/015'
+ exclude:
+ - generic/42
randomize: true
"""
with parallel() as p:
fs_type = properties.get('fs_type')
tests = properties.get('tests')
+ exclude_list = properties.get('exclude')
randomize = properties.get('randomize')
-
(remote,) = ctx.cluster.only(role).remotes.keys()
# Fetch the test script
test_root = teuthology.get_testdir(ctx)
- test_script = 'run_xfstests_krbd.sh'
+ test_script = 'run_xfstests.sh'
test_path = os.path.join(test_root, test_script)
xfstests_url = properties.get('xfstests_url')
log.info(' scratch device: {dev}'.format(dev=scratch_dev))
log.info(' using fs_type: {fs_type}'.format(fs_type=fs_type))
log.info(' tests to run: {tests}'.format(tests=tests))
+ log.info(' exclude list: {}'.format(' '.join(exclude_list)))
log.info(' randomize: {randomize}'.format(randomize=randomize))
+ if exclude_list:
+ with tempfile.NamedTemporaryFile(bufsize=0, prefix='exclude') as exclude_file:
+ for test in exclude_list:
+ exclude_file.write("{}\n".format(test))
+ remote.put_file(exclude_file.name, exclude_file.name)
+
# Note that the device paths are interpreted using
# readlink -f <path> in order to get their canonical
# pathname (so it matches what the kernel remembers).
args = [
'/usr/bin/sudo',
'TESTDIR={tdir}'.format(tdir=testdir),
- 'URL_BASE={url}'.format(url=xfstests_url),
'adjust-ulimits',
'ceph-coverage',
'{tdir}/archive/coverage'.format(tdir=testdir),
'-t', test_dev,
'-s', scratch_dev,
]
+ if exclude_list:
+ args.extend(['-x', exclude_file.name])
if randomize:
args.append('-r')
if tests:
scratch_format: 1
fs_type: 'xfs'
tests: 'generic/100 xfs/003 xfs/005 xfs/006 generic/015'
+ exclude:
+ - generic/42
randomize: true
xfstests_branch: master
xfstests_url: 'https://raw.github.com/ceph/branch/master/qa'
fs_type=properties.get('fs_type', 'xfs'),
randomize=properties.get('randomize', False),
tests=properties.get('tests'),
+ exclude=properties.get('exclude', []),
xfstests_url=xfstests_url,
)