summaryrefslogtreecommitdiff
path: root/tests/frontend
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add tests for configurable warningsJosh Smith2018-08-158-0/+155
| | | | | | | | This adds multiple tests for custom plugin warnings and core warnings, providing checks for both cases which should cause warnings and errors when configured as fatal. Also adds tests for cache key calculations.
* _project.py: Add fatal-warnings configuration itemJosh Smith2018-08-151-10/+17
| | | | | | | | | | | | | | | | | | | | This allows for users to configure fatal-warnings to be either a list of warnings. This commit deprecates the use of fail-on-overlap within project.conf, this will now use the fatal-warnings configuration item. element.py: Cache key calculation now takes into account all of the fatal-warnings tests: This modifys the tests/frontend/overlaps.py tests to support the new fatal-warnings configuration. Backwards compatibility is also tested for `fail-on-overlap` _versions.py: BST_FORMAT_VERSION bumped to 15 for fatal-warnings BST_CORE_ARTIFACT_VERSION bumpted to 5 for fatal-warnings Fixes: #526
* Test we can discovered submodules on fallback mirrored git repositoriesValentin David2018-08-141-0/+96
|
* Test git mirroring fallback on submodules when main repo is not mirrored.Valentin David2018-08-141-0/+97
|
* tests: Add a test of the git source with submodulesJonathan Maw2018-08-143-0/+80
|
* tests: Test that fetching passes when upstream is absentJonathan Maw2018-08-141-0/+61
|
* tests/frontend/mirror.py: Re-enable a test for gitValentin David2018-08-141-4/+0
|
* Fix tracking of junctions used in project.conf.Valentin David2018-08-131-0/+22
| | | | | | | | | | | | | | Stream._load() now returns early without resolving build pipeline when only tracking. Resolving track pipelines does not require to fully load project configurations when when elements to track are only junctions. However build pipelines require to fully load project configurations. This might not be possible in the case a project configuration includes a file from a junction that yet needs to be tracked. Fixes #565.
* Implementing relative workspacesrelative_workspacesPhillip Smyth2018-08-101-11/+52
| | | | | | | This fixes #191 A note has been added to NEWS explaining backwards compatibility issues
* Add support for include '(@)' in project.conf and .bst filesValentin David2018-08-022-2/+293
| | | | Fixes #331.
* Move tests.frontend.generate_junction to test.testutilsValentin David2018-08-028-48/+12
|
* local plugin: validate project pathsTiago Gomes2018-08-021-11/+11
| | | | | | The autotools example had to be copied over inside of the junction example, as referring to a path outside of the project directory is now disallowed.
* element.py: Raise an exception on unbuilt element checkoutMartin Blanchard2018-08-011-0/+10
| | | | | Trying to checkout an element that has no cached artifacts should be and handled failure. See BuildStream/buildstream#447.
* tests: Add mirrored fetching and tracking testsJonathan Maw2018-07-272-0/+487
|
* _stream.py: Added functionality for workspace open -fPhillip Smyth2018-07-251-0/+52
| | | | tests/frontend/workspace.py: Added tests
* tests/frontend/show.py: Add test case for maximum recursion depth being exceededPhil Dawson2018-07-251-2/+58
| | | | | | | Add test to ensure gracefull handling of exception thrown while loading a pipeline due the python's max recursion depth being exceeded. This is part of the work for issue #203
* Add support for creating a tarball on bst checkouttiagogomes/tarball_checkoutTiago Gomes2018-07-201-1/+108
| | | | | | | | One of the tests added is configured to be skipped for now, as dumping binary data is causing a bad descriptor exception when using the pytest capture module. Closes #263.
* tests/frontend/buildcheckout.py: Added tests for "Add a `--deps` flag to ↵add_flag_to_checkoutPhillip Smyth2018-07-171-0/+36
| | | | `bst checkout`"
* tests/frontend/pull.py: Add pull test for missing blobs on the serverJürg Billeter2018-07-171-0/+42
|
* tests/frontend/push.py: Remove xfail mark from LRU cache testJürg Billeter2018-07-171-4/+0
| | | | The CAS server now supports LRU.
* tests: Test push/pull on all platformsJürg Billeter2018-07-172-11/+0
|
* 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: Use context manager for ArtifactShareJürg Billeter2018-07-172-422/+426
|
* 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-092-24/+0
| | | | The OSTree summary file is no longer used.
* 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-085-4/+159
| | | | | | '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.py: Fix consistency of workspaced elements when ref is missingChandan Singh2018-05-171-0/+32
| | | | Fixes #393.
* 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-112-16/+22
| | | | This is in preparation for moving away from summary files.
* _stream.py, _pipeline.py: Refactoring of the pipeline itselfTristan Van Berkom2018-05-081-59/+27
| | | | | | | | | | | | | | | | | | | 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.
* _stream.py: Add StreamError exceptionTristan Van Berkom2018-05-085-9/+9
| | | | Use Stream error for Stream errors.
* 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/frontend/track.py: Added test for `bst track --deps none`Tristan Van Berkom2018-04-191-0/+40
| | | | This guards against regressions of issue #367
* _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
* _frontend/app.py: Adhere to policy on private symbolsTristan Van Berkom2018-04-151-5/+5
| | | | This is a part of issue #285
* 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
|
* 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-121-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | 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
* 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.