summaryrefslogtreecommitdiff
path: root/tests/format/project
Commit message (Collapse)AuthorAgeFilesLines
* tests/plugins/loading.py: Migrate tests for found/not found pluginsTristan Van Berkom2020-05-0310-51/+0
| | | | This new test replaces the test in tests/format/project.py.
* plugin.py/pluginfactory.py: Implementing BST_MIN_VERSIONTristan Van Berkom2020-04-294-0/+12
| | | | | | | | | | | | | | The BST_MIN_VERSION guards assert that the BuildStream core which loaded the plugin is compatible with the plugin itself. This commit adds BST_MIN_VERSION to the base plugin.py with documentation informing Plugin authors how to set the minimum version, and also adds the assertions at plugin loading time in pluginfactory.py. This commit also: * Adds the BST_MIN_VERSION specification to all current core plugins * Adds the BST_MIN_VERSION specification to plugins used in test cases
* Plugin loading refactor, removing all versioningTristan Van Berkom2020-04-294-7/+7
| | | | | | | | | | | | | | | | Plugin format versioning was decided to be removed for local plugins and any plugins for which we do not load an explicitly provided plugin. For pip, this will be handled with a standard distutils/setuptools approach, allowing users to specify pip style version boundaries in the plugin origins. This patch refactors plugin loading so that all related code goes into the private _pluginfactory module, a new small PluginOrigin type was added to better manipulate loaded origins. Test cases have been removed and will be readded in a following commit, adjusted to new expectations.
* Replace format-version with min-versionTristan Van Berkom2020-04-2517-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "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.
* source.py: Remove 'get_consistency' completelyBenjamin Schubert2020-01-162-8/+2
| | | | | This is not needed now that we have 'is_resolved' and 'is_cached'. We can therefore drop all calling places and implementations of it.
* Reformat code using BlackChandan Singh2019-11-142-4/+1
| | | | | | | As discussed over the mailing list, reformat code using Black. This is a one-off change to reformat all our codebase. Moving forward, we shouldn't expect such blanket reformats. Rather, we expect each change to already comply with the Black formatting style.
* tests/format/project.py: Added tests for missing files and missing junctionsTristan Van Berkom2019-03-124-0/+11
| | | | | These also assert that the provenance of the references to missing files are reported, guarding for regressions of issue #947
* tests: Migrate preflight error handling check to tests/format/project.pyTristan Van Berkom2019-01-164-0/+50
| | | | | | This is where other load time related plugin error handling is checked, and is the last thing to remove in the `tests/pipeline` directory.
* tests: Migrate test for load_ref() unsupporting plugins into format/project.pyTristan Van Berkom2019-01-163-0/+49
| | | | | | | The tests/format/project.py test already has some tests about how we error gracefully for bad plugins and bad plugin configurations, lets put it there rather than tests/pipeline/load.py which we will remove.
* tests/format/project.py: Added new regression test for empty dependency ↵Tristan Van Berkom2018-12-072-0/+4
| | | | | | dictionaries This adds a regression test for issue #803
* Adding test for Invalid Yamlissue-642-Invalid_project.conf_seen_as_missingknownexus2018-09-182-0/+9
|
* tests: test local plugins and element-path pathstiagogomes/issue-195Tiago Gomes2018-08-022-0/+8
|
* _project.py: Allow running bst commands from subdirectories of project rootChandan Singh2018-06-063-0/+6
| | | | | | | | When initializing the project, BuildStream will continue searching for project.conf in parent directories in case it is not found in the current directory. Fixes #368.
* tests/format/project.py: Added tests for loading of invalid project namesTristan Van Berkom2018-04-062-0/+8
|
* tests/format/project.py: Converted to use CLI test harnessTristan Van Berkom2018-04-066-0/+15
| | | | | | Moved the old style project format tests into the new CLI based directory in tests/format/ and converted to use the CLI fixture for these tests.
* tests/format/project.py: Test that conditional statements are supported in ↵Tristan Van Berkom2018-03-203-0/+29
| | | | project.refs
* tests: Test whether a plugin is allowed to be loadedfix-132-rebasedJonathan Maw2017-12-1310-0/+43
|
* Update tests for changed plugin loadingJonathan Maw2017-12-138-0/+52
Checking for plugins with the same name no longer happens in the plugincontext, it happens in project, so the old test was removed and a new one added.