summaryrefslogtreecommitdiff
path: root/tests/loader
Commit message (Collapse)AuthorAgeFilesLines
* _loader.py: Some fixes in how we load sources for junctionsTristan Van Berkom2018-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | o Ensure that we call Source._load_ref(), and consider project.refs this way o Ensure that we report a warning in the case that project.refs is in use and the loaded junction source has a redundant ref which is going to be ignored o Report more distinct machine readable errors for failures to load junction element sources o Handle Consistency.INCONSISTENT and Consistency.RESOLVED separately: - The user should be told something different depending on whether they need to fetch or whether they need to track. - It is never possible to automatically fetch the source in the case that the source has no ref to begin with. This also adjusts the test/loader/junctions.py test to expect the new error
* _project.py: Adhere to policy on private symbolsTristan Van Berkom2018-04-033-20/+23
| | | | | | | | | | | | | | | And adjust all surrounding sources for changed symbols. Additional details: o Added Project.get_shell_config() to report the shell configuration, instead of making those members all public o Moved assertions about project specified format versions required of plugins out of Plugin.__init__, and into Project.create_element() and Project.create_source(), so we can keep more things private This is a part of issue #285
* Add junction testsJürg Billeter2018-02-0847-0/+435
|
* Pass Project instance to LoaderJürg Billeter2018-02-085-23/+26
| | | | Project access will be required for junctions.
* Refactoring: Move exceptions module to be privateTristan Van Berkom2017-11-062-2/+2
| | | | Hide all of buildstream's internal exceptions from the API surface.
* Updating all test cases for the removal of architecture conditionals and optionsTristan Van Berkom2017-11-065-159/+16
|
* Adjust tests to new APITristan Maat2017-11-043-43/+43
|
* Updated test cases for internal API changes stemming from project optionsTristan Van Berkom2017-10-104-22/+37
|
* Updating test cases to construct the project/loader properly again.Tristan Van Berkom2017-10-084-179/+22
| | | | | This had changed when we added project variants and had to split up the loading steps a bit, now all is back to normal without variants.
* Removing variant testsTristan Van Berkom2017-10-0823-545/+0
|
* Fix affected test cases24-better-validation-for-loaded-yamlTristan Maat2017-09-144-1/+20
|
* Add element node validationsTristan Maat2017-09-143-0/+21
|
* tests/loader: Test dependency type 'all'Jürg Billeter2017-08-102-0/+22
|
* Test Cases: Updated for new Project / Loader API changesTristan Van Berkom2017-07-174-50/+50
|
* variant tests: Added tests to ensure default variant is chosenTristan Van Berkom2017-07-172-0/+32
| | | | | Both for when depending on a toplevel with variants, or when ambivalently depending on an element with variants.
* variants.py tests: Added test cases to ensure LoadError() is raised for ↵Tristan Van Berkom2017-07-173-0/+66
| | | | invalid variant requests
* Add --host-arch and --target-arch, and 'host-arches' conditionalSam Thursfield2017-07-065-42/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command adds initial cross-compilation support to BuildStream. It has been tested against a converted version of the Baserock compiler bootstrap and used to cross build sysroots for armv8l64 and ppc64l from an x86_64 host. For example, to build a sysroot for ARM v8 64-bit you can do this: bst build --target-arch=armv8b64 gnu-toolchain/stage2.bst This would cause the adapted Baserock definitions to produce a stage1 simple cross compiler that runs on the native architecture and produces armv8b64 binaries, and then cross build a stage2 sysroot that executes on armv8b64. Currently the --host-arch option does nothing of use. It will one day enable host-incompatible builds using a QEMU-powered cross sandbox. The `--arch=` option is now shorthand for `--host-arch= --target-arch=`. Elements have 2 new variables available, %{bst-host-arch} and %{bst-target-arch}. The 'arches' conditional now follows %{bst-target-arch}, while the new 'host-arches' conditional follows %{bst-host-arch}. All of --arch, --host-arch and --target-arch default to the output of `uname -a`. There's no magic here that would make all BuildStream elements suddenly able to cross compile. It is up to an individual element to support this by honouring %{bst-target-arch} in whatever way makes sense.
* Refactor: Untangling element/source namesTristan Van Berkom2017-03-181-11/+11
| | | | | | | | | | | | | | | | | | | | | | | o The metaelements and metasources now carry the name, the loader resolves source names now. o Element/Source factories dont require a name anymore as they are already in the meta objects o Pipeline no longer composes names o Element.name is now the original project relative filename, this allows plugins to identify that name in their dependencies, allowing one to express configuration which identifies elements by the same name that the user used in the dependencies. o Removed plugin._get_display_name() in favor of the plugin.name o Added Element.normal_name, for the cases where we need to have a normalized name for creating directories and log files o Updated frontend and test cases and all callers to use the new naming
* variants test case: Fixed for changed element name policyTristan Van Berkom2017-02-221-11/+11
| | | | | Now element names contain the full element path and unique element basenames are no longer a requirement.
* Removed code and tests related to stacks and includes.Tristan Van Berkom2016-12-1921-650/+0
| | | | | Stacks should still exist but they are purely an element implementation detail.
* Add loader tests for dependency typesJürg Billeter2016-12-124-0/+75
|
* Add variants test for illegal compositionTristan Van Berkom2016-12-102-0/+24
| | | | | Expect LoadError with ILLEGAL_COMPOSITE when trying to override a value in a variant with an incorrect type.
* pep8 fixes in loader variants test caseTristan Van Berkom2016-12-101-13/+37
|
* pep8 fixes in loader stacks test caseTristan Van Berkom2016-12-101-1/+3
|
* pep8 fixes in loader dependencies test caseTristan Van Berkom2016-12-101-0/+4
|
* pep8 fixes in loader includes test caseTristan Van Berkom2016-12-101-0/+4
|
* pep8 fixes in loader basics test caseTristan Van Berkom2016-12-101-0/+5
|
* pep8 fixes in loader arches test caseTristan Van Berkom2016-12-101-13/+35
|
* Add loader test for dependency dict without variantJürg Billeter2016-12-052-0/+19
|
* Added a ton of tests to test the LoaderTristan Van Berkom2016-11-2854-0/+1431
o Tests for basic file loading o Tests for include directive functionality o Tests for resolution of arch conditionals o Tests for dependency resolution and detecting circular dependencies o Tests for variants, ensures that we have the correct variant conflict errors and that the correct variants are chosen in the correct cases o Tests for stacks, test that stacks with embedded elements unwrap properly into the concrete dependency tree, test for internal stack circular dependencies, test that arch conditionals and variant conditionals work inside stacks including with embedded elements Lots of tests