Commit ad3a73d4 authored by Jürg Billeter's avatar Jürg Billeter

tests/remoteexecution/ Add test for partial CAS

parent 96cca33a
import os
import pytest
from buildstream._exceptions import ErrorDomain
from buildstream.plugintestutils import cli_remote_execution as cli
from buildstream.plugintestutils.integration import assert_contains
pytestmark = pytest.mark.remoteexecution
DATA_DIR = os.path.join(
# Test that `bst build` does not download file blobs of a build-only dependency
# to the local cache.
def test_build_dependency_partial_local_cas(cli, datafiles):
project = str(datafiles)
element_name = 'no-runtime-deps.bst'
builddep_element_name = 'autotools/amhello.bst'
checkout = os.path.join(, 'checkout')
builddep_checkout = os.path.join(, 'builddep-checkout')
services = cli.ensure_services()
assert set(services) == set(['action-cache', 'execution', 'storage'])
result =, args=['build', element_name])
# Verify that the target element is available in local cache
result =, args=['artifact', 'checkout', element_name,
'--directory', checkout])
assert_contains(checkout, ['/test'])
# Verify that the build-only dependency is not (complete) in the local cache
result =, args=['artifact', 'checkout', builddep_element_name,
'--directory', builddep_checkout])
result.assert_main_error(ErrorDomain.STREAM, 'uncached-checkout-attempt')
kind: manual
description: Test element without runtime dependencies
- autotools/amhello.bst
- echo Test > %{install-root}/test
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