summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* push.py: Add tests to test remote cache expiryJames Ennis2018-06-071-1/+184
| | | | | | | | The tests include a new environment variable: BST_CACHE_QUOTA. This variable is used in receive_main() in pushreceive.py. Test names: test_artifact_expires, test_large_artifact_is_not_cached_remotely test_recently_pulled_artifact_does_not_expire: marked as xfail until we implement LRU expiry in remote share
* element_generators.py: Add a utility function to create arbitrary size elementsJames Ennis2018-06-072-0/+41
| | | | | | New file consisting of functions that allow us to generate elements on the fly __init__.py now includes create_element_size()
* tests/completions: Added test case for custom `bst help` completionsTristan Van Berkom2018-06-071-0/+13
|
* Implement bst helpEd Baunton2018-06-071-0/+1
|
* _frontend/cli.py: Try to autocomplete element paths when running from a ↵Chandan Singh2018-06-061-4/+7
| | | | | | | | subdirectory The previous commit added support for running bst commands form subdirectories of the project root. Make autocomplete also work in a similar way.
* _project.py: Allow running bst commands from subdirectories of project rootChandan Singh2018-06-064-0/+21
| | | | | | | | 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.
* Add a kind for MakeEd Baunton2018-06-063-0/+57
|
* Add test to verify cleanup behaviour after bwrapGökçen Nurlu2018-06-054-0/+51
| | | | | | This adds `sandbox-bwrap/test-cleanup.bst` to test the cleanup behaviour in `sandbox/_sandboxbwrap.py`: There already exists a non-empty `/tmp` folder and BuildStream should not try to remove it after a command is executed with bwrap.
* tests/context/context.py: Test setting XDG_CACHE_HOMETristan Maat2018-06-051-0/+17
|
* tests: Add track tests for the filter elementJonathan Maw2018-05-171-1/+288
|
* tests: Add workspace tests for filtersJonathan Maw2018-05-171-0/+70
|
* element.py: Fix consistency of workspaced elements when ref is missingChandan Singh2018-05-171-0/+32
| | | | Fixes #393.
* tests/examples/flatpak-autotools.py: Workaround setuptools bugTristan Van Berkom2018-05-161-0/+18
| | | | | | Until the setuptools bug is fixed, symlinks are not included in source distributions - this works around the problem until which point we can use a setuptools version without the bug.
* doc: Add first example, building on a flatpak SDKalbfan2018-05-161-0/+49
| | | | | | | | This adds: o A ToC area for adding examples o The instructive example page for the first example o The example project under doc/examples o The corresponding integration test in tests/examples
* bst-init: Ensure --element-path is respected by the commandchandan/fix-bst-init-element-path288-kill-element-normal_name-variableChandan Singh2018-05-111-0/+3
| | | | | | | | | | | Previously "elements" was hard-coded as the path for the elements directory whereas it was supposed to be configurable via the `element_path` option to `init_project()`. This led to incorrect behavior when `bst init` was run `--element-path` option. Also, extend tests to test the creation of elements directory. Fixes #398.
* _stream.py: Do not force `PipelineSelection.ALL` for build with trackingJürg Billeter2018-05-111-1/+1
| | | | | | With the dynamic plan using `_set_required()` we can avoid pulling/fetching/building unneeded elements even if elements are being tracked.
* tests: Do not rely on 'downloadable' statusJürg Billeter2018-05-114-21/+25
| | | | This is in preparation for moving away from summary files.
* _stream.py, _pipeline.py: Refactoring of the pipeline itselfTristan Van Berkom2018-05-082-66/+36
| | | | | | | | | | | | | | | | | | | Here the pipeline becomes essentially stateless, some dangling state remains to be factored out because of frontend accesses which will be changed in a later commit. Essentially, the Pipeline.load() method no longer has any knowledge of the specific purposes of the loaded targets, and now takes a list of target groups and returns a corresponding list of element groups. The Stream() business logic methods now use other pipeline helper methods to create and filter lists from the loaded target elements. The Stream() also finally absorbs the Scheduler frontend facing APIs. However Queues are still exposed on the Stream object for logging purposes and through callbacks such that the frontend can retry elements.
* _artifactcache: Added ArtifactCache.setup_remotes()Tristan Van Berkom2018-05-081-2/+3
| | | | | | | This removes some additional initialization code from Pipeline(). Some symbols have changed here, the initialization is now called from Stream(), and a test case was also adjusted for this.
* _stream.py, _frontend: Call Stream() APIs with CLI arguments directly.Tristan Van Berkom2018-05-081-1/+1
| | | | | | This shifts the whole responsibility of interpreting command line targets etc to the Stream() object itself. With this commit, the Pipeline() truly becomes slaved to the Stream().
* _stream.py: Add StreamError exceptionTristan Van Berkom2018-05-0812-20/+20
| | | | Use Stream error for Stream errors.
* tests/format/variables.py: Removed testing of stderrTristan Van Berkom2018-05-081-4/+0
| | | | | | We have machine readable errors for this purpose, and the strings happen to change causing tests to break if we test the specific UI (reported error strings are UI).
* tests/format/variables.py: Add a test for undefined variable error messageValentin David2018-05-063-0/+24
|
* tests/testutils/runcli.py: Improve detection of pulled/pushed elementsJürg Billeter2018-04-301-2/+2
|
* _loader.py: Removing special case error for junctions depending on elementsTristan Van Berkom2018-04-261-3/+3
| | | | | | Leave this error to be handled by preflight. Updated test case to expect the new ElementError instead of a LoadError
* Use versioneer instead of setuptools_scmTristan Van Berkom2018-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using setuptools_scm had a couple of bad problems: o Unexpected versioning semantics, setuptools_scm would increment the micro version by itself in the case that we derive a version number from something that is not a tag, making the assumption that we are "leading up to" the next micro version. People mostly dont expect this. o When installing in developer mode, i.e. with `pip3 install --user -e .`, then we were always picking the generated version at install time and never again dynamically resolving it. Many of our users install this way and update through git, so it's important that we report more precise versions all the time. This commit needs to make a series of changes at the same time: o Adds versioneer.py to the toplevel, this is used by setup.py for various activities. This is modified only to inform the linter to skip o Adds buildstream/_version.py, which is generated by versioneer and gives us the machinery to automatically derive the correct version This is modified only to inform the linter to skip o Adds a .gitattributes file which informs git to substitute the buildstream/_version.py file, this is just to ensure that the versioning output would work if ever we used `git archive` to release a tarball. o Modifies setup.py and setup.cfg for versioneer o Modifies utils.py and _frontend/cli.py such as to avoid importing the derived version when running bash completion mode, we dont derive the version at completion time because this can result in running a subprocess (when running in developer install mode) and is an undesirable overhead. o Updates tests/frontend/version.py to expect changed version output
* Load and save junctioned source refs from/to junction.refsTristan Van Berkom2018-04-253-3/+3
| | | | | | | | | | | | o _projectrefs.py: Additional constructor option to choose the base name o _project.py: Load two ProjectRefs objects, one for the junctions o source.py: Load and save junctioned source refs with the appropriate ProjectRefs object o tests: Updated some tests to expect junctions to be stored in junction.refs This fixes issue #361
* tests/testutils/integration.py: Avoid inconsistent symlink handlingSam Thursfield2018-04-231-0/+5
| | | | | | | | The output of walk_dir() seemed to be inconsistent in how it traversed symlinks. Presumably this is to do with differences in how the filesystem return files. If we do an in-place sort of the list of files and directories that we get, os.walk() will honour that order which should make the output stable.
* Add compose-symlinks testcaseSam Thursfield2018-04-236-0/+66
| | | | | This is a regression test for the issue raised here: https://gitlab.com/BuildStream/buildstream/issues/270
* tests/pipeline/preflight-error: Fixing typo in error string formattingTristan Van Berkom2018-04-231-1/+1
|
* tests/frontend/track.py: Added test for `bst track --deps none`Tristan Van Berkom2018-04-191-0/+40
| | | | This guards against regressions of issue #367
* _loader package: Creating a new sub package to hold the loader related things.Tristan Van Berkom2018-04-172-4/+2
|
* _frontend/cli.py: Add option to reset multiple workspacesChandan Singh2018-04-171-0/+52
| | | | | | !357 added support for closing multiple workspaces. Similarly, also allow `bst workspace reset` to work on multiple workspaces, with `--all` as a helper to reset all open workspaces.
* tests/frontend/workspace.py: Added tests for force opening workspacestristan/fix-workspace-force-openTristan Van Berkom2018-04-171-0/+21
| | | | Guard against regressions of issue #364
* tests/frontend/buildcheckout.py: Added regression tests for workspaced junctionsTristan Van Berkom2018-04-161-0/+109
| | | | This guards against regressions of issue #292
* source.py, element.py, _pipeline.py: Streamling preflighting.Tristan Van Berkom2018-04-164-8/+8
| | | | | | | | | | | Instead of having the pipeline preflight all sources separately from elements, have the element preflight it's sources. This is in order to simplify the shared code path for the pipeline and the loader to use for instantiating elements. Also updated tests to expect the new ElementError and SourceError instead of the PipelineError which was raised for preflighting before.
* _frontend/app.py: Adhere to policy on private symbolsTristan Van Berkom2018-04-151-5/+5
| | | | This is a part of issue #285
* plugins/elements/cmake.yaml: allow using ninja instead of make (#279)abderrahim/cmake-ninjaAbderrahim Kitouni2018-04-142-2/+3
| | | | | | | This uses the build tool mode of cmake to have a single command that can call either make or ninja. I've also modified the tests to take the new commands into account
* tests/format/variables.py: Ported from old style testsTristan Van Berkom2018-04-1416-79/+64
|
* tests/frontend/show.py: Removing some unused variablesTristan Van Berkom2018-04-141-2/+0
|
* tests/frontend/workspace.py: Test new workspace format versionTristan Maat2018-04-131-0/+24
|
* tests/frontend/workspace.py: Automatically update versionTristan Maat2018-04-131-5/+6
|
* integration/workspace.py: Test that configure commands run only onceTristan Maat2018-04-132-0/+55
|
* tests: Check that output includes log files of failed buildsRichard Maw2018-04-121-0/+28
|
* _frontend/cli.py, _pipeline.py: Add options for cross junction tracking.Tristan Van Berkom2018-04-122-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | This patch makes cross junction tracking disabled by default, which was the initial intention when landing project.refs but never got around to doing this (intended to get addressing of junctioned elements via command line sorted first, but didnt happen). This adds the following options to enable cross-junction tracking: o bst build -J / --track-cross-junctions o bst fetch -J / --track-cross-junctions o bst track -J / --cross-junctions This also fixes `bst fetch --track` which had a bug, it was avoiding to track and fetch elements which are in a `cached` consistency state, which is wrong when `--track` is specified. This also updates some test cases which were broken by this change. This fixes issue #354
* buildstream/_versions.py: Increment BST_CORE_ARTIFACT_VERSIONTristan Van Berkom2018-04-1125-25/+25
| | | | | Now that we've restructured the artifact metadata into separate files, we need to rev the artifact version.
* element.py, source.py: Cleanup how Source cache keys are calculated.Tristan Van Berkom2018-04-1125-25/+25
| | | | | | | | Recently after a refactor we kept the Source adding workspace keys to the source keys because, now clean this up to have the workspace key added directly in the Element cache key calculation. This breaks cache keys.
* tests/integration/shell.py: Test that workspaced files are visible in a bst ↵Tristan Van Berkom2018-04-112-0/+91
| | | | | | | | | | shell Test both in regular `bst shell --build`, and on a failed build sysroot with `bst shell --sysroot`, the latter being the semantic used when debugging a failed build. This guards against regressions of issue #346
* tests/frontend/workspace.py: Test that we detect modifications made to a ↵352-race-condition-incorrect-saving-of-running-files-in-workspaces-yml-local-state-file311-opening-a-workspace-with-a-cached-buildTristan Van Berkom2018-04-091-0/+77
| | | | | | | workspace This was previously only working for added or removed files and broken for modified files.
* tests/frontend/workspace.py: Fixed test_build to make the right assertionTristan Van Berkom2018-04-091-1/+1
| | | | | | This was removing a file from the workspace, building, checking out, and then asserting that the file is *still gone* in the workspace, ignoring the same file in the checkout.