Skip to content

Commit

Permalink
ENH: Exclude not yet passing tests from direct mode build
Browse files Browse the repository at this point in the history
  • Loading branch information
bpoldrack committed Sep 4, 2017
1 parent 1d9cc38 commit bf4bc69
Show file tree
Hide file tree
Showing 32 changed files with 90 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,13 @@ matrix:
env:
- TMPDIR="/tmp/nfsmount"
- _DATALAD_NONPR_ONLY=1
- python: 2.7
# test modules that should not fail in direct mode now:
env:
- TESTS_TO_PERFORM="datalad/tests datalad/support"
- DATALAD_REPO_DIRECT=1

allow_failures:
# Test under NFS mount (full, only in master)
- python: 2.7
env:
- TMPDIR="/tmp/nfsmount"
- _DATALAD_NONPR_ONLY=1
# For now, don't fail entirely when direct mode fails
- env: DATALAD_REPO_DIRECT=1

# Causes complete laptop or travis instance crash atm, but survives in a docker
# need to figure it out (looks like some PID explosion)
Expand Down
1 change: 1 addition & 0 deletions datalad/cmdline/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def test_incorrect_options():
yield check_incorrect_option, ('--dbg',), err_insufficient
yield check_incorrect_option, tuple(), err_insufficient

@skip_direct_mode
def test_script_shims():
runner = Runner()
for script in [
Expand Down
4 changes: 4 additions & 0 deletions datalad/crawler/nodes/tests/test_annex.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def test_annexificator_no_git_if_dirty(outdir):

@with_tempfile(mkdir=True)
@with_tempfile()
@skip_direct_mode
def test_initiate_dataset(path, path2):
dataset_path = opj(path, 'test')
datas = list(initiate_dataset('template', 'testdataset', path=dataset_path)())
Expand Down Expand Up @@ -166,6 +167,7 @@ def _test_annex_file(mode, topdir, topurl, outdir):
assert_equal(output[0]['datalad_stats'], ActivityStats(files=1, add_git=1))


@skip_direct_mode
def test_annex_file():
for mode in ('full', 'fast', 'relaxed',):
yield _test_annex_file, mode
Expand Down Expand Up @@ -213,6 +215,7 @@ def _test_add_archive_content_tar(direct, repo_path):
assert_false(annex.repo.dirty)


@skip_direct_mode
def test_add_archive_content_tar():
for direct in (True, False):
yield _test_add_archive_content_tar, direct
Expand All @@ -222,6 +225,7 @@ def test_add_archive_content_tar():
@with_tempfile(mkdir=True)
@with_tree(tree={'file': 'load'})
@serve_path_via_http
@skip_direct_mode
def test_add_dir_file(repo_path, p, topurl):
# test whenever file becomes a directory and then back a file. Should all work!
annex = Annexificator(path=repo_path, auto_finalize=False)
Expand Down
3 changes: 3 additions & 0 deletions datalad/crawler/pipelines/tests/test_balsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def test_smoke_pipelines():
@serve_path_via_http
@with_tempfile
@with_tempfile
@skip_direct_mode
def test_balsa_extract_meta(ind, topurl, outd, clonedir):
list(initiate_dataset(
template="balsa",
Expand Down Expand Up @@ -197,6 +198,7 @@ def test_balsa_extract_meta(ind, topurl, outd, clonedir):
@serve_path_via_http
@with_tempfile
@with_tempfile
@skip_direct_mode
def test_balsa_pipeline1(ind, topurl, outd, clonedir):
list(initiate_dataset(
template="balsa",
Expand Down Expand Up @@ -304,6 +306,7 @@ def test_balsa_pipeline1(ind, topurl, outd, clonedir):
@serve_path_via_http
@with_tempfile
@with_tempfile
@skip_direct_mode
def test_balsa_pipeline2(ind, topurl, outd, clonedir):
list(initiate_dataset(
template="balsa",
Expand Down
1 change: 1 addition & 0 deletions datalad/crawler/pipelines/tests/test_crcns.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from datalad.tests.utils import ok_startswith


@skip_direct_mode
def test_smoke_pipelines():
yield _test_smoke_pipelines, pipeline, ['bogus', "bogusgroup"]
yield _test_smoke_pipelines, superdataset_pipeline, []
Expand Down
1 change: 1 addition & 0 deletions datalad/crawler/pipelines/tests/test_fcptable.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

TOPURL = "http://fcon_1000.projects.nitrc.org/fcpClassic/FcpTable.html"

@skip_direct_mode
def test_smoke_pipelines():
yield _test_smoke_pipelines, pipeline, ['bogus']
yield _test_smoke_pipelines, superdataset_pipeline, []
Expand Down
2 changes: 2 additions & 0 deletions datalad/crawler/pipelines/tests/test_openfmri.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def __test_basic_openfmri_dataset_pipeline_with_annex(path):
@serve_path_via_http
@with_tempfile
@with_tempfile
@skip_direct_mode
def test_openfmri_pipeline1(ind, topurl, outd, clonedir):
index_html = opj(ind, 'ds666', 'index.html')

Expand Down Expand Up @@ -433,6 +434,7 @@ def _pipeline(*args, **kwargs):
)
@serve_path_via_http
@with_tempfile
@skip_direct_mode
def test_openfmri_pipeline2(ind, topurl, outd):
# no versioned files -- should still work! ;)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
)
@serve_path_via_http
@with_tempfile
@skip_direct_mode
def test_openfmri_superdataset_pipeline1(ind, topurl, outd):

list(initiate_dataset(
Expand Down
3 changes: 3 additions & 0 deletions datalad/crawler/pipelines/tests/test_simple_with_archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
lgr = getLogger('datalad.crawl.tests')


@skip_direct_mode
def test_smoke_pipelines():
yield _test_smoke_pipelines, pipeline, ["random_url"]

Expand All @@ -39,6 +40,7 @@ def test_smoke_pipelines():
@with_tree(tree=TEST_TREE1, archives_leading_dir=False)
@serve_path_via_http
@with_tempfile
@skip_direct_mode
def test_simple1(ind, topurl, outd):

list(initiate_dataset(
Expand Down Expand Up @@ -74,6 +76,7 @@ def test_simple1(ind, topurl, outd):
}, archives_leading_dir=False)
@serve_path_via_http
@with_tempfile
@skip_direct_mode
def test_crawl_autoaddtext(ind, topurl, outd):
ds = create(outd, text_no_annex=True)
with chpwd(outd): # TODO -- dataset argument
Expand Down
2 changes: 2 additions & 0 deletions datalad/customremotes/tests/test_archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def check_basic_scenario(fn_archive, fn_extracted, direct, d, d2):
@with_tree(
tree={'a.tar.gz': {'d': {fn_inarchive_obscure: '123'}}}
)
@skip_direct_mode
def test_annex_get_from_subdir(topdir):
from datalad.api import add_archive_content
annex = AnnexRepo(topdir, init=True)
Expand Down Expand Up @@ -151,6 +152,7 @@ def test_get_git_environ_adjusted():
assert_equal(sys_env["PWD"], os.environ.get("PWD"))


@skip_direct_mode
def test_basic_scenario():
yield check_basic_scenario, 'a.tar.gz', 'simple.txt', False
if not on_windows:
Expand Down
1 change: 1 addition & 0 deletions datalad/customremotes/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@


@with_tree(tree={'file.dat': ''})
@skip_direct_mode
def test_get_contentlocation(tdir):
repo = AnnexRepo(tdir, create=True, init=True)
repo.add('file.dat')
Expand Down
4 changes: 4 additions & 0 deletions datalad/distribution/tests/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def test_add_files(path):


@with_tempfile(mkdir=True)
@skip_direct_mode
def test_add_recursive(path):
# make simple hierarchy
parent = Dataset(path).create()
Expand Down Expand Up @@ -147,6 +148,7 @@ def test_add_recursive(path):


@with_tree(**tree_arg)
@skip_direct_mode
def test_add_dirty_tree(path):
ds = Dataset(path)
ds.create(force=True, save=False)
Expand Down Expand Up @@ -303,6 +305,7 @@ def test_add_source(path, url, ds_dir):

@with_tree(**tree_arg)
@with_tempfile(mkdir=True)
@skip_direct_mode
def test_add_subdataset(path, other):
subds = create(opj(path, 'dir'), force=True)
ds = create(path, force=True)
Expand Down Expand Up @@ -339,6 +342,7 @@ def test_add_subdataset(path, other):
'file2.txt': 'some text to go to annex',
'.gitattributes': '* annex.largefiles=(not(mimetype=text/*))'}
)
@skip_direct_mode
def test_add_mimetypes(path):
# XXX apparently there is symlinks dereferencing going on while deducing repo
# type there!!!! so can't use following invocation -- TODO separately
Expand Down
1 change: 1 addition & 0 deletions datalad/distribution/tests/test_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def test_clone_isnot_recursive(src, path_nr, path_r):
# .git/config show a submodule url "file:///aaa/bbb%20b/..."
# this is delivered by with_testrepos as the url to clone
@with_tempfile
@skip_direct_mode
def test_clone_into_dataset(source, top_path):

ds = create(top_path)
Expand Down
5 changes: 5 additions & 0 deletions datalad/distribution/tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def test_create(path):


@with_tempfile
@skip_direct_mode
def test_create_sub(path):

ds = Dataset(path)
Expand Down Expand Up @@ -172,6 +173,8 @@ def test_create_sub(path):


@with_tree(tree=_dataset_hierarchy_template)
@skip_direct_mode
@skip_direct_mode
def test_create_subdataset_hierarchy_from_top(path):
# how it would look like to overlay a subdataset hierarchy onto
# an existing directory tree
Expand Down Expand Up @@ -200,6 +203,7 @@ def test_create_subdataset_hierarchy_from_top(path):


@with_tempfile
@skip_direct_mode
def test_nested_create(path):
# to document some more organic usage pattern
ds = Dataset(path).create()
Expand Down Expand Up @@ -289,6 +293,7 @@ def test_create_withplugin(path):


@with_tempfile(mkdir=True)
@skip_direct_mode
def test_create_text_no_annex(path):
ds = create(path, text_no_annex=True)
ok_clean_git(path)
Expand Down
4 changes: 4 additions & 0 deletions datalad/distribution/tests/test_create_sibling.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def process_digests_mtimes(digests, mtimes):
@with_testrepos('submodule_annex', flavors=['local'])
@with_tempfile(mkdir=True)
@with_tempfile
@skip_direct_mode
def test_target_ssh_recursive(origin, src_path, target_path):

# prepare src
Expand Down Expand Up @@ -368,6 +369,7 @@ def test_target_ssh_recursive(origin, src_path, target_path):
@with_testrepos('submodule_annex', flavors=['local'])
@with_tempfile(mkdir=True)
@with_tempfile
@skip_direct_mode
def test_target_ssh_since(origin, src_path, target_path):
# prepare src
source = install(src_path, source=origin, recursive=True)
Expand Down Expand Up @@ -430,6 +432,7 @@ def test_failon_no_permissions(src_path, target_path):
@skip_ssh
@with_tempfile(mkdir=True)
@with_tempfile
@skip_direct_mode
def test_replace_and_relative_sshpath(src_path, dst_path):
# We need to come up with the path relative to our current home directory
# https://github.com/datalad/datalad/issues/1653
Expand Down Expand Up @@ -530,6 +533,7 @@ def _test_target_ssh_inherit(standardgroup, src_path, target_path):
assert_false(target_sub.repo.file_has_content('sub.dat'))


@skip_direct_mode
def test_target_ssh_inherit():
# TODO: waits for resolution on
# https://github.com/datalad/datalad/issues/1274
Expand Down
4 changes: 4 additions & 0 deletions datalad/distribution/tests/test_create_test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def test_parse_spec():
eq_(_parse_spec(''), [])


@skip_direct_mode
def test_create_test_dataset():
# rudimentary smoke test
from datalad.api import create_test_dataset
Expand All @@ -47,6 +48,7 @@ def test_create_test_dataset():
ok_(len(glob(opj(ds, 'file*'))))


@skip_direct_mode
def test_create_1test_dataset():
# and just a single dataset
from datalad.api import create_test_dataset
Expand All @@ -57,6 +59,7 @@ def test_create_1test_dataset():


@with_tempfile(mkdir=True)
@skip_direct_mode
def test_new_relpath(topdir):
from datalad.api import create_test_dataset
with swallow_logs(), chpwd(topdir), swallow_outputs():
Expand All @@ -68,6 +71,7 @@ def test_new_relpath(topdir):


@with_tempfile()
@skip_direct_mode
def test_hierarchy(topdir):
# GH 1178
from datalad.api import create_test_dataset
Expand Down
7 changes: 7 additions & 0 deletions datalad/distribution/tests/test_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def test_get_flexible_source_candidates_for_submodule(t, t2):

@with_tempfile(mkdir=True)
@with_tempfile(content="doesntmatter")
@skip_direct_mode
def test_get_invalid_call(path, file_outside):

# no argument at all:
Expand Down Expand Up @@ -156,6 +157,7 @@ def test_get_single_file(path):
'file4.txt': 'whatever 4'})
@serve_path_via_http
@with_tempfile(mkdir=True)
@skip_direct_mode
def test_get_multiple_files(path, url, ds_dir):
from os import listdir
from datalad.support.network import RI
Expand Down Expand Up @@ -203,6 +205,7 @@ def test_get_multiple_files(path, url, ds_dir):
'file4.txt': 'something'
}}})
@with_tempfile(mkdir=True)
@skip_direct_mode
def test_get_recurse_dirs(o_path, c_path):

# prepare source:
Expand Down Expand Up @@ -367,6 +370,7 @@ def test_get_install_missing_subdataset(src, path):
# 'subds': {'file_in_annex.txt': 'content'}})
@with_tempfile(mkdir=True)
@with_tempfile(mkdir=True)
@skip_direct_mode
def test_get_mixed_hierarchy(src, path):

origin = Dataset(src).create(no_annex=True)
Expand Down Expand Up @@ -414,6 +418,7 @@ def test_autoresolve_multiple_datasets(src, path):
@slow # 20 sec
@with_tempfile(mkdir=True)
@with_tempfile(mkdir=True)
@skip_direct_mode
def test_get_autoresolve_recurse_subdatasets(src, path):

origin = Dataset(src).create()
Expand Down Expand Up @@ -441,6 +446,7 @@ def test_get_autoresolve_recurse_subdatasets(src, path):
@slow # 92sec
@with_tempfile(mkdir=True)
@with_tempfile(mkdir=True)
@skip_direct_mode
def test_recurse_existing(src, path):
origin_ds = _make_dataset_hierarchy(src)

Expand Down Expand Up @@ -483,6 +489,7 @@ def test_recurse_existing(src, path):
@slow # 33sec
@with_tempfile(mkdir=True)
@with_tempfile(mkdir=True)
@skip_direct_mode
def test_get_in_unavailable_subdataset(src, path):
_make_dataset_hierarchy(src)
root = install(
Expand Down
Loading

0 comments on commit bf4bc69

Please sign in to comment.