diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-03-19 08:17:37 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-03-20 10:01:30 +0000 |
commit | 793ab0f3c751e163301901c0c1c1c82d00b2c0c9 (patch) | |
tree | a8aab673f6d96091c4bee07dfeccd0fb537824fb /tests/artifactcache | |
parent | 8a423b95cf6c674dde35f9998e549cb3ae08a215 (diff) | |
download | buildstream-793ab0f3c751e163301901c0c1c1c82d00b2c0c9.tar.gz |
Adapted test cases to new Context changes
Diffstat (limited to 'tests/artifactcache')
-rw-r--r-- | tests/artifactcache/basics.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/artifactcache/basics.py b/tests/artifactcache/basics.py index d8c17618b..298ea2a80 100644 --- a/tests/artifactcache/basics.py +++ b/tests/artifactcache/basics.py @@ -16,9 +16,8 @@ DATA_DIR = os.path.join( def pipeline(tmpdir): context = Context('x86_64') project = Project(DATA_DIR, 'x86_64') - - context.deploydir = os.path.join(str(tmpdir), 'deploy') context.artifactdir = os.path.join(str(tmpdir), 'artifact') + context.builddir = os.path.join(str(tmpdir), 'build') return Pipeline(context, project, "simple.bst", None) @@ -34,16 +33,16 @@ def test_empty_extract(pipeline): def test_commit_extract(pipeline): - os.makedirs(pipeline.context.deploydir, exist_ok=True) - with tempfile.TemporaryDirectory(dir=pipeline.context.deploydir) as deploydir: + os.makedirs(pipeline.context.builddir, exist_ok=True) + with tempfile.TemporaryDirectory(dir=pipeline.context.builddir) as builddir: # create file as mock build output - bindir = os.path.join(deploydir, 'bin') + bindir = os.path.join(builddir, 'bin') os.mkdir(bindir) with open(os.path.join(bindir, 'baz'), 'w') as f: f.write('hello, world') # commit build output to artifact cache - pipeline.artifacts.commit(pipeline.target, deploydir) + pipeline.artifacts.commit(pipeline.target, builddir) assert(pipeline.artifacts.contains(pipeline.target)) |