diff options
author | Jürg Billeter <j@bitron.ch> | 2020-02-06 08:49:28 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-02-11 21:07:39 +0100 |
commit | 2d0ef3aa9edb9794ac79abda98e6350efbee8b57 (patch) | |
tree | 7821528e6abc47da42dfa917c797450e75ce98d3 /tests | |
parent | 2ddcc45138adaabd4b9c81d96c859c76794978bc (diff) | |
download | buildstream-2d0ef3aa9edb9794ac79abda98e6350efbee8b57.tar.gz |
_workspaces.py: Increment format version, drop support for old versions
Do not accept old versions as bst 1.x workspaces do not separate source
and build files.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/frontend/workspace.py | 54 |
1 files changed, 4 insertions, 50 deletions
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py index e05b6bd1f..5b3ec7b7c 100644 --- a/tests/frontend/workspace.py +++ b/tests/frontend/workspace.py @@ -821,6 +821,8 @@ def test_detect_modifications(cli, tmpdir, datafiles, modification, strict): {"format-version": 0, "alpha.bst": {0: "/workspaces/bravo", 1: "/workspaces/charlie",}}, # Test loading a version with decimals {"format-version": 0.5}, + # Test loading an unsupported old version + {"format-version": 3}, # Test loading a future version {"format-version": BST_WORKSPACE_FORMAT_VERSION + 1}, ], @@ -842,58 +844,10 @@ def test_list_unsupported_workspace(cli, datafiles, workspace_cfg): @pytest.mark.parametrize( "workspace_cfg,expected", [ - # Test loading version 0 without a dict + # Test loading version 4 ( - {"alpha.bst": "/workspaces/bravo"}, { - "format-version": BST_WORKSPACE_FORMAT_VERSION, - "workspaces": {"alpha.bst": {"prepared": False, "path": "/workspaces/bravo", "running_files": {}}}, - }, - ), - # Test loading version 0 with only one source - ( - {"alpha.bst": {0: "/workspaces/bravo"}}, - { - "format-version": BST_WORKSPACE_FORMAT_VERSION, - "workspaces": {"alpha.bst": {"prepared": False, "path": "/workspaces/bravo", "running_files": {}}}, - }, - ), - # Test loading version 1 - ( - {"format-version": 1, "workspaces": {"alpha.bst": {"path": "/workspaces/bravo"}}}, - { - "format-version": BST_WORKSPACE_FORMAT_VERSION, - "workspaces": {"alpha.bst": {"prepared": False, "path": "/workspaces/bravo", "running_files": {}}}, - }, - ), - # Test loading version 2 - ( - { - "format-version": 2, - "workspaces": { - "alpha.bst": { - "path": "/workspaces/bravo", - "last_successful": "some_key", - "running_files": {"beta.bst": ["some_file"]}, - } - }, - }, - { - "format-version": BST_WORKSPACE_FORMAT_VERSION, - "workspaces": { - "alpha.bst": { - "prepared": False, - "path": "/workspaces/bravo", - "last_successful": "some_key", - "running_files": {"beta.bst": ["some_file"]}, - } - }, - }, - ), - # Test loading version 3 - ( - { - "format-version": 3, + "format-version": 4, "workspaces": {"alpha.bst": {"prepared": True, "path": "/workspaces/bravo", "running_files": {}}}, }, { |