diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-04-20 20:30:17 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-04-25 00:16:01 +0900 |
commit | 6ef6be52c1cd66245fc7f13a3c472024e10c3c1a (patch) | |
tree | 19e1fa50917931aac784bca94d765f132c75805d /tests/format | |
parent | bacc060cfcf32cdb696ce1a3ef195ea9bed0d8c1 (diff) | |
download | buildstream-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/format')
109 files changed, 117 insertions, 6 deletions
diff --git a/tests/format/assertion/project.conf b/tests/format/assertion/project.conf index 4c0016692..0a0e2eaeb 100644 --- a/tests/format/assertion/project.conf +++ b/tests/format/assertion/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/dependencies1/project.conf b/tests/format/dependencies1/project.conf index fcd60b6df..9a5f11ee1 100644 --- a/tests/format/dependencies1/project.conf +++ b/tests/format/dependencies1/project.conf @@ -1,3 +1,4 @@ # Basic project name: test +min-version: 2.0 element-path: elements diff --git a/tests/format/dependencies2/project.conf b/tests/format/dependencies2/project.conf index 2027cc27a..716db37ac 100644 --- a/tests/format/dependencies2/project.conf +++ b/tests/format/dependencies2/project.conf @@ -1,3 +1,4 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 diff --git a/tests/format/dependencies3/project.conf b/tests/format/dependencies3/project.conf index d9f7e08cb..8b361b03d 100644 --- a/tests/format/dependencies3/project.conf +++ b/tests/format/dependencies3/project.conf @@ -1 +1,2 @@ name: dup-dup-checker +min-version: 2.0 diff --git a/tests/format/include.py b/tests/format/include.py index c64753be5..12b043c8e 100644 --- a/tests/format/include.py +++ b/tests/format/include.py @@ -25,7 +25,7 @@ def test_include_project_file(cli, datafiles): def test_include_missing_file(cli, tmpdir): - tmpdir.join("project.conf").write('{"name": "test"}') + tmpdir.join("project.conf").write('{"name": "test", "min-version": "2.0"}') element = tmpdir.join("include_missing_file.bst") # Normally we would use dicts and _yaml.roundtrip_dump to write such things, but here @@ -48,7 +48,7 @@ def test_include_missing_file(cli, tmpdir): def test_include_dir(cli, tmpdir): - tmpdir.join("project.conf").write('{"name": "test"}') + tmpdir.join("project.conf").write('{"name": "test", "min-version": "2.0"}') tmpdir.mkdir("subdir") element = tmpdir.join("include_dir.bst") diff --git a/tests/format/include/conditional/project.conf b/tests/format/include/conditional/project.conf index cb54779d3..fbfc9f827 100644 --- a/tests/format/include/conditional/project.conf +++ b/tests/format/include/conditional/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: build_arch: diff --git a/tests/format/include/eventual_overrides/project.conf b/tests/format/include/eventual_overrides/project.conf index b32753625..20636c446 100644 --- a/tests/format/include/eventual_overrides/project.conf +++ b/tests/format/include/eventual_overrides/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/include/file/project.conf b/tests/format/include/file/project.conf index a7791a416..a71243f86 100644 --- a/tests/format/include/file/project.conf +++ b/tests/format/include/file/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - extra_conf.yml diff --git a/tests/format/include/file_with_subproject/project.conf b/tests/format/include/file_with_subproject/project.conf index a7791a416..a71243f86 100644 --- a/tests/format/include/file_with_subproject/project.conf +++ b/tests/format/include/file_with_subproject/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - extra_conf.yml diff --git a/tests/format/include/file_with_subproject/subproject/project.conf b/tests/format/include/file_with_subproject/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/file_with_subproject/subproject/project.conf +++ b/tests/format/include/file_with_subproject/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/inner/project.conf b/tests/format/include/inner/project.conf index 8bdfc428a..12dcd52bc 100644 --- a/tests/format/include/inner/project.conf +++ b/tests/format/include/inner/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: (@): diff --git a/tests/format/include/junction/project.conf b/tests/format/include/junction/project.conf index 4836c5f8b..804374680 100644 --- a/tests/format/include/junction/project.conf +++ b/tests/format/include/junction/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - junction.bst:extra_conf.yml diff --git a/tests/format/include/junction/subproject/project.conf b/tests/format/include/junction/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/junction/subproject/project.conf +++ b/tests/format/include/junction/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/junction_options/project.conf b/tests/format/include/junction_options/project.conf index 4836c5f8b..804374680 100644 --- a/tests/format/include/junction_options/project.conf +++ b/tests/format/include/junction_options/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - junction.bst:extra_conf.yml diff --git a/tests/format/include/junction_options/subproject/project.conf b/tests/format/include/junction_options/subproject/project.conf index 33ab0c8af..4d035b484 100644 --- a/tests/format/include/junction_options/subproject/project.conf +++ b/tests/format/include/junction_options/subproject/project.conf @@ -1,4 +1,5 @@ name: test-sub +min-version: 2.0 options: local_option: diff --git a/tests/format/include/junction_options_deep/project.conf b/tests/format/include/junction_options_deep/project.conf index 2525081ce..a114cb8e6 100644 --- a/tests/format/include/junction_options_deep/project.conf +++ b/tests/format/include/junction_options_deep/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - junction-1.bst:extra_conf.yml diff --git a/tests/format/include/junction_options_deep/subproject-1/project.conf b/tests/format/include/junction_options_deep/subproject-1/project.conf index f0cd28202..5a42d3191 100644 --- a/tests/format/include/junction_options_deep/subproject-1/project.conf +++ b/tests/format/include/junction_options_deep/subproject-1/project.conf @@ -1 +1,2 @@ name: test-sub-1 +min-version: 2.0 diff --git a/tests/format/include/junction_options_deep/subproject-2/project.conf b/tests/format/include/junction_options_deep/subproject-2/project.conf index d44ccd809..b64e3fa49 100644 --- a/tests/format/include/junction_options_deep/subproject-2/project.conf +++ b/tests/format/include/junction_options_deep/subproject-2/project.conf @@ -1,4 +1,5 @@ name: test-sub-2 +min-version: 2.0 options: local_option: diff --git a/tests/format/include/junction_options_element/project.conf b/tests/format/include/junction_options_element/project.conf index b32753625..20636c446 100644 --- a/tests/format/include/junction_options_element/project.conf +++ b/tests/format/include/junction_options_element/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/include/junction_options_element/subproject/project.conf b/tests/format/include/junction_options_element/subproject/project.conf index 33ab0c8af..4d035b484 100644 --- a/tests/format/include/junction_options_element/subproject/project.conf +++ b/tests/format/include/junction_options_element/subproject/project.conf @@ -1,4 +1,5 @@ name: test-sub +min-version: 2.0 options: local_option: diff --git a/tests/format/include/local_to_junction/project.conf b/tests/format/include/local_to_junction/project.conf index 4836c5f8b..804374680 100644 --- a/tests/format/include/local_to_junction/project.conf +++ b/tests/format/include/local_to_junction/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - junction.bst:extra_conf.yml diff --git a/tests/format/include/local_to_junction/subproject/project.conf b/tests/format/include/local_to_junction/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/local_to_junction/subproject/project.conf +++ b/tests/format/include/local_to_junction/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/options/project.conf b/tests/format/include/options/project.conf index a7791a416..a71243f86 100644 --- a/tests/format/include/options/project.conf +++ b/tests/format/include/options/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - extra_conf.yml diff --git a/tests/format/include/overrides-junction/project.conf b/tests/format/include/overrides-junction/project.conf index d03bec634..da1d184ae 100644 --- a/tests/format/include/overrides-junction/project.conf +++ b/tests/format/include/overrides-junction/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 elements: junction: diff --git a/tests/format/include/overrides-junction/subproject/project.conf b/tests/format/include/overrides-junction/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/overrides-junction/subproject/project.conf +++ b/tests/format/include/overrides-junction/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/overrides/project.conf b/tests/format/include/overrides/project.conf index fa3c75703..07a6bfe21 100644 --- a/tests/format/include/overrides/project.conf +++ b/tests/format/include/overrides/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 elements: junction: diff --git a/tests/format/include/overrides/subproject/project.conf b/tests/format/include/overrides/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/overrides/subproject/project.conf +++ b/tests/format/include/overrides/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/recursive/project.conf b/tests/format/include/recursive/project.conf index a7791a416..a71243f86 100644 --- a/tests/format/include/recursive/project.conf +++ b/tests/format/include/recursive/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - extra_conf.yml diff --git a/tests/format/include/string/project.conf b/tests/format/include/string/project.conf index 6ee9988e9..1d011ee92 100644 --- a/tests/format/include/string/project.conf +++ b/tests/format/include/string/project.conf @@ -1,3 +1,4 @@ name: test +min-version: 2.0 (@): extra_conf.yml diff --git a/tests/format/include/sub-include/project.conf b/tests/format/include/sub-include/project.conf index 7f7df84c8..6e7fc95a2 100644 --- a/tests/format/include/sub-include/project.conf +++ b/tests/format/include/sub-include/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 elements: manual: diff --git a/tests/format/include_composition.py b/tests/format/include_composition.py index 4af6862fa..3224822af 100644 --- a/tests/format/include_composition.py +++ b/tests/format/include_composition.py @@ -11,7 +11,7 @@ from tests.testutils import dummy_context @contextmanager def make_includes(basedir): - _yaml.roundtrip_dump({"name": "test"}, os.path.join(basedir, "project.conf")) + _yaml.roundtrip_dump({"name": "test", "min-version": "2.0"}, os.path.join(basedir, "project.conf")) with dummy_context() as context: project = Project(basedir, context) loader = project.loader diff --git a/tests/format/invalid-keys/project.conf b/tests/format/invalid-keys/project.conf index c24f5789e..b4ea0966a 100644 --- a/tests/format/invalid-keys/project.conf +++ b/tests/format/invalid-keys/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: thingy: diff --git a/tests/format/junctions/bar/project.conf b/tests/format/junctions/bar/project.conf index f8ed6621d..42d288416 100644 --- a/tests/format/junctions/bar/project.conf +++ b/tests/format/junctions/bar/project.conf @@ -1 +1,2 @@ name: bar +min-version: 2.0 diff --git a/tests/format/junctions/base/project.conf b/tests/format/junctions/base/project.conf index 951ea1a34..7e258e29f 100644 --- a/tests/format/junctions/base/project.conf +++ b/tests/format/junctions/base/project.conf @@ -1 +1,2 @@ name: base +min-version: 2.0 diff --git a/tests/format/junctions/config-target/project.conf b/tests/format/junctions/config-target/project.conf index 4049c3739..d9e1d7a4f 100644 --- a/tests/format/junctions/config-target/project.conf +++ b/tests/format/junctions/config-target/project.conf @@ -1,3 +1,4 @@ name: config-target +min-version: 2.0 element-path: elements diff --git a/tests/format/junctions/config-target/subproject/project.conf b/tests/format/junctions/config-target/subproject/project.conf index 1097282c3..1529ece04 100644 --- a/tests/format/junctions/config-target/subproject/project.conf +++ b/tests/format/junctions/config-target/subproject/project.conf @@ -1,3 +1,4 @@ name: subproject +min-version: 2.0 element-path: elements diff --git a/tests/format/junctions/config-target/subproject/subsubproject/project.conf b/tests/format/junctions/config-target/subproject/subsubproject/project.conf index 9d75121a0..162143c80 100644 --- a/tests/format/junctions/config-target/subproject/subsubproject/project.conf +++ b/tests/format/junctions/config-target/subproject/subsubproject/project.conf @@ -1,3 +1,4 @@ name: subsubproject +min-version: 2.0 element-path: elements diff --git a/tests/format/junctions/conflict/project.conf b/tests/format/junctions/conflict/project.conf index 395bb8423..660ab4fa2 100644 --- a/tests/format/junctions/conflict/project.conf +++ b/tests/format/junctions/conflict/project.conf @@ -1 +1,2 @@ name: conflict +min-version: 2.0 diff --git a/tests/format/junctions/foo/project.conf b/tests/format/junctions/foo/project.conf index 5a240e3ed..43a09bb5e 100644 --- a/tests/format/junctions/foo/project.conf +++ b/tests/format/junctions/foo/project.conf @@ -1 +1,2 @@ name: foo +min-version: 2.0 diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf b/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf index 2e96170f8..6bdff02c5 100644 --- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf +++ b/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf @@ -1,5 +1,8 @@ # Unique project name name: projectB +# Minimum required BuildStream version +min-version: 2.0 + # Subdirectory where elements are stored element-path: elements diff --git a/tests/format/junctions/inconsistent-names/junctionA/project.conf b/tests/format/junctions/inconsistent-names/junctionA/project.conf index 166c4b78c..8af914819 100644 --- a/tests/format/junctions/inconsistent-names/junctionA/project.conf +++ b/tests/format/junctions/inconsistent-names/junctionA/project.conf @@ -1,5 +1,8 @@ # Unique project name name: projectA +# Minimum required BuildStream version +min-version: 2.0 + # Subdirectory where elements are stored element-path: elements diff --git a/tests/format/junctions/inconsistent-names/project.conf b/tests/format/junctions/inconsistent-names/project.conf index 064bbc588..8eef10e76 100644 --- a/tests/format/junctions/inconsistent-names/project.conf +++ b/tests/format/junctions/inconsistent-names/project.conf @@ -1,5 +1,8 @@ # Unique project name name: inconsistent-names +# Minimum required BuildStream version +min-version: 2.0 + # Subdirectory where elements are stored element-path: elements diff --git a/tests/format/junctions/invalid/project.conf b/tests/format/junctions/invalid/project.conf index 38070bf71..ec193834a 100644 --- a/tests/format/junctions/invalid/project.conf +++ b/tests/format/junctions/invalid/project.conf @@ -1 +1,2 @@ name: invalid +min-version: 2.0 diff --git a/tests/format/junctions/missing-element/junctionA/junctionB/project.conf b/tests/format/junctions/missing-element/junctionA/junctionB/project.conf index 41b8d6c72..7d0310066 100644 --- a/tests/format/junctions/missing-element/junctionA/junctionB/project.conf +++ b/tests/format/junctions/missing-element/junctionA/junctionB/project.conf @@ -1 +1,2 @@ name: projectB +min-version: 2.0 diff --git a/tests/format/junctions/missing-element/junctionA/project.conf b/tests/format/junctions/missing-element/junctionA/project.conf index 5f6ab28a2..7a0f119c3 100644 --- a/tests/format/junctions/missing-element/junctionA/project.conf +++ b/tests/format/junctions/missing-element/junctionA/project.conf @@ -1 +1,2 @@ name: projectA +min-version: 2.0 diff --git a/tests/format/junctions/missing-element/project.conf b/tests/format/junctions/missing-element/project.conf index b32753625..20636c446 100644 --- a/tests/format/junctions/missing-element/project.conf +++ b/tests/format/junctions/missing-element/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/junctions/nested/project.conf b/tests/format/junctions/nested/project.conf index 551f51c6a..eba806781 100644 --- a/tests/format/junctions/nested/project.conf +++ b/tests/format/junctions/nested/project.conf @@ -1 +1,2 @@ name: nested +min-version: 2.0 diff --git a/tests/format/junctions/options-base/project.conf b/tests/format/junctions/options-base/project.conf index a98ebd5ed..58bfa55e5 100644 --- a/tests/format/junctions/options-base/project.conf +++ b/tests/format/junctions/options-base/project.conf @@ -1,4 +1,5 @@ name: options-base +min-version: 2.0 options: animal: type: enum diff --git a/tests/format/junctions/options-default/project.conf b/tests/format/junctions/options-default/project.conf index b9e58a582..c362c12b6 100644 --- a/tests/format/junctions/options-default/project.conf +++ b/tests/format/junctions/options-default/project.conf @@ -1 +1,2 @@ name: options-default +min-version: 2.0 diff --git a/tests/format/junctions/options-inherit/project.conf b/tests/format/junctions/options-inherit/project.conf index 1e0ea4464..b5680a792 100644 --- a/tests/format/junctions/options-inherit/project.conf +++ b/tests/format/junctions/options-inherit/project.conf @@ -1,4 +1,5 @@ name: options-inherit +min-version: 2.0 options: animal: type: enum diff --git a/tests/format/junctions/options/project.conf b/tests/format/junctions/options/project.conf index de53ae176..f191a50a9 100644 --- a/tests/format/junctions/options/project.conf +++ b/tests/format/junctions/options/project.conf @@ -1 +1,2 @@ name: options +min-version: 2.0 diff --git a/tests/format/junctions/toplevel/project.conf b/tests/format/junctions/toplevel/project.conf index 496c82128..d35b2b8f8 100644 --- a/tests/format/junctions/toplevel/project.conf +++ b/tests/format/junctions/toplevel/project.conf @@ -1 +1,2 @@ name: toplevel +min-version: 2.0 diff --git a/tests/format/list-directive-error-element/project.conf b/tests/format/list-directive-error-element/project.conf index b32753625..20636c446 100644 --- a/tests/format/list-directive-error-element/project.conf +++ b/tests/format/list-directive-error-element/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/list-directive-error-project/project.conf b/tests/format/list-directive-error-project/project.conf index 2d66408a8..cfeb30a4b 100644 --- a/tests/format/list-directive-error-project/project.conf +++ b/tests/format/list-directive-error-project/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 artifacts: (>): diff --git a/tests/format/list-directive-type-error/project.conf b/tests/format/list-directive-type-error/project.conf index 79f73402b..c25ef0713 100644 --- a/tests/format/list-directive-type-error/project.conf +++ b/tests/format/list-directive-type-error/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: arch: diff --git a/tests/format/option-arch-alias/project.conf b/tests/format/option-arch-alias/project.conf index 47f0945c9..46a7e127d 100644 --- a/tests/format/option-arch-alias/project.conf +++ b/tests/format/option-arch-alias/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: machine_arch: diff --git a/tests/format/option-arch-unknown/project.conf b/tests/format/option-arch-unknown/project.conf index 0827ec387..a72cba198 100644 --- a/tests/format/option-arch-unknown/project.conf +++ b/tests/format/option-arch-unknown/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: machine_arch: diff --git a/tests/format/option-arch/project.conf b/tests/format/option-arch/project.conf index 8b94232cf..c386c16b9 100644 --- a/tests/format/option-arch/project.conf +++ b/tests/format/option-arch/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: machine_arch: diff --git a/tests/format/option-bool/project.conf b/tests/format/option-bool/project.conf index a51c4fcbe..fac5b55ed 100644 --- a/tests/format/option-bool/project.conf +++ b/tests/format/option-bool/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/option-element-mask-invalid/project.conf b/tests/format/option-element-mask-invalid/project.conf index a3d381855..cabae029c 100644 --- a/tests/format/option-element-mask-invalid/project.conf +++ b/tests/format/option-element-mask-invalid/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug_elements: diff --git a/tests/format/option-element-mask/project.conf b/tests/format/option-element-mask/project.conf index ede07fbdd..a00d4555e 100644 --- a/tests/format/option-element-mask/project.conf +++ b/tests/format/option-element-mask/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug_elements: diff --git a/tests/format/option-enum-missing/project.conf b/tests/format/option-enum-missing/project.conf index d6cd7049a..fea674958 100644 --- a/tests/format/option-enum-missing/project.conf +++ b/tests/format/option-enum-missing/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: empty: diff --git a/tests/format/option-enum/project.conf b/tests/format/option-enum/project.conf index 0b8ea6d1e..6e471e6e2 100644 --- a/tests/format/option-enum/project.conf +++ b/tests/format/option-enum/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: brother: diff --git a/tests/format/option-exports/project.conf b/tests/format/option-exports/project.conf index e81a31347..e208536c7 100644 --- a/tests/format/option-exports/project.conf +++ b/tests/format/option-exports/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: diff --git a/tests/format/option-flags-missing/project.conf b/tests/format/option-flags-missing/project.conf index 6554022e4..79128819a 100644 --- a/tests/format/option-flags-missing/project.conf +++ b/tests/format/option-flags-missing/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: empty: diff --git a/tests/format/option-flags/project.conf b/tests/format/option-flags/project.conf index 1cab9e315..75aac7ad3 100644 --- a/tests/format/option-flags/project.conf +++ b/tests/format/option-flags/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: # Include an enum option here so we can compare it diff --git a/tests/format/option-list-directive/project.conf b/tests/format/option-list-directive/project.conf index 5b2b64fe8..588b3bcd6 100644 --- a/tests/format/option-list-directive/project.conf +++ b/tests/format/option-list-directive/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: shell_mount_devices: diff --git a/tests/format/option-os/project.conf b/tests/format/option-os/project.conf index 5edb5072f..db2da08d7 100644 --- a/tests/format/option-os/project.conf +++ b/tests/format/option-os/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: machine_os: diff --git a/tests/format/option-overrides/project.conf b/tests/format/option-overrides/project.conf index c8058f076..c9e73a190 100644 --- a/tests/format/option-overrides/project.conf +++ b/tests/format/option-overrides/project.conf @@ -2,6 +2,7 @@ # in the element overrides. # name: test +min-version: 2.0 options: arch: diff --git a/tests/format/options/compound-and-condition/project.conf b/tests/format/options/compound-and-condition/project.conf index 650d017bd..e4816596f 100644 --- a/tests/format/options/compound-and-condition/project.conf +++ b/tests/format/options/compound-and-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug: diff --git a/tests/format/options/compound-or-condition/project.conf b/tests/format/options/compound-or-condition/project.conf index c59cc64f3..6841b79cc 100644 --- a/tests/format/options/compound-or-condition/project.conf +++ b/tests/format/options/compound-or-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug: diff --git a/tests/format/options/deep-nesting/project.conf b/tests/format/options/deep-nesting/project.conf index d912cd19e..02bbdb3ff 100644 --- a/tests/format/options/deep-nesting/project.conf +++ b/tests/format/options/deep-nesting/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: type: bool diff --git a/tests/format/options/invalid-condition/project.conf b/tests/format/options/invalid-condition/project.conf index b31f35c95..c2b3c240f 100644 --- a/tests/format/options/invalid-condition/project.conf +++ b/tests/format/options/invalid-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: opt: diff --git a/tests/format/options/invalid-expression/project.conf b/tests/format/options/invalid-expression/project.conf index ee0147232..6a9af4ca4 100644 --- a/tests/format/options/invalid-expression/project.conf +++ b/tests/format/options/invalid-expression/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: opt: diff --git a/tests/format/options/invalid-name-dashes/project.conf b/tests/format/options/invalid-name-dashes/project.conf index 045ce564f..a554ed05f 100644 --- a/tests/format/options/invalid-name-dashes/project.conf +++ b/tests/format/options/invalid-name-dashes/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: name-with-dashes: diff --git a/tests/format/options/invalid-name-leading-number/project.conf b/tests/format/options/invalid-name-leading-number/project.conf index bb3e2ef6d..ec3e16999 100644 --- a/tests/format/options/invalid-name-leading-number/project.conf +++ b/tests/format/options/invalid-name-leading-number/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: 123number_is_first: diff --git a/tests/format/options/invalid-name-plus/project.conf b/tests/format/options/invalid-name-plus/project.conf index d62869e73..4f1c690fd 100644 --- a/tests/format/options/invalid-name-plus/project.conf +++ b/tests/format/options/invalid-name-plus/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: name_with_+: diff --git a/tests/format/options/invalid-name-spaces/project.conf b/tests/format/options/invalid-name-spaces/project.conf index 66931e28c..3c662ee81 100644 --- a/tests/format/options/invalid-name-spaces/project.conf +++ b/tests/format/options/invalid-name-spaces/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: name with spaces: diff --git a/tests/format/options/invalid-type/project.conf b/tests/format/options/invalid-type/project.conf index b4280cdb6..aa00f508a 100644 --- a/tests/format/options/invalid-type/project.conf +++ b/tests/format/options/invalid-type/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: opt: diff --git a/tests/format/options/invalid-variable-name-plus/project.conf b/tests/format/options/invalid-variable-name-plus/project.conf index 5652bb8b3..d4a4699de 100644 --- a/tests/format/options/invalid-variable-name-plus/project.conf +++ b/tests/format/options/invalid-variable-name-plus/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/options/invalid-variable-name-spaces/project.conf b/tests/format/options/invalid-variable-name-spaces/project.conf index 5115115bf..a89d8b5a6 100644 --- a/tests/format/options/invalid-variable-name-spaces/project.conf +++ b/tests/format/options/invalid-variable-name-spaces/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/options/nested-condition/project.conf b/tests/format/options/nested-condition/project.conf index 104b89571..b66f5b53f 100644 --- a/tests/format/options/nested-condition/project.conf +++ b/tests/format/options/nested-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug: diff --git a/tests/format/options/simple-condition/project.conf b/tests/format/options/simple-condition/project.conf index b6bd29fb4..ab96936ef 100644 --- a/tests/format/options/simple-condition/project.conf +++ b/tests/format/options/simple-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: opt: diff --git a/tests/format/options/undefined-variable/project.conf b/tests/format/options/undefined-variable/project.conf index d634ef0a4..a00d51a67 100644 --- a/tests/format/options/undefined-variable/project.conf +++ b/tests/format/options/undefined-variable/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/project-overrides/prepend-configure-commands/project.conf b/tests/format/project-overrides/prepend-configure-commands/project.conf index 439a21809..b6053feb7 100644 --- a/tests/format/project-overrides/prepend-configure-commands/project.conf +++ b/tests/format/project-overrides/prepend-configure-commands/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 # Test that prepending to configure-commands works elements: diff --git a/tests/format/project.py b/tests/format/project.py index 3d0931b86..c2e2f733f 100644 --- a/tests/format/project.py +++ b/tests/format/project.py @@ -175,6 +175,7 @@ def test_plugin_no_load_ref(cli, datafiles, ref_storage): # config = { "name": "test", + "min-version": "2.0", "ref-storage": ref_storage, "plugins": [{"origin": "local", "path": "plugins", "sources": {"noloadref": 0}}], } diff --git a/tests/format/project/default/project.conf b/tests/format/project/default/project.conf index fd3134c58..0409a6f91 100644 --- a/tests/format/project/default/project.conf +++ b/tests/format/project/default/project.conf @@ -2,3 +2,4 @@ # name: pony +min-version: 2.0 diff --git a/tests/format/project/duplicate-plugins/project.conf b/tests/format/project/duplicate-plugins/project.conf index 4b8f5be5f..a413e6137 100644 --- a/tests/format/project/duplicate-plugins/project.conf +++ b/tests/format/project/duplicate-plugins/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 plugins: - origin: local diff --git a/tests/format/project/element-path/project.conf b/tests/format/project/element-path/project.conf index 57e87de4f..1309fddbb 100644 --- a/tests/format/project/element-path/project.conf +++ b/tests/format/project/element-path/project.conf @@ -1,2 +1,3 @@ name: foo +min-version: 2.0 element-path: elements diff --git a/tests/format/project/empty-depends/project.conf b/tests/format/project/empty-depends/project.conf index b32753625..20636c446 100644 --- a/tests/format/project/empty-depends/project.conf +++ b/tests/format/project/empty-depends/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/project/emptyname/project.conf b/tests/format/project/emptyname/project.conf index 2c5cf0783..9db3c011d 100644 --- a/tests/format/project/emptyname/project.conf +++ b/tests/format/project/emptyname/project.conf @@ -2,3 +2,4 @@ # this one is an empty string # name: '' +min-version: 2.0 diff --git a/tests/format/project/invalid-yaml/project.conf b/tests/format/project/invalid-yaml/project.conf index 5f9282bbf..96181d9cc 100644 --- a/tests/format/project/invalid-yaml/project.conf +++ b/tests/format/project/invalid-yaml/project.conf @@ -2,6 +2,7 @@ # name: pony +min-version: 2.0 variables: sbindir: "%{bindir} diff --git a/tests/format/project/invalidname/project.conf b/tests/format/project/invalidname/project.conf index 3b064d7ec..34b65719e 100644 --- a/tests/format/project/invalidname/project.conf +++ b/tests/format/project/invalidname/project.conf @@ -2,3 +2,4 @@ # this one contains a space # name: Project Name +min-version: 2.0 diff --git a/tests/format/project/local-plugin/project.conf b/tests/format/project/local-plugin/project.conf index 97166e350..ccb6ef433 100644 --- a/tests/format/project/local-plugin/project.conf +++ b/tests/format/project/local-plugin/project.conf @@ -1,4 +1,5 @@ name: foo +min-version: 2.0 plugins: - origin: local path: plugins diff --git a/tests/format/project/missing-element/project.conf b/tests/format/project/missing-element/project.conf index b32753625..20636c446 100644 --- a/tests/format/project/missing-element/project.conf +++ b/tests/format/project/missing-element/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/project/missing-junction/project.conf b/tests/format/project/missing-junction/project.conf index b32753625..20636c446 100644 --- a/tests/format/project/missing-junction/project.conf +++ b/tests/format/project/missing-junction/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/project/overridepath/project.conf b/tests/format/project/overridepath/project.conf index ef1d01c59..640bff318 100644 --- a/tests/format/project/overridepath/project.conf +++ b/tests/format/project/overridepath/project.conf @@ -1,6 +1,7 @@ # A project configuration which overrides the sandbox PATH environment variable name: foo +min-version: 2.0 environment: PATH: /bin:/sbin diff --git a/tests/format/project/plugin-allowed/project.conf b/tests/format/project/plugin-allowed/project.conf index d49e40d48..3896b7bc2 100644 --- a/tests/format/project/plugin-allowed/project.conf +++ b/tests/format/project/plugin-allowed/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 plugins: - origin: local diff --git a/tests/format/project/plugin-forbidden/project.conf b/tests/format/project/plugin-forbidden/project.conf index 39cc3d65f..0211b2061 100644 --- a/tests/format/project/plugin-forbidden/project.conf +++ b/tests/format/project/plugin-forbidden/project.conf @@ -1,2 +1,3 @@ name: test +min-version: 2.0 diff --git a/tests/format/project/plugin-preflight-error/project.conf b/tests/format/project/plugin-preflight-error/project.conf index 20a234413..07d60daf2 100644 --- a/tests/format/project/plugin-preflight-error/project.conf +++ b/tests/format/project/plugin-preflight-error/project.conf @@ -1,6 +1,7 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 # Whitelist the local test Source "errorplugin" to be loaded # diff --git a/tests/format/project/project-from-subdir/project.conf b/tests/format/project/project-from-subdir/project.conf index fd3134c58..0409a6f91 100644 --- a/tests/format/project/project-from-subdir/project.conf +++ b/tests/format/project/project-from-subdir/project.conf @@ -2,3 +2,4 @@ # name: pony +min-version: 2.0 diff --git a/tests/format/project/refs-options/project.conf b/tests/format/project/refs-options/project.conf index a44806da0..35941efae 100644 --- a/tests/format/project/refs-options/project.conf +++ b/tests/format/project/refs-options/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 ref-storage: project.refs options: diff --git a/tests/format/project/unsupported/project.conf b/tests/format/project/unsupported/project.conf index ecd8e06cc..76528a493 100644 --- a/tests/format/project/unsupported/project.conf +++ b/tests/format/project/unsupported/project.conf @@ -1,3 +1,3 @@ # A project which requires a too new version of the format name: foo -format-version: 5000 +min-version: 2.900 diff --git a/tests/format/variables.py b/tests/format/variables.py index ecc1e2b12..81bda291b 100644 --- a/tests/format/variables.py +++ b/tests/format/variables.py @@ -74,7 +74,7 @@ def test_cyclic_variables(cli, datafiles): @pytest.mark.datafiles(os.path.join(DATA_DIR, "protected-vars")) def test_use_of_protected_var_project_conf(cli, datafiles, protected_var): project = str(datafiles) - conf = {"name": "test", "variables": {protected_var: "some-value"}} + conf = {"name": "test", "min-version": "2.0", "variables": {protected_var: "some-value"}} _yaml.roundtrip_dump(conf, os.path.join(project, "project.conf")) element = { @@ -91,7 +91,7 @@ def test_use_of_protected_var_project_conf(cli, datafiles, protected_var): @pytest.mark.datafiles(os.path.join(DATA_DIR, "protected-vars")) def test_use_of_protected_var_element_overrides(cli, datafiles, protected_var): project = str(datafiles) - conf = {"name": "test", "elements": {"manual": {"variables": {protected_var: "some-value"}}}} + conf = {"name": "test", "min-version": "2.0", "elements": {"manual": {"variables": {protected_var: "some-value"}}}} _yaml.roundtrip_dump(conf, os.path.join(project, "project.conf")) element = { diff --git a/tests/format/variables/cyclic_variables/project.conf b/tests/format/variables/cyclic_variables/project.conf index b32753625..20636c446 100644 --- a/tests/format/variables/cyclic_variables/project.conf +++ b/tests/format/variables/cyclic_variables/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/variables/defaults/project.conf b/tests/format/variables/defaults/project.conf index 2027cc27a..716db37ac 100644 --- a/tests/format/variables/defaults/project.conf +++ b/tests/format/variables/defaults/project.conf @@ -1,3 +1,4 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 diff --git a/tests/format/variables/missing_variables/project.conf b/tests/format/variables/missing_variables/project.conf index 2027cc27a..716db37ac 100644 --- a/tests/format/variables/missing_variables/project.conf +++ b/tests/format/variables/missing_variables/project.conf @@ -1,3 +1,4 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 diff --git a/tests/format/variables/overrides/project.conf b/tests/format/variables/overrides/project.conf index 2027cc27a..716db37ac 100644 --- a/tests/format/variables/overrides/project.conf +++ b/tests/format/variables/overrides/project.conf @@ -1,3 +1,4 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 diff --git a/tests/format/variables/protected-vars/project.conf b/tests/format/variables/protected-vars/project.conf index 5a240e3ed..43a09bb5e 100644 --- a/tests/format/variables/protected-vars/project.conf +++ b/tests/format/variables/protected-vars/project.conf @@ -1 +1,2 @@ name: foo +min-version: 2.0 |