summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests/testutils/artifactshare.py: Use CAS artifact serverJürg Billeter2018-07-171-28/+48
|
* _platform: Use CAS artifact cacheJürg Billeter2018-07-171-6/+1
|
* tests/frontend/push.py: Use ArtifactShare statvfs mockingJürg Billeter2018-07-171-29/+9
| | | | | This makes it unnecessary to update the free space in the mock object in the middle of tests.
* tests/testutils/artifactshare.py: Add support for statvfs mockingJürg Billeter2018-07-171-3/+28
|
* tests: Use context manager for ArtifactShareJürg Billeter2018-07-174-469/+487
|
* tests: Fix filter tests not checking whether files should be missing.Jonathan Maw2018-07-165-0/+72
| | | | | They weren't actually catching it if you checked-out the entire depended element, instead of just the specified split domains
* Move _list_dir_contents to __init__.pyMove-_list_dir_contents-to-__init__425-add-a-deps-flag-to-bst-checkoutPhillip Smyth2018-07-114-52/+36
|
* tests/frontend/push.py: Add missing skip annotation for non-Linux468-source-bundle-except-argument-is-ignoredJürg Billeter2018-07-091-0/+1
|
* tests: Remove unneeded ArtifactShare.update_summary() methodJürg Billeter2018-07-094-40/+0
| | | | The OSTree summary file is no longer used.
* Provide better error message on missing commandsTiago Gomes2018-07-023-0/+21
| | | | | | | Before running a command in the sandbox, check its existence and fail early if it does not. This fixes issue #289.
* Add error message when running commands on directoriesFrancisco Redondo Marchena2018-06-281-0/+12
| | | | Issue #446
* doc: Adding part 4 of the getting started tutorial: integration commandsTristan Van Berkom2018-06-251-0/+36
| | | | | This new section talks about how integration commands work and shows them at work.
* doc: Adding part 3 of the getting started tutorial: autotools elementTristan Van Berkom2018-06-182-0/+47
| | | | | | | | | This part of the tutorial uses a lot of the work from Phil Dawson and James Ennis, and uses their example submitted on merge request 499 as a basis to introduce the user to yaml composition and variable resolution. This is a part of issue #103
* doc: Adding part 2 of the getting started tutorialTristan Van Berkom2018-06-171-0/+36
| | | | | | | | | | | | | o doc/examples/running-commands: New example project of a `manual` build element o doc/sessions/running-commands.run: New session file to capture bst output o doc/source/sessions-stored: Added new generated sessions o doc/source/tutorial/running-commands.rst: New tutorial entry describing how commands are run in the sandbox o tests/examples/running-commands.py: Test case validating the tutorial's assertions
* doc: Adding part 1 of the getting started tutorialTristan Van Berkom2018-06-161-0/+29
| | | | | | | | | | | | | | | | | | | | | o doc/Makefile: Added new directory to collect rst files from o doc/examples/first-project: Added the "first-project" example project. o doc/source/sessions/first-project-*.html: Added the generated snippets o doc/source/using_tutorial.rst: Added the new main tutorial page o doc/source/tutorial/first-project.rst: Added part 1 of the tutorial here o tests/examples/first-project.py: Added test for the example project This is largely based on an example by Javier Jardón, which was submitted at https://gitlab.com/BuildStream/buildstream/merge_requests/323 Fixes #103
* Allow tracking dependencies within sub-projects.Valentin David2018-06-082-0/+199
| | | | | | | --track-cross-junctions now concerns crossing junctions rather than forbidding elements in sub-project to be tracked. Part of #359.
* Handle cross junction elements in workspaces.Valentin David2018-06-081-0/+117
| | | | | | | | | | | Workspaces are now index by colon separated junction path. This now allows to create workspaces for elements in external projects. Workspaces are owned by context instead of root project. However it is initialized once top-level project is registered as we need to resolve paths relatively to this top-level project. Part of #359.
* Interpret names as colon separated junction path in loader.Valentin David2018-06-086-4/+199
| | | | | | 'a.bst:b.bst' gets interpreted as 'b.bst' from junction 'a.bst'. Part of #359.
* pushreceive.py: Ensure huge artifacts are not pushedJames Ennis2018-06-071-1/+0
|
* 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