summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: Adding __init__.py to some test modulesTristan Van Berkom2017-09-012-0/+0
| | | | | Seems all the test modules have one and as I recall it can cause problems when they are missing in the test dirs.
* tests/cachekey: Adding Cache Key testsTristan Van Berkom2017-09-0141-0/+340
| | | | | | | | | This test should contain an entry for every element and source plugin in buildstream. Further, an entry should exist for every feature of every plugin which may effect cache key calculation. MANIFEST.in: Adding .expected files used in this test to the generated dist tarballs.
* tests/frontend/version.py: Added first frontend testTristan Van Berkom2017-09-011-0/+29
|
* local source tests: Removed test case for get_unique_key()Tristan Van Berkom2017-09-011-18/+0
| | | | | | | | This somewhat arbitrarily tests what the local source generates as a unique key but is not really the requirements of a unique key. This is also subject to change and is a pain to update. Instead this is pretty much handled by the cache key test anyway.
* plugin tests: Adding new tests with plugins loaded in a pipelineTristan Van Berkom2017-08-3117-0/+178
| | | | | | | | o Testing that we can load a custom element or source o Testing that we assert and trigger an error when the requested format version of a plugin by the project is greater than the reported version of the plugin
* project tests: Added test ensuring that we assert project versions.Tristan Van Berkom2017-08-312-0/+15
|
* plugin tests: Added tests for new version assertionsTristan Van Berkom2017-08-305-0/+44
|
* plugins tests: Fixed to expect errors at plugin load timeTristan Van Berkom2017-08-291-24/+32
| | | | | Errors which were previously detected when loading the plugin context are now only detected when loading the plugin.
* tests/loader: Test dependency type 'all'Jürg Billeter2017-08-102-0/+22
|
* tests/artifactcache: Generate and fetch summary fileJürg Billeter2017-07-201-2/+13
|
* tests/artifactcache: Do not configure pull/push for all testsJürg Billeter2017-07-201-3/+4
|
* Fix testsTristan Maat2017-07-171-1/+1
|
* Test Cases: Updated for new Project / Loader API changesTristan Van Berkom2017-07-176-55/+62
|
* 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
* tests/artifactcache: Store cache keys as artifact metadataJürg Billeter2017-07-141-3/+18
|
* tests/artifactcache: Recalculate _cached after commitJürg Billeter2017-07-141-0/+1
|
* Move ArtifactError to exceptions.pyJürg Billeter2017-07-141-2/+3
| | | | This avoids cyclic imports between element.py and artifactcache.py.
* artifact tests: Adjust to work with new configuration and APIsTristan Van Berkom2017-07-101-3/+5
|
* Add --host-arch and --target-arch, and 'host-arches' conditionalSam Thursfield2017-07-067-44/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* tests/artifactcache: Add local push and fetch testJürg Billeter2017-06-271-1/+18
|
* tests/context/context.py: Ignore real config filesSam Thursfield2017-06-221-1/+1
| | | | | | | | For the test to work on all systems, we need to make sure that the user's real config file in ~/.cache/buildstream.conf is ignored. I was seeing test failures here because I have overridden the default cache locations in my buildstream.conf file.
* test/sources/ostree.py: Fix ResourceWarning when calling subprocessSam Thursfield2017-06-221-6/+1
| | | | | | | | | | | | This switches the code from using subprocess.Popen() manually to using subprocess.call(), which achieves the same thing and also handles resource cleanup for us. I also removed an unused variable. Fixes warnings like these that the test suite was producing: tests/sources/ostree.py::test_ostree_shell_exe /home/shared/src/buildstream/tests/sources/ostree.py:79: ResourceWarning: unclosed file <_io.BufferedReader name=13> ret = run_ostree_bash_script()
* tests/sources/bzr.py: Skip bzr source tests if `bzr` program isn't foundSam Thursfield2017-06-221-0/+18
|
* Add --except testsTristan Maat2017-06-2010-0/+52
|
* Add some basic bzr testsJonathan Maw2017-05-2513-0/+227
| | | | Coverage isn't perfect, but it seems to cover most use-cases.
* variables test: Updated for changes in build element pluginsTristan Van Berkom2017-05-201-8/+6
|
* Added/fixed tar source tests.Tristan Van Berkom2017-05-145-2/+35
| | | | | | | | | Fixed original staging test to expect the content of the first encountered subdirectory to be extracted/staged. Added additional test to override the base-dir configuration with an empty string and instead extract the root of the tarball directly.
* variables.py test case: Fixed to pass tests after cmake defaults changeTristan Van Berkom2017-05-141-2/+6
|
* Add tests for the tar sourceJonathan Maw2017-04-1311-0/+167
|
* Add some default repo aliases to the test fixtureJonathan Maw2017-04-131-0/+4
| | | | | These repo aliases should make it possible for sources to fetch from local files (assuming they use a file:/// URL)
* Untangling _yaml and utils modules.Tristan Van Berkom2017-04-071-3/+3
| | | | | These had a circular import, which is only supported > python 3.5 but undesirable anyway.
* Fixed test cases for xdg dependency removalTristan Van Berkom2017-03-211-8/+15
|
* Adapted test cases to new Context changesTristan Van Berkom2017-03-204-19/+13
|
* Refactor: Untangling element/source namesTristan Van Berkom2017-03-183-28/+27
| | | | | | | | | | | | | | | | | | | | | | | 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
* Updated artifact cache test cases.Tristan Van Berkom2017-03-103-21/+31
| | | | | | | | | Now these load an actual (simple) pipeline, so there is a fully qualified Element to use for testing the API. Also we now expect a specific ArtifactError for failures instead of using the xfail pytest decorator, which is a bit nicer.
* Removing sandbox tests.Tristan Van Berkom2017-03-082-364/+0
| | | | | | They mostly test functionality that is not exposed in API, we should find a better way of testing this, like running actual build pipelines.
* yaml test case: Added test ensuring compositing does not effect underlying ↵Tristan Van Berkom2017-02-262-7/+39
| | | | | | | | copies Since we changed to use ChainMaps instead of deep copies (a much needed optimization), we must ensure that composition of mappings never result in a mutation of dictionaries copied with utils._node_chain_copy()
* source test fixture: Create a context with a log handler.Tristan Van Berkom2017-02-251-0/+7
| | | | Log handlers are now a hard requirement for a context object.
* variables.py test case: Adapt to changes in element plugin defaults.Tristan Van Berkom2017-02-241-4/+4
|
* 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.
* Remove apostrophes from grammatically incorrect instances of "it's"Paul Sherwood2017-02-111-1/+1
|
* Fixed tests for new Project() constructor argument.Tristan Van Berkom2017-02-025-9/+9
|
* ostree.py test case: Commented out another testTristan Van Berkom2017-01-191-17/+18
| | | | | Sadly the tests arent working but the plugin is, need to take time to revisit these tests.
* Adapted project test which loads a custom source to implement get_consistency()Tristan Van Berkom2017-01-191-3/+3
|
* Fixed test cases for Source refresh() -> track() API changeTristan Van Berkom2017-01-182-14/+17
|
* cmake.yaml: Use 'PATH' in -DCMAKE_INSTALL_PREFIX:PATH="%{prefix}"Tristan Van Berkom2017-01-181-2/+2
| | | | This is a bit more explicit, tells cmake the variable is a path string.
* ostree source test case: Few changesTristan Van Berkom2017-01-164-53/+44
| | | | | | | | | | | | | | | | o The test which runs an http server failed for me at least once, I think this test was dependent on the python garbage collector; using a context manager to hold things in scope seems to fix this, I hope. o generate-ostree.sh test script: Added --owner-uid --owner-gid o ostree tests: Branches should have /, not - Also disabled staged test for now it doesnt work, staging from the artifact cache works, and the same code works to stage refs from sdk.gnome.org, but this test case fails claiming that the commit object is not valid.
* Changing the pull command from pull_with_options to just the basic pull. GPG ↵Andrew Leeming2017-01-163-3/+5
| | | | key checking is done when adding remote
* Adding some return code/conditions when adding remotes to catch if a remote ↵Andrew Leeming2017-01-163-3/+5
| | | | is added multiple times or if a key fails to add