Skip to content
Snippets Groups Projects
Commit a2b2fde9 authored by Jonathan Maw's avatar Jonathan Maw
Browse files

tests: Workspace tests check existence of .bstproject.yaml

parent d93ccd59
No related branches found
No related tags found
Loading
......@@ -93,6 +93,13 @@ def open_workspace(cli, tmpdir, datafiles, kind, track, suffix='', workspace_dir
result.assert_success()
# Assert that a .bstproject.yaml file has been created
# and contains the path to the project
bstproject_path = os.path.join(workspace_dir, '.bstproject.yaml')
assert os.path.exists(bstproject_path)
with open(bstproject_path) as f:
assert project_path in f.read()
# Assert that we are now buildable because the source is
# now cached.
assert cli.get_element_state(project_path, element_name) == 'buildable'
......@@ -148,6 +155,10 @@ def test_open_force(cli, tmpdir, datafiles, kind):
# Assert the workspace dir still exists
assert os.path.exists(workspace)
# Assert the bstproject doesn't exist
bstproject_path = os.path.join(workspace, '.bstproject.yaml')
assert not os.path.exists(bstproject_path)
# Now open the workspace again with --force, this should happily succeed
result = cli.run(project=project, args=[
'workspace', 'open', '--force', element_name, workspace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment