diff options
author | Jürg Billeter <j@bitron.ch> | 2019-06-26 15:59:21 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-06-27 10:46:27 +0200 |
commit | 868ff50c721164a9c24e076e163bed02145c4624 (patch) | |
tree | 3cf24ec870b0d6a14a909c3c816415253c475935 /tests/frontend/source_checkout.py | |
parent | af033797ccaaf27d6e30748416dbdd2284249006 (diff) | |
download | buildstream-868ff50c721164a9c24e076e163bed02145c4624.tar.gz |
Fetch sources as needed for bst source checkout
This removes the --fetch option of bst source checkout, always enabling
fetch support. This is in line with fetching subprojects as needed.
Diffstat (limited to 'tests/frontend/source_checkout.py')
-rw-r--r-- | tests/frontend/source_checkout.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/frontend/source_checkout.py b/tests/frontend/source_checkout.py index 0bedfe1e2..38041c45d 100644 --- a/tests/frontend/source_checkout.py +++ b/tests/frontend/source_checkout.py @@ -9,7 +9,6 @@ import pytest from buildstream.testing import cli # pylint: disable=unused-import from buildstream import utils, _yaml -from buildstream._exceptions import ErrorDomain # Project directory DATA_DIR = os.path.join( @@ -145,8 +144,7 @@ def test_source_checkout_except(datafiles, cli): @pytest.mark.datafiles(DATA_DIR) -@pytest.mark.parametrize('fetch', [(False), (True)]) -def test_source_checkout_fetch(datafiles, cli, fetch): +def test_source_checkout_fetch(datafiles, cli): project = str(datafiles) checkout = os.path.join(cli.directory, 'source-checkout') target = 'remote-import-dev.bst' @@ -158,21 +156,16 @@ def test_source_checkout_fetch(datafiles, cli, fetch): 'pony.h') _yaml.dump(element, target_path) - # Testing --fetch option requires that we do not have the sources + # Testing implicit fetching requires that we do not have the sources # cached already assert cli.get_element_state(project, target) == 'fetch needed' args = ['source', 'checkout'] - if fetch: - args += ['--fetch'] args += [target, checkout] result = cli.run(project=project, args=args) - if fetch: - result.assert_success() - assert os.path.exists(os.path.join(checkout, 'remote-import-dev', 'pony.h')) - else: - result.assert_main_error(ErrorDomain.PIPELINE, 'uncached-sources') + result.assert_success() + assert os.path.exists(os.path.join(checkout, 'remote-import-dev', 'pony.h')) @pytest.mark.datafiles(DATA_DIR) |