summaryrefslogtreecommitdiff
path: root/tests/frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* _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.
* tests/frontend/init.py: New test to test edge cases for new `bst init` command.Tristan Van Berkom2018-04-081-0/+97
|
* _frontend/cli.py: Add option to close multiple workspacesChandan Singh2018-04-071-3/+43
| | | | | | | | | | | | | At present, it is only possible to close workspaces for elements one at a time. This can become slightly tedious process when you have multiple workspaces open and you want to close all of them, maybe because you just finished working on a set of related elements. Instead of accepting a single element, accept a list of elements as argument for `bst workspace close`. Additionally, add `-a`/`--all` option to close all workspaces. Fixes #337 - Add option to close all workspaces.
* tests/frontend/buildcheckout.py: Added junction related testsTristan Van Berkom2018-04-051-1/+90
| | | | | | | | | | o Test that we get the expected error if the junction element the pipeline refers to is inconsistent o Test that the junction element is automatically fetched as a part of the build phase Both tests using both ref-storage modes
* tests/frontend/track.py: Added junction related testsTristan Van Berkom2018-04-051-2/+76
| | | | | | | | | | | o Test that we bail out with the expected errors when the junction element in question is Consistency.INCONSISTENT o Test that tracking the junction itself, causes a subsequent show of the pipeline to not bail out anymore (tests that tracking works and persists for a junction element). Again these use both ref-storage modes.
* tests/frontend/fetch.py: Added tests for automatically fetching the junctionsTristan Van Berkom2018-04-051-1/+87
| | | | | | | | | | o This tests that a Consistency.RESOLVED junction will automatically be fetched when `bst fetch` is run on a pipeline which refers to a junction. o Further, it tests that a Consistency.INCONSISTENT junction will bail out with the expected error message Again testing with both ref-storage modes
* tests/frontend/show.py: Test behaviors of showing junctioned elementsTristan Van Berkom2018-04-055-1/+135
| | | | | | | | | | o Test error conditions for showing an unfetched junctioned project o Test error conditions for showing an untracked junctioned project Both tests check both modes of ref-storage. This adds a new shared helper function `generate_junction`
* tests/frontend: Share the configure_project() functionTristan Van Berkom2018-04-053-12/+13
| | | | Make buildtrack.py and track.py share the same configure_project() helper.
* tests/frontend/workspace.py: Exercise the build test in strict and ↵Tristan Van Berkom2018-04-051-1/+14
| | | | | | | | non-strict mode This test fails without the previous patch fixing issue #316, so this should guard against regressions of building and caching workspace builds in non-strict mode.
* tests/frontend/workspace.py: Reduce unneeded coverage here.Tristan Van Berkom2018-04-021-10/+7
| | | | | | | | Here we are overly testing the same functionality which does not require source specific support, e.g. lets not test resetting of workspaces for every kind of repo, since we already test opening and closing of workspaces for every repo kind, this is redundant and slowing down tests.
* tests/frontend/workspace.py: Test that we can remove a workspace for a ↵Tristan Van Berkom2018-04-021-0/+20
| | | | | | nonexisting element Guard against regressions of issue #249
* tests/frontend/workspace.py: Fix inaccurate commentsTristan Van Berkom2018-04-021-6/+3
|
* _frontend/app.py: Renamed from main.pyTristan Van Berkom2018-04-021-1/+1
| | | | | Since the CLI and the App object was split up, we should name the file after the object which it implements.
* _workspaces.py: Fix fallout from using python3.4Tristan Maat2018-03-281-2/+2
|
* frontend/workspace.py: Adjust tests to new workspace formatTristan Maat2018-03-271-7/+35
|
* frontend/workspace.py: Add tests for loading different versionsjjardon/versioned_docsRichard Maw2018-03-221-31/+112
|
* tests/frontend/fetch.py: Test failure modes of Source.get_consistency()Tristan Van Berkom2018-03-211-4/+29
| | | | | | | | | | Added a test that handled errors are reported at load time as expected. Added another test that we get the expected exception. This needs to be fixed, test contains FIXME: comment explaining that we could be doing much better here. This should be fixed in the context of issue #197
* tests/frontend/track.py: Test that we fail gracefully for post tracking errorsTristan Van Berkom2018-03-218-0/+110
| | | | | | This tests that we handle errors from Source.get_consistency() in the post tracking state updates gracefully, one test added for a handled failure, and another test added for an unhandled/unexpected exception.
* tests/frontend/track.py: Testing behavior of cross junction trackingTristan Van Berkom2018-03-205-0/+96
| | | | | | | | o Test that this fails gracefully when the toplevel project uses inline ref-storage o Test that we successfully track cross junctioned elements when the project uses project.refs
* tests/frontend/track.py: Test tracking with optionalityTristan Van Berkom2018-03-208-4/+132
| | | | | | | Tests that `bst track` sets the ref in the expected node if the node containing the ref is conditionalized with a project option. This tests both the regular inline behavior, and also the project.refs behavior.
* tests/frontend/track.py: Testing that this works with project.refsTristan Van Berkom2018-03-201-1/+18
| | | | | | Only added condition to the simplest case here, the other cases are mostly testing that track commands get the correct selection of elements when using `--deps all` and `--except` arguments.
* tests/frontend/buildtrack.py: Modified to test saving with project.refsTristan Van Berkom2018-03-201-5/+44
| | | | | Test that we get the same functionality from the complex build + track test regardless of whether we are saving refs inline or to a project.refs file.
* Deprecate `--track-save` option from `bst build`Tristan Van Berkom2018-03-201-8/+2
| | | | | | | | | | | | | | | | | | It makes no sense to support this now that we are adding project.refs, instead of removing the option completely, we document it as deprecated and print a warning. o _frontend/cli.py: Mark the option as deprecated, warn if it's used o _scheduler/trackqueue.py: Remove save optionality o _pipeline.py: Remove save optionality o tests/frontend/buildtrack.py: Stop testing for no-save functionality, This test was actually broken, and only save functionality was being tested. This was due to using a list [True] or [False] in the @pytest.mark.parameterize() statement, both of which are truthy values.
* Remove other references to SequenceID from the code and testsJim MacArthur2018-03-131-2/+2
| | | | | widget.py: Remove SequenceID from the list of widgets. tests/frontend/logging.py: Remove %{sequence} check.
* Add a test for default and custom loggingJim MacArthur2018-03-011-0/+81
|
* tests/frontend/workspace.py: Add cache key checks to test_buildJürg Billeter2018-02-271-0/+2
| | | | Regression test for #273
* tests/frontend/pull.py: Do not use a workspace for the non-strict testJürg Billeter2018-02-271-2/+3
| | | | | The cache status of reverse dependencies of workspaced elements cannot always be determined upfront.
* tests/frontend/push.py: Test that we don't push stuff that we just pulledSam Thursfield2018-02-261-0/+53
|
* tests/frontend: Summarize the existing push and pull testsSam Thursfield2018-02-262-0/+27
| | | | | These tests are too long to understand at a glance so a summary is needed of each.
* test: Add tests that bzr workspace initialization acts as expectedJonathan Maw2018-02-121-0/+19
|
* tests/frontend/overlaps.py: Add test for runtime dependency stagingJürg Billeter2018-02-072-0/+19
| | | | This test covers #225.
* Add tests for workspace config format conversionChandan Singh2018-02-051-0/+54
|
* tests: Add overlap testsJonathan Maw2018-01-2518-15/+125
|
* tests: Move test_overlaps test filesJonathan Maw2018-01-255-4/+5
| | | | | This was done so that the files can be re-used with different project.conf.
* tests: Remove stray printing during overlap testJonathan Maw2018-01-251-1/+0
|