summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* More specific exceptions when a project.conf is missing.Tristan Van Berkom2018-04-081-1/+1
| | | | | Since we want to react and start an interactive session when the project.conf is missing, we need a more specific error to catch.
* 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, _frontend/app.py: Implemented new `bst init` command.Tristan Van Berkom2018-04-081-0/+1
| | | | | | | This comes with an interactive mode unless the project name is specified on the command line. This fixes issue #342
* _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/format/options.py: Added tests for invalid variable names in optionsTristan Van Berkom2018-04-065-0/+31
|
* tests/format/options.py: Added tests for invalid option name symbolsTristan Van Berkom2018-04-069-0/+45
|
* tests/format/project.py: Added tests for loading of invalid project namesTristan Van Berkom2018-04-063-0/+22
|
* tests/project/plugins.py: Removed this old style testTristan Van Berkom2018-04-068-119/+0
| | | | This is sufficiently covered by other tests in tests/format/project.py
* tests/format/project.py: Converted to use CLI test harnessTristan Van Berkom2018-04-0610-89/+51
| | | | | | Moved the old style project format tests into the new CLI based directory in tests/format/ and converted to use the CLI fixture for these tests.
* 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.
* _loader.py: Some fixes in how we load sources for junctionsTristan Van Berkom2018-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | o Ensure that we call Source._load_ref(), and consider project.refs this way o Ensure that we report a warning in the case that project.refs is in use and the loaded junction source has a redundant ref which is going to be ignored o Report more distinct machine readable errors for failures to load junction element sources o Handle Consistency.INCONSISTENT and Consistency.RESOLVED separately: - The user should be told something different depending on whether they need to fetch or whether they need to track. - It is never possible to automatically fetch the source in the case that the source has no ref to begin with. This also adjusts the test/loader/junctions.py test to expect the new error
* 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.
* _artifactcache modules: Adhere to policy on private symbolstristan/private-refactor-2Tristan Van Berkom2018-04-041-3/+3
| | | | | | | | | | | | | | | Additionally: o This shares more code by creating ArtifactCache.get_artifact_fullname(), which is used for the extract directory relative path in both backends, and for the ostree "ref" in the ostree backend. o Further, this removes some redundant documentation in derived abstract methods, and clarifies in both backends which methods are abstract methods, we should only be documenting abstract method semantics in one place, where they are defined. This is a part of issue #285
* _project.py: Adhere to policy on private symbolsTristan Van Berkom2018-04-035-27/+34
| | | | | | | | | | | | | | | And adjust all surrounding sources for changed symbols. Additional details: o Added Project.get_shell_config() to report the shell configuration, instead of making those members all public o Moved assertions about project specified format versions required of plugins out of Plugin.__init__, and into Project.create_element() and Project.create_source(), so we can keep more things private This is a part of issue #285
* _exceptions.py: Adhere to policy on private symbolsTristan Van Berkom2018-04-031-3/+3
| | | | | | | | | | And adjust all surrounding sources for changed symbols. Also, added new LoadErrorReason.UNSUPPORTED_PLUGIN, required for changes in how the project will report format version errors for plugins at creation time This is a part of issue #285
* _context.py: Adhere to policy on private symbolsTristan Van Berkom2018-04-033-3/+3
| | | | | | And adjust all surrounding sources for changed symbols. This is a part of issue #285
* 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.
* element.py: Make artifact lowercase in time_activity()James Ennis2018-03-281-1/+1
| | | | | NOTE: artifact was also made lowercase in the function get_pushed_elements() in runcli.py
* _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
|
* integration/workspace.py: Add updated dependency testsTristan Maat2018-03-277-0/+265
|
* Generate unique subdirs for built elementsPhillip Smyth2018-03-268-19/+19
| | | | | | | | | | | | | Based on issue 89 (https://gitlab.com/BuildStream/buildstream/issues/89) Ensuring that elements are staged into unique subdirs while building. This patch supports that by doing the following: * Modify project config to add 2 new variables ("project-name" and "element-name") * Changed the default install-root from "/buildstream/install" to "/buildstream-install" * Update the tests to accommodate these changes * Update the expected cache keys in the tests This fixes #89
* Remove unused importsJürg Billeter2018-03-251-1/+1
|
* tests/sources/deb.py: Skip tests if arpy is not availableJürg Billeter2018-03-251-1/+8
| | | | Fixes #317
* tests/testutils/site.py: Add HAVE_ARPYJürg Billeter2018-03-251-0/+6
|
* tests/cachekey: Added test to exercise new sandbox contributions to cache keyTristan Van Berkom2018-03-254-1/+18
|
* Add simple tests of builder UID.Jim MacArthur2018-03-234-0/+95
| | | | | | | | | | tests/integration/build-uid: Add tests. tests/integration/project/elements/build-uid/build-uid-default.bst: A test for the default uid/gid of 0 in the sandbox. tests/integration/project/elements/build-uid/build-uid.bst: Tests for nonzero uid/gid values supplied in the element. tests/integration/project/elements/build-uid/build-uid-1023.bst: Tests for nonzero uid/gid values supplied in project.conf.
* Created deb Source plugin for Issue #10Phillip Smyth2018-03-2324-0/+217
| | | | added tests
* frontend/workspace.py: Add tests for loading different versionsjjardon/versioned_docsRichard Maw2018-03-221-31/+112
|
* tests/sources/git.py: Test that we ignore inconsistent submodules.Tristan Van Berkom2018-03-222-0/+40
| | | | | | | Test this at `bst track` time, when encountering a new ref which adds a .gitmodules file but does not actually add the submodule, we check that the expected warning is in the stderr and that BuildStream does not error out for this.
* tests/testutils/repo/git.py: Add new add_file() convenienceTristan Van Berkom2018-03-221-1/+11
| | | | To write tests which add and commit a file.
* 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.
* testutils/repo/git.py: Added branch() methodTristan Van Berkom2018-03-201-0/+3
| | | | | In order to test tracking on multiple branches, lets use the Git repo scaffolding.
* tests/format/project.py: Test that conditional statements are supported in ↵Tristan Van Berkom2018-03-204-0/+56
| | | | project.refs
* tests/pipeline/load.py: Testing source without load_ref() implementationTristan Van Berkom2018-03-204-0/+83
| | | | | | Test that we have no error when loading a project that doesnt use project.refs, and that we get the expected graceful failure when attempting to use project.refs with a Source which doesnt support it.
* 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.
* Removing all traces of `environment-inherit` shell configuration.Tristan Van Berkom2018-03-061-27/+7
| | | | | This is made redundant by the more complete `environment` configuration, so lets quickly remove the former in this new format version 4.