summaryrefslogtreecommitdiff
path: root/tests/cachekey
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2020-04-20 20:30:17 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2020-04-25 00:16:01 +0900
commit6ef6be52c1cd66245fc7f13a3c472024e10c3c1a (patch)
tree19e1fa50917931aac784bca94d765f132c75805d /tests/cachekey
parentbacc060cfcf32cdb696ce1a3ef195ea9bed0d8c1 (diff)
downloadbuildstream-6ef6be52c1cd66245fc7f13a3c472024e10c3c1a.tar.gz
Replace format-version with min-version
* "min-version" is specified as a <major>.<minor> point version and uses the installed BuildStream version instead of having a separate versioning number for the format. * The presence of "format-version" is now used to indicate that we might be loading a BuildStream 1 project. * For now, where parsing the version at startup is concerned, and also where `bst init` is concerned, we artificially bump the detected BuildStream version to 2.0 if we detect a version < 2.0, these exceptions can be removed once 2.0 is tagged and released. Summary of changes: _project.py: Now parse "min-version" and detect "format-version" to warn about loading a BuildStream 1 project _versions.py: Remove obsolete BST_FORMAT_VERSION numbers from here data/projectconfig.yaml: Remove old "format-version" from defaults utils.py: Added new private _parse_version() helper function, and another _get_bst_api_version() to get an adjusted API version. frontend/app.py, frontend/cli.py: Updated `bst init` implementation testing (buildstream.testing): Updated testing utilities to generate and use projects with min-version instead of format-version. tests and examples: Updated to use min-version across the board.
Diffstat (limited to 'tests/cachekey')
-rw-r--r--tests/cachekey/cachekey.py2
-rw-r--r--tests/cachekey/project/project.conf1
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py
index b669bacaa..08870f2a0 100644
--- a/tests/cachekey/cachekey.py
+++ b/tests/cachekey/cachekey.py
@@ -196,7 +196,7 @@ def test_cache_key_fatal_warnings(cli, tmpdir, first_warnings, second_warnings,
# Builds project, Runs bst show, gathers cache keys
def run_get_cache_key(project_name, warnings):
- config = {"name": project_name, "element-path": "elements", "fatal-warnings": warnings}
+ config = {"name": project_name, "min-version": "2.0", "element-path": "elements", "fatal-warnings": warnings}
project_dir = tmpdir.mkdir(project_name)
project_config_file = str(project_dir.join("project.conf"))
diff --git a/tests/cachekey/project/project.conf b/tests/cachekey/project/project.conf
index 49726cdef..fb06907ed 100644
--- a/tests/cachekey/project/project.conf
+++ b/tests/cachekey/project/project.conf
@@ -1,2 +1,3 @@
# Project config for cache key test
name: cachekey
+min-version: 2.0